From f81911464b7ffc4eb81633ca269c3118443939c0 Mon Sep 17 00:00:00 2001 From: Lasse Kaihlavirta Date: Wed, 11 Nov 2020 19:27:57 +0200 Subject: [PATCH] Add project-specific CSIT job template - add template for project-specific CSIT - apply the template in music component (note that this requires https://gerrit.onap.org/r/c/music/distributed-kv-store/+/114637 to be merged to find the proper plans) - pass selected infra parameters to triggered docker build and CSIT jobs to have them use appropriate branch Issue-ID: INT-1760 Signed-off-by: Lasse Kaihlavirta Change-Id: Id83e54548243e9d5dc7d932acae469a8b295c48f --- jjb/integration/integration-macros.yaml | 15 ++++++ jjb/integration/integration-templates-csit.yaml | 65 ++++++++++++++++++++++++- jjb/music/music-distributed-kv-store-csit.yaml | 5 +- 3 files changed, 81 insertions(+), 4 deletions(-) diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml index d485b8ed7..b4728463e 100644 --- a/jjb/integration/integration-macros.yaml +++ b/jjb/integration/integration-macros.yaml @@ -67,6 +67,11 @@ builders: - shell: "${WORKSPACE}/run-csit.sh ${TESTPLAN} ${TESTOPTIONS}" +- builder: + name: integration-run-project-test + builders: + - shell: "${WORKSPACE}/csit/run-project-csit.sh ${TESTPLAN} ${TESTOPTIONS}" + - builder: name: integration-autorelease-fix-relativepaths builders: @@ -131,6 +136,16 @@ pass-threshold: '{pass-if}' only-critical: false +- publisher: + name: integration-project-robot + publishers: + - robot: + output-path: 'csit/archives' + other-files: '' + unstable-threshold: '{unstable-if}' + pass-threshold: '{pass-if}' + only-critical: false + - publisher: name: integration-docker-compose-logs publishers: diff --git a/jjb/integration/integration-templates-csit.yaml b/jjb/integration/integration-templates-csit.yaml index c978753e8..3ae98a29c 100644 --- a/jjb/integration/integration-templates-csit.yaml +++ b/jjb/integration/integration-templates-csit.yaml @@ -129,6 +129,63 @@ notify-every-unstable-build: false send-to-individuals: true +- job-template: + name: '{project-name}-{stream}-project-csit-{functionality}' + disabled: '{disabled}' + + project-type: freestyle + build-node: 'ubuntu1804-docker-8c-8g' + node: '{build-node}' + recipients: '' + java-version: 'openjdk11' + python-version: python3 + + properties: + - lf-infra-properties: + project: '{project}' + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - infra-parameters: + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - integration-test-plan: + test-plan: 'plans/{functionality}' + - integration-test-options: + test-options: '{robot-options}' + + scm: + - gerrit-trigger-scm: + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + submodule-recursive: '{submodule-recursive}' + + wrappers: + - lf-infra-wrappers: + build-timeout: '{build-timeout}' + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + builders: + - lf-infra-pre-build + - lf-update-java-alternatives: + java-version: '{java-version}' + - integration-install-robotframework + - inject: + properties-file: 'env.properties' + - integration-run-project-test + + publishers: + - integration-project-robot: + unstable-if: 0.0 + pass-if: 100.0 + - lf-infra-publish + - email: + recipients: '{recipients}' + notify-every-unstable-build: false + send-to-individuals: true + - job-template: name: '{project-name}-unified-review-{stream}-test' disabled: '{disabled}' @@ -169,12 +226,18 @@ condition: UNSTABLE_OR_BETTER predefined-parameters: | UNIQUE_DOCKER_TAG=$BUILD_TAG + PROJECT=$PROJECT + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC block: true - trigger-builds: - - project: "{project-name}-{stream}-csit-{review-functionality}" + - project: '{project-name}-{stream}-project-csit-{review-functionality}' condition: UNSTABLE_OR_BETTER predefined-parameters: | UNIQUE_DOCKER_TAG=$BUILD_TAG + PROJECT=$PROJECT + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC block: true triggers: - gerrit-trigger-patch-submitted: diff --git a/jjb/music/music-distributed-kv-store-csit.yaml b/jjb/music/music-distributed-kv-store-csit.yaml index 0b9834aa7..95512679d 100644 --- a/jjb/music/music-distributed-kv-store-csit.yaml +++ b/jjb/music/music-distributed-kv-store-csit.yaml @@ -2,7 +2,7 @@ - project: name: music-distributed-kv-store-csit jobs: - - '{project-name}-{stream}-csit-{functionality}' + - '{project-name}-{stream}-project-csit-{functionality}' - '{project-name}-unified-review-{stream}-test' project-name: 'music-distributed-kv-store' project: 'music/distributed-kv-store' @@ -12,8 +12,7 @@ mvn-settings: 'music-distributed-kv-store-settings' mvn-global-settings: global-settings functionality: - - 'music-distributed-kv-store-test-plan': - trigger_jobs: + - 'music-distributed-kv-store-test-plan' review-functionality: 'music-distributed-kv-store-test-plan' robot-options: '' branch: 'master' -- 2.16.6