Jenkinsfile
and .cxcloud.yaml
. The pipeline code is in the Jenkinsfile and the .cxcloud.yaml
file contains the Kubernetes routing for the microservices..cxcloud.yaml
file in the root of the repository:.cxcloud.yaml
in the folder containing the Kuberntes deployments..cxcloud.yaml
file for a microservice:populate variables
will set the values for many of the variables that has to be calculated while the pipeline is running. E.g. some values for pull requests can only be populated in case the job execution is an actual pull request.run tests
will run the tests. The pipeline will stop in case any of the tests fails. When we work in a branch all tests will run for all projects. However, when a pull requests is created, only tests for modified projects will be executed. When deploying a release tag, none of the tests will run, since all tests had already to pass previously in the base branch.SonarQube analysis
will run sonar-scanner and analyse the projects on SonarQube. The pipeline will not check at this stage if the code quality for the projects pass or fail.SonarQube quality gate
ensure that all the projects has passed the SonarQube analysis. The pipeline will fail and send notifications in case any of the projects doesn't pass the "quality gate".Create namespace
will create a new kubernetes namespace for the deployment in case it doesn't already exist.applications
for storing secrets for the test/dev environments. Stage Copy namespace secrets to DEV/TEST environment
will copy the secrets from the application namespace into the test/dev environments.Deploy projects
will use the cxcloud command line tool, cxcloud-cli to deploy the projects. The command will create docker images, upload them to a private docker registry and deploy the new services into the Kubernetes cluster.Cleanup development environments
will delete all dev/test environment for pull requests that has been closed. This stage will only be executed in case any new code will be pushed to the base branch, master.