From fd9769fd872cd8a43afb15d3a9dc0e9683ee3b8b Mon Sep 17 00:00:00 2001 From: Lasse Kaihlavirta Date: Tue, 17 Nov 2020 18:54:57 +0200 Subject: [PATCH] Differentiate CSIT PoC jobs and templates - restore {project-name}-{stream}-docker-golang-shell-daily template to its original state - separate all new templates related to CSIT redesign by "PoC" postfix - pass CSIT jobs to be triggered to the template with explicit "jobs_to_trigger" list - define UNIQUE_DOCKER_TAG as input parameter to CSIT template Issue-ID: INT-1760 Signed-off-by: Lasse Kaihlavirta Change-Id: I6eef5bf407d5c89406d1b19d7d931d9d00092908 --- jjb/global-templates-golang.yaml | 65 +++++++++++++++++++++- jjb/integration/integration-templates-csit.yaml | 11 ++-- .../build-music-distributed-kv-store-image.sh | 2 +- jjb/music/music-distributed-kv-store-csit.yaml | 7 ++- jjb/music/music-distributed-kv-store.yaml | 2 +- 5 files changed, 75 insertions(+), 12 deletions(-) diff --git a/jjb/global-templates-golang.yaml b/jjb/global-templates-golang.yaml index c85c74ac0..b3b460f72 100644 --- a/jjb/global-templates-golang.yaml +++ b/jjb/global-templates-golang.yaml @@ -169,8 +169,6 @@ branch: '{branch}' refspec: 'refs/heads/{branch}' artifacts: '{archive-artifacts}' - - integration-unique-docker-tag: - unique-docker-tag: '' scm: - gerrit-trigger-scm: refspec: '' @@ -203,3 +201,66 @@ publishers: - infra-shiplogs: maven-version: '{maven-version}' + +- job-template: + # Job template PoC for building & pushing snapshot docker images + # for CSIT verification + # + # golangver can be set to golang110 or golang111 + # depending on what version is needed by the project + # default is golang110 + # + # The purpose of this job template is to run: + # 1. login to the docker registry + # 2. run a specified shell builder + # + + name: '{project-name}-{stream}-docker-golang-snapshot-PoC' + golangver: 'golang110' + project-type: freestyle + node: 'ubuntu1804-docker-8c-8g' + disabled: '{disabled}' + properties: + - infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - integration-unique-docker-tag: + unique-docker-tag: '' + scm: + - gerrit-trigger-scm: + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - '{golangver}' + - infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 12 AM UTC + - timed: '@daily' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + - lf-infra-pre-build + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - docker-login + + - shell: '{script}' + + publishers: + - infra-shiplogs: + maven-version: '{maven-version}' diff --git a/jjb/integration/integration-templates-csit.yaml b/jjb/integration/integration-templates-csit.yaml index 3ae98a29c..804598cca 100644 --- a/jjb/integration/integration-templates-csit.yaml +++ b/jjb/integration/integration-templates-csit.yaml @@ -130,9 +130,8 @@ send-to-individuals: true - job-template: - name: '{project-name}-{stream}-project-csit-{functionality}' + name: '{project-name}-{stream}-project-csit-{functionality}-PoC' disabled: '{disabled}' - project-type: freestyle build-node: 'ubuntu1804-docker-8c-8g' node: '{build-node}' @@ -155,6 +154,8 @@ test-plan: 'plans/{functionality}' - integration-test-options: test-options: '{robot-options}' + - integration-unique-docker-tag: + unique-docker-tag: '' scm: - gerrit-trigger-scm: @@ -187,7 +188,7 @@ send-to-individuals: true - job-template: - name: '{project-name}-unified-review-{stream}-test' + name: '{project-name}-unified-review-{stream}-PoC' disabled: '{disabled}' project-type: freestyle build-node: 'ubuntu1804-docker-8c-8g' @@ -222,7 +223,7 @@ global-settings-file: "{mvn-global-settings}" settings-file: "{mvn-settings}" - trigger-builds: - - project: "{project-name}-{stream}-docker-golang-shell-daily" + - project: "{project-name}-{stream}-docker-golang-snapshot-PoC" condition: UNSTABLE_OR_BETTER predefined-parameters: | UNIQUE_DOCKER_TAG=$BUILD_TAG @@ -231,7 +232,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC block: true - trigger-builds: - - project: '{project-name}-{stream}-project-csit-{review-functionality}' + - project: "{jobs_to_trigger}" condition: UNSTABLE_OR_BETTER predefined-parameters: | UNIQUE_DOCKER_TAG=$BUILD_TAG diff --git a/jjb/music/build-music-distributed-kv-store-image.sh b/jjb/music/build-music-distributed-kv-store-image.sh index 69a7785c1..20c1e19c6 100755 --- a/jjb/music/build-music-distributed-kv-store-image.sh +++ b/jjb/music/build-music-distributed-kv-store-image.sh @@ -7,4 +7,4 @@ echo $CURRENTDIR chmod 755 ./deployment/*.sh cd ./deployment -./docker-build.sh ${UNIQUE_DOCKER_TAG} +./docker-build.sh diff --git a/jjb/music/music-distributed-kv-store-csit.yaml b/jjb/music/music-distributed-kv-store-csit.yaml index 95512679d..71d5879b6 100644 --- a/jjb/music/music-distributed-kv-store-csit.yaml +++ b/jjb/music/music-distributed-kv-store-csit.yaml @@ -2,8 +2,8 @@ - project: name: music-distributed-kv-store-csit jobs: - - '{project-name}-{stream}-project-csit-{functionality}' - - '{project-name}-unified-review-{stream}-test' + - '{project-name}-{stream}-project-csit-{functionality}-PoC' + - '{project-name}-unified-review-{stream}-PoC' project-name: 'music-distributed-kv-store' project: 'music/distributed-kv-store' stream: 'master' @@ -13,6 +13,7 @@ mvn-global-settings: global-settings functionality: - 'music-distributed-kv-store-test-plan' - review-functionality: 'music-distributed-kv-store-test-plan' + jobs_to_trigger: + - 'music-distributed-kv-store-master-project-csit-music-distributed-kv-store-test-plan-PoC' robot-options: '' branch: 'master' diff --git a/jjb/music/music-distributed-kv-store.yaml b/jjb/music/music-distributed-kv-store.yaml index d5b030879..4ad0a39ef 100644 --- a/jjb/music/music-distributed-kv-store.yaml +++ b/jjb/music/music-distributed-kv-store.yaml @@ -6,7 +6,7 @@ jobs: - '{project-name}-{stream}-verify-golang' - '{project-name}-{stream}-merge-golang' - - '{project-name}-{stream}-docker-golang-shell-daily': + - '{project-name}-{stream}-docker-golang-snapshot-PoC': script: !include-raw-escape: 'build-music-distributed-kv-store-image.sh' project: 'music/distributed-kv-store' -- 2.16.6