When working with microservices, integration with a CI/CD workflow is an important step in ensuring a smooth SDLC proccess for both your developers as well as your ops team.
Broadleaf doesn’t prescribe specific CI/CD tooling but instead provides general guidance on some of the most common steps that would be needed to include the Broadleaf ecosystem into your organization’s workflow.
In general, you will want to first identify and parameterize these common resources (as well as any appropriate credentials):
Your own Container Registry (e.g. Google Container Registry, Azure Container Registry, Amazon ECR, etc…)
Your own Artifact Repository (e.g. Sonatype Nexus, Artifactory, Google Artifact Registry, Azure Artifacts, AWS CodeArtifacts, etc…)
Broadleaf’s Container Registry (i.e. docker login repository.broadleafcommerce.com:5001
)
Broadleaf’s Nexus Repository (i.e. repository.broadleafcommerce.com
)
Source Control (i.e. GitHub, BitBucket, GitLab, etc…)
Authenticate with Broadleaf Microservices Nexus
Authenticate with your artifact registry
Login to Broadleaf’s Container Registry
Login to your Container Registry
Perform Maven Build (e.g. mvn deploy -DskipTests=true
)
Push Jar Artifacts to your Registry
Logout of Broadleaf Repository
Logout of Azure Repository
Build Docker image (e.g. docker build --build-arg…
or mvn clean package -Pdocker…
)
Push Docker image to your Container Registry
Logout of Broadleaf Registry
Logout of your artifact registry
everything above except we typically recommend using the mvn release plugin
to tag versions and commit to source control
Authenticate with Broadleaf Microservices NPM Repository
Install Node or use appropriate pipeline task equivalent
Install Yarn (e.g. yarn install --frozen-lockfile
)
Build App (e.g. yarn build
)
Test Coverage (e.g. yarn test:coverage
)
Login to your container registry
Build Docker image (e.g. docker build
)
Push Docker image to your container registry
Logout of your container registry