...
Drawio | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- Developer pushes a commit to Gerrit
- Gerrit triggers review verification job in Jenkins
- The template for review verification job is in ci-management/jjb/integration/integration-templates-csit.yaml and currently named as "{project-name}-unified-review-{stream}-PoC"
- The trigger is "gerrit-trigger-patch-submitted" and it is activated by any file change in the project
- Review verification job triggers docker build job
- The value of BUILD_ID Jenkins variable is passed to the docker build job as UNIQUE_DOCKER_TAG (along with PROJECT, BRANCH and GERRIT_REFSPEC)
- The triggered build is defined as "{project-name}-{stream}-{artifact-type}-docker-snapshot-PoC" in the review verification job template
- The build is blocking and fails the entire review verification job before moving it moves on to the next step on failure
- The only currently existing docker build job template that follows the expected naming pattern is defined in ci-management/jjb/global-templates-golang.yaml as "{project-name}-{stream}-golang-docker-snapshot-PoC"
- Docker build job builds snapshot docker image(s) and pushes them to ONAP Snapshot Nexus
- The docker build scripts and the created artifacts are completely based on the submitted patch in Gerrit
- The actual build script is specific to the project and has to be specified in the specific docker build job definition
- The build should tag the relevant docker image(s) with <version>-SNAPSHOT-<unique docker tag> using the UNIQUE_DOCKER_TAG value given as parameter
- Review verification job triggers CSIT job
- The value of BUILD_ID Jenkins variable is passed to the docker build job as UNIQUE_DOCKER_TAG (along with PROJECT, BRANCH and GERRIT_REFSPEC)
- The triggered build is defined as "{project-name}-{stream}-project-csit-PoC" in the review verification job template
- The build is blocking and fails the entire review verification job on failure
- The CSIT job template is defined in ci-management/jjb/integration/integration-templates-csit.yaml as "{project-name}-{stream}-project-csit-PoC"
- the template calls csit/run-project-csit.sh under the project's root directory via integration-run-project-test builder defined in ci-management/integration/integration-macros.yaml
- run-project-csit.sh is project-specific, but can take advantage of common scripts in integration/csit if considered useful
- run-project-csit.sh can and should run all the test plans of the project in one go and provide the results under csit/archives directory
- CSIT job pulls the docker images created in step 4. (by using project-specific setup scripts) and tests them
- Review verification job gives +1 or -1 verify vote to the review based on the overall success of the verification
- Once the commit is approved (+2'd) and submitted, Gerrit triggers merge verification job in Jenkins
- The template for merge verification job is in ci-management/jjb/integration/integration-templates-csit.yaml and currently named as "{project-name}-unified-merge-{stream}-PoC"
- The trigger is "gerrit-trigger-patch-merged" and it is activated by any file change in the project
- Merge verification job triggers docker build job in exactly the same way as review verification is triggered in step 3.
- Docker build job builds snapshot docker image(s) and pushes them to ONAP Snapshot Nexus
- The procedure is the same as in step 4. except for the fact that the docker build scripts and the created artifacts are completely based on master branch
- Merge verification job triggers CSIT job in exactly the same way as review verification job triggers it in step 5.
- CSIT job pulls the docker images created in step 10. (by using project-specific setup scripts) and tests them
- Merge verification job triggers docker image staging job
- The value of BUILD_ID Jenkins variable is passed to the docker build job as UNIQUE_DOCKER_TAG (along with PROJECT, BRANCH and GERRIT_REFSPEC)
- The triggered build is defined as "{project-name}-{stream}-docker-staging-PoC" in the merge verification job template
- The staging job template is defined in ci-management/jjb/global-templates-docker.yaml as "{project-name}-{stream}-docker-staging-PoC"
- The actual staging script is specific to the project and has to be specified in the specific docker build job definition
- Docker image staging job pulls the docker image(s) built in step 10.
- Docker image staging job tags the docker images(s) with <version>-STAGING-latest and pushes them to ONAP Snapshot Nexus
...