Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Drawio
bordertrue
diagramNameReview and merge verification flows with project-specific CSIT
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth14631593
revision37

  1. Developer pushes a commit to Gerrit
  2. 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
  3. Review verification build triggers artifact build job
    • Artifacts should be created from the patch under review, unit tests executed and Sonar analysis performed here
  4. Optionally, the artifacts may be pushed to Onap Nexus (nexus.onap.org)
  5. 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"
  6. Optionally, the artifacts to be used can be pulled from ONAP Nexus (nexus.onap.org)
  7. Docker build job builds snapshot docker image(s) and pushes them to ONAP Snapshot NexusNexus3 (nexus3.onap.org)
    • The docker build scripts and the created artifacts (either pulled from artifact Nexus in the previous step or created here on the fly) 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
  8. 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
  9. CSIT job pulls the docker images created in step 47. (by using project-specific setup scripts) and tests them
    • The test cases to be executed are also from the patch under review
  10. Review verification job gives +1 or -1 verify vote to the review based on the overall success of the verification
  11. 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
  12. Merge verification build triggers artifact build job
    • Artifacts should be created from the master, unit tests executed and Sonar analysis performed here
  13. Optionally, the artifacts may be pushed to Onap Nexus (nexus.onap.org)
  14. Merge verification job triggers docker build job in exactly the same way as review verification is triggered in step 3.job triggers it in step 7.
  15. Optionally, the artifacts to be used can be pulled from ONAP Nexus (nexus.onap.org)
  16. Docker build job builds snapshot docker image(s) and pushes them to ONAP Snapshot NexusNexus3 (nexus3.onap.org)
    • The procedure is the same as in step 47. except for the fact that the docker build scripts and the created artifacts are completely based on master branch
  17. Merge verification job triggers CSIT job in exactly the same way as review verification job triggers it in step 58.
  18. CSIT job pulls the docker images created in step 10. (by using project-specific setup scripts) and tests them
  19. 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
  20. Docker image staging job pulls the docker image(s) built in step 10.
  21. Docker image staging job tags the docker images(s) with <version>-STAGING-latest and pushes them to ONAP Snapshot Staging Nexus 

Requirements and recommendations

...