.cxcloud.yaml. The pipeline code is in the Jenkinsfile and the
.cxcloud.yamlfile contains the Kubernetes routing for the microservices.
.cxcloud.yamlfile in the root of the repository:
.cxcloud.yamlin the folder containing the Kuberntes deployments.
.cxcloud.yamlfile for a microservice:
populate variableswill 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 testswill 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 analysiswill 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 gateensure 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 namespacewill create a new kubernetes namespace for the deployment in case it doesn't already exist.
applicationsfor storing secrets for the test/dev environments. Stage
Copy namespace secrets to DEV/TEST environmentwill copy the secrets from the application namespace into the test/dev environments.
Deploy projectswill 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 environmentswill 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.