From: Alexandru Avadanii Date: Thu, 16 May 2019 19:31:53 +0000 (+0200) Subject: [iec] Trigger all usecases in parent jobs X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=68f1c2f99dacb4230d06a60a8be2c0fcf8809191;hp=--cc;p=ci-management.git [iec] Trigger all usecases in parent jobs This should fix the unresolved job reference for seba_on_arm by using j2 templates to create triggers for all usecases defined. While at it, fix missing {deploy-type} in trigger name and rename all occurences of s/deploy-type/deploy_type/g since jinja2 does not allow dashes ('-') in variable names. Change-Id: Ibeffa1fde45d7be498301d084b07f1577b992bae Signed-off-by: Alexandru Avadanii --- 68f1c2f99dacb4230d06a60a8be2c0fcf8809191 diff --git a/jjb/iec/iec.yaml b/jjb/iec/iec.yaml index 4cb9440..edeba00 100644 --- a/jjb/iec/iec.yaml +++ b/jjb/iec/iec.yaml @@ -17,7 +17,7 @@ # ------------------------------- # DEPLOY TYPE DEFINITIONS # ------------------------------- - deploy-type: + deploy_type: - fuel-baremetal: slave-label: 'aarch64_dev' scenario: 'k8-calico-iec-noha' @@ -37,9 +37,9 @@ scenario: 'k8-calico-iec-noha' jobs: - - 'iec-{deploy-type}-daily-{stream}' - - 'iec-deploy-{deploy-type}-daily-{stream}' - - 'iec-install-{usecase}-{deploy-type}-daily-{stream}' + - 'iec-{deploy_type}-daily-{stream}' + - 'iec-deploy-{deploy_type}-daily-{stream}' + - 'iec-install-{usecase}-{deploy_type}-daily-{stream}' ############## # PARAMETERS # @@ -83,7 +83,7 @@ # job templates ######################## - job-template: - name: 'iec-{deploy-type}-daily-{stream}' + name: 'iec-{deploy_type}-daily-{stream}' disabled: '{obj:disabled}' concurrent: false node: '{slave-label}' @@ -96,7 +96,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '.*-{deploy-type}-daily-.*' + - '.*-{deploy_type}-daily-.*' blocking-level: 'NODE' wrappers: @@ -104,7 +104,7 @@ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - - 'iec-{deploy-type}-daily-{stream}-trigger' + - 'iec-{deploy_type}-daily-{stream}-trigger' parameters: - lf-infra-parameters: @@ -118,19 +118,24 @@ builders: - trigger-builds: - - project: 'iec-deploy-{deploy-type}-daily-{stream}' + - project: 'iec-deploy-{deploy_type}-daily-{stream}' current-parameters: false - predefined-parameters: | + predefined-parameters: DEPLOY_SCENARIO={scenario} same-node: true block: true - - project: 'iec-install-{usecase}-daily-{stream}' + - project: + !j2: | + {%- for uc in usecase -%} + iec-install-{{ uc | first }}-{{ deploy_type }}-daily-{{ stream }} + {%- if not loop.last -%},{%- endif -%} + {%- endfor %} current-parameters: false same-node: true block: true - job-template: - name: 'iec-deploy-{deploy-type}-daily-{stream}' + name: 'iec-deploy-{deploy_type}-daily-{stream}' concurrent: true node: '{slave-label}' properties: @@ -142,7 +147,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '.*-deploy-{deploy-type}-daily-*' + - '.*-deploy-{deploy_type}-daily-*' blocking-level: 'NODE' parameters: @@ -180,7 +185,7 @@ - conditional-step: condition-kind: regex-match regex: 'compass-.*' - label: '{deploy-type}' + label: '{deploy_type}' steps: - shell: !include-raw-escape: ./iec-compass-build.sh @@ -191,7 +196,7 @@ - conditional-step: condition-kind: regex-match regex: 'fuel-.*' - label: '{deploy-type}' + label: '{deploy_type}' steps: - shell: !include-raw-escape: ./iec-fuel-deploy.sh @@ -201,7 +206,7 @@ recipients: armband@enea.com - job-template: - name: 'iec-install-{usecase}-{deploy-type}-daily-{stream}' + name: 'iec-install-{usecase}-{deploy_type}-daily-{stream}' concurrent: true node: '{slave-label}' properties: @@ -213,8 +218,8 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '.*-deploy-{deploy-type}-daily-*' - - '.*-install-{usecase}-{deploy-type}-daily-*' + - '.*-deploy-{deploy_type}-daily-*' + - '.*-install-{usecase}-{deploy_type}-daily-*' blocking-level: 'NODE' parameters: @@ -227,7 +232,7 @@ wrappers: - build-name: - name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${deploy-type}' + name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${deploy_type}' scm: *scm