Skip to content

Latest commit

History

482 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Mulesoft DevOps Tools

DevOps centralized hub that provides reusable workflows and actions for building CICD pipelines with a detached multi-environment configuration and secrets management.

Table of contents

  1. Installation
  2. Features
  3. Pipeline resources
  4. Azure KeyVault
  5. Repository: mulesoft-configurations
  6. Repository: mulesoft-pipeline
    1. Workflows
    2. Actions
  7. Github Secrets
  8. Examples

Instalation

Configure the Github organization and if required the name of the common-devops repository

grep --exclude="*.md" -r -l 'jpontdia/mulesoft-pipeline' * | xargs sed -i "" 's+jpontdia/mulesoft-pipeline+jpontdia/common-devops+g'

ERROR: ABOVE command is not working on directory .github/workflows

Features

  • Standardization of source code layout. Enforces Github and AnypointExchange documentation.
  • Pipeline created with reusable components with simple configuration in yaml files. No need to hardcode any service specific data.
  • Creation of code repository bages for test cases and code coverage.
  • Anypoint Exchange as an artifact repository.
  • Configuration Management using configuration repositories and secrets.
  • Uses Azure KeyVault as a secret managment, almost a free aproach. No need to use anymore security configuration files in code.
  • Separation of roles: Security Manager configures the KeyVault, and DevOps engeniers responsible of service configuration.
  • Integration testing with Mulesoft Blackbox Automated Testing (BDD tool), say goodby to postman or manual human QA test.
  • Works great with free personal or enterprise github accounts, with private or public repositories
  • Ready to use for Cloudhub 1 and GovCloud, Cloudhub 2 is coming. The current baseline makes easy extensible for runtime fabric or docker images

Pipeline resources

Next is the list with the resources required by the pipeline:

  • Azure Keyvault: A KeyVualt to store all secrets required by services and pipeline
  • Github respository: mulesoft-configurations. Configuration repository for services
  • Github respository: mulesoft-pipeline. Reusable workflows and actions (this repository)
  • Github Gist: A Gist to store to code badges: code coverage, test unit, etc.
  • Github Secrets: Secrets stored in Github that allows the connection with Azure Keyvault and Gist

Azure KeyVault

A KeyVualt to store all secrets required by services and pipeline. Mandatory secrets:

SecretDescription
github-configurations-accesstokenPersonal access token for repository: mulesoft-configurations.
github-gist-accesstokenPersonal access token for gist access.

Repository mulesoft-configurations

Repository with the configuration for the pipeline and services. The mandatory files are:

FileDescription
secrets-map.txtConfiguration file with the map rules between environment variables and secrets.
settings.xmlMaven settings file used to build mulesoft assets

Repository mulesoft-pipeline

The Pipeline Repository is a centralized hub for building and deploying software services. It offers reusable workflows and actions that streamline development processes and adhere to best practices. The repository aims to enhance efficiency, reliability, and collaboration throughout the software development lifecycle.

Teams can access meticulously crafted workflows and actions covering various aspects of software delivery. These automate tasks such as building, testing, and deploying services, saving time and ensuring reproducibility. The workflows are customizable to fit specific requirements, allowing teams to integrate preferred tools, testing frameworks, and coding standards.

Collaboration is encouraged, with teams contributing insights and improvements to foster innovation. The repository empowers developers to make choices that best suit their services while maintaining overall coherence in software delivery. With the Pipeline Repository, we can revolutionize our development cycles and deliver exceptional software experiences.

Workflows

Github reusable workflows in directory: .github/workflow

WorkflowDescription
mulesoft.ymlBuild and deploy Mulesoft services to cloud (Cloudhub/GovCloud). The same workflow helps to deploy other kind of assets to Anypoint Exchange like parent poms, library projects, custom connectors, etc.

Actions

Github composite actions in directory: packages

ActionDescription
badgeCreates a badge image in the Gist repository.
batInstall and execute Mulesoft BAT.
cloudhub-anypoint-cliAnypoint CLI to deploy a service to CloudHub/GovCloud.
cloudhub-deploymentDeploys a service to CloudHub/GovCloud.
configuration-fileGet the configuration data for a mulesoft asset.
install-anypoint-cliInstall Mulesoft anypoint-cli. The Anypoint CLI (Command Line Interface) is a tool provided by MuleSoft that allows you to interact with the Anypoint Platform from the command line, and enables you to manage and deploy applications, APIs, and other integration assets using scripts or automated workflows.
install-mulesoft-javaInstall and configurtes Java JDK for Mulesoft applications.
packageExecute the maven package command with the the correct testing settings.
service-infoGet the basic information for the service like the name from the pom.xml file
secretsGet the default secrets for the pipeline and the service to build.
settings-mavenGet the settings.xml file required for Maven to compile and package the Mulesoft/Java service or asset.
summary-codecoveragePrints a job summary with the code coverage report.
summary-testcasesPrints a job summary with the test unit report.
verify-deploymentCheck if the asset is deployable to a specific environment.

Github secrets

Next is the list of the secrets that must be configured in Github to connect to Azure KeyVault and Gist:

SecretValue
AZURE_CREDENTIALSConfiguration token to access Azure Keyvault.
GIST_ACCESSTOKENPersonal access token with write gist access.

Examples

Example of a CICD pipeline with 4 jobs:

  • Build
  • Deployment to dev environment
  • Integration testing in dev environment
  • Deployment to tst

Example

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors