diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-09-10 02:27:37 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-09-10 17:36:31 +0200 |
commit | 2077f1d4262a65e171f30b4ad42579675a6ce8e1 (patch) | |
tree | b205da2a945d1f827a36532e4a3fe70f55145f3a /jjb | |
parent | 02b2a1bca2b0febdf843750c8a76dc203ae604aa (diff) |
[fuel] verify: Multiarch, docker build step
Rework Fuel verify jobs:
- split 'fuel-verify' into per-arch jobs (amd64 and arm64):
* for now, arm64 jobs are non-voting;
- add 'docker-build' phase job:
* the docker build job will run on the same virtual POD jump host
as the deploy, to bypass the need of pushing to a (public)
Docker hub registry - this might be refactored later to resemble
the old Fuel ISO build workflow where the artifacts built during
verify are the ones actually promoted - with the current method
the final build & tag (ran on OPNCI CI build servers) might yield
different results due to different docker build cache states;
* the locally built container image is tagged with the 'verify'
designator and not pushed to a public registry, only consumed
during verify's job 'deploy-virtual' phase;
JIRA: ARMBAND-401
JIRA: FUEL-383
Change-Id: I9b0d8079e759cdc895260219a8a4989411c995ff
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/fuel/fuel-verify-jobs.yaml | 127 |
1 files changed, 88 insertions, 39 deletions
diff --git a/jjb/fuel/fuel-verify-jobs.yaml b/jjb/fuel/fuel-verify-jobs.yaml index 8eb5ab0cd..c5a0ec452 100644 --- a/jjb/fuel/fuel-verify-jobs.yaml +++ b/jjb/fuel/fuel-verify-jobs.yaml @@ -18,22 +18,32 @@ gs-pathname: '/{stream}' disabled: false ##################################### + # cluster architectures + ##################################### + arch_tag: + - 'amd64': + slave-label: 'fuel-virtual' + functest-suite-label: 'fuel-virtual' + - 'arm64': + slave-label: 'armband-virtual' + functest-suite-label: 'fuel-armband-virtual' + ##################################### # patch verification phases ##################################### phase: - - 'deploy-virtual': - slave-label: 'fuel-virtual' + - 'docker-build' + - 'deploy-virtual' ##################################### # jobs ##################################### jobs: - - 'fuel-verify-{stream}' - - 'fuel-verify-{phase}-{stream}' + - 'fuel-verify-{arch_tag}-{stream}' + - 'fuel-verify-{phase}-{arch_tag}-{stream}' ##################################### # job templates ##################################### - job-template: - name: 'fuel-verify-{stream}' + name: 'fuel-verify-{arch_tag}-{stream}' project-type: multijob @@ -64,40 +74,13 @@ fail: true triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'ci/**' - - compare-type: ANT - pattern: 'mcp/**' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' - readable-message: true + - 'fuel-verify-{arch_tag}-trigger' parameters: - project-parameter: project: '{project}' branch: '{branch}' - - 'fuel-virtual-defaults': + - '{slave-label}-defaults': installer: '{installer}' - '{installer}-defaults': gs-pathname: '{gs-pathname}' @@ -109,12 +92,28 @@ - description-setter: description: "Built on $NODE_NAME" - multijob: + name: docker-build + condition: SUCCESSFUL + projects: + - name: 'fuel-verify-docker-build-{arch_tag}-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + + - multijob: name: deploy-virtual condition: SUCCESSFUL projects: - - name: 'fuel-verify-deploy-virtual-{stream}' + - name: 'fuel-verify-deploy-virtual-{arch_tag}-{stream}' current-parameters: false predefined-parameters: | + MCP_DOCKER_TAG=verify BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -128,7 +127,7 @@ condition: SUCCESSFUL projects: # Use Functest job definition from jjb/functest/functest-daily-jobs - - name: 'functest-fuel-virtual-suite-{stream}' + - name: 'functest-{functest-suite-label}-suite-{stream}' current-parameters: false predefined-parameters: | FUNCTEST_MODE=tier @@ -143,7 +142,7 @@ abort-all-job: true - job-template: - name: 'fuel-verify-{phase}-{stream}' + name: 'fuel-verify-{phase}-{arch_tag}-{stream}' disabled: '{obj:disabled}' @@ -159,6 +158,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: + - 'fuel-verify-docker-build-.*' - 'fuel-verify-deploy-.*' block-level: 'NODE' @@ -175,8 +175,7 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults' - - 'fuel-virtual-defaults': + - '{slave-label}-defaults': installer: '{installer}' - '{installer}-defaults': gs-pathname: '{gs-pathname}' @@ -185,6 +184,50 @@ - description-setter: description: "Built on $NODE_NAME" - '{project}-verify-{phase}-macro' +######################## +# trigger macros +######################## +- trigger: + name: 'fuel-verify-amd64-trigger' + triggers: + - gerrit: &fuel_verify_amd64_trigger + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'mcp/**' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + readable-message: true +- trigger: + name: 'fuel-verify-arm64-trigger' + triggers: + - gerrit: + <<: *fuel_verify_amd64_trigger + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true ##################################### # builder macros ##################################### @@ -193,3 +236,9 @@ builders: - shell: !include-raw: ./fuel-deploy.sh +- builder: + name: 'fuel-verify-docker-build-macro' + builders: + - shell: | + #!/bin/bash -ex + sudo ./ci/build.sh 'verify' '' |