diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/global/releng-macros.yml | 2 | ||||
-rw-r--r-- | jjb/releng/compass4nfv-docker.yml | 6 | ||||
-rw-r--r-- | jjb/releng/functest-docker.yml | 14 | ||||
-rw-r--r-- | jjb/releng/opnfv-docker-arm.yml | 6 | ||||
-rw-r--r-- | jjb/releng/opnfv-docker.sh | 3 | ||||
-rw-r--r-- | jjb/releng/opnfv-docker.yml | 6 |
6 files changed, 21 insertions, 16 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index d554f4172..c8fcca670 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -141,7 +141,7 @@ - gerrit: server-name: 'gerrit.opnfv.org' trigger-on: - - ref-updated + - ref-updated-event projects: - project-compare-type: 'ANT' project-pattern: '{project}' diff --git a/jjb/releng/compass4nfv-docker.yml b/jjb/releng/compass4nfv-docker.yml index 299908d66..3b3bb29f1 100644 --- a/jjb/releng/compass4nfv-docker.yml +++ b/jjb/releng/compass4nfv-docker.yml @@ -37,7 +37,7 @@ predefined-parameters: | PUSH_IMAGE=$PUSH_IMAGE COMMIT_ID=$COMMIT_ID - RELEASE_VERSION=$RELEASE_VERSION + GERRIT_REFNAME=$GERRIT_REFNAME DOCKERFILE=$DOCKERFILE kill-phase-on: FAILURE abort-all-jobs: false @@ -149,9 +149,9 @@ default: "" description: "commit id to make a snapshot docker image" - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKERFILE default: "Dockerfile" diff --git a/jjb/releng/functest-docker.yml b/jjb/releng/functest-docker.yml index acf381f88..cc5f216d9 100644 --- a/jjb/releng/functest-docker.yml +++ b/jjb/releng/functest-docker.yml @@ -41,7 +41,7 @@ predefined-parameters: | PUSH_IMAGE=$PUSH_IMAGE COMMIT_ID=$COMMIT_ID - RELEASE_VERSION=$RELEASE_VERSION + GERRIT_REFNAME=$GERRIT_REFNAME DOCKERFILE=$DOCKERFILE kill-phase-on: FAILURE abort-all-jobs: false @@ -51,7 +51,7 @@ git-revision: true node-parameters: false predefined-parameters: - RELEASE_VERSION=$RELEASE_VERSION + GERRIT_REFNAME=$GERRIT_REFNAME kill-phase-on: FAILURE abort-all-jobs: false @@ -89,6 +89,8 @@ triggers: - pollscm: cron: "*/30 * * * *" + - gerrit-trigger-tag-created: + project: '{project}' builders: - multijob: @@ -196,10 +198,6 @@ default: "{project}" description: "Project name used to enable job conditions" - string: - name: RELEASE_VERSION - default: "" - description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" - - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' @@ -253,9 +251,9 @@ default: "" description: "commit id to make a snapshot docker image" - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKERFILE default: "Dockerfile" diff --git a/jjb/releng/opnfv-docker-arm.yml b/jjb/releng/opnfv-docker-arm.yml index d1566b48d..eedb6127a 100644 --- a/jjb/releng/opnfv-docker-arm.yml +++ b/jjb/releng/opnfv-docker-arm.yml @@ -157,9 +157,9 @@ default: "{docker_repo_name}" description: "Dockerhub repo to be pushed to." - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Release version, e.g. 1.0, 2.0, 3.0" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKER_DIR default: "{dockerdir}" @@ -188,6 +188,8 @@ triggers: - pollscm: cron: "*/30 * * * *" + - gerrit-trigger-tag-created: + project: '{project}' publishers: - email: diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index ec7b3fda3..db2213cc4 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -75,6 +75,9 @@ echo "Current branch: $BRANCH" BUILD_BRANCH=$BRANCH +GERRIT_REFNAME=${GERRIT_REFNAME:-''} +RELEASE_VERSION=${GERRIT_REFNAME/refs\/tags//} + if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" elif [[ -n "${RELEASE_VERSION-}" ]]; then diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 8250bfea4..0951cf641 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -196,9 +196,9 @@ default: "" description: "commit id to make a snapshot docker image" - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKERFILE default: "{dockerfile}" @@ -223,6 +223,8 @@ triggers: - pollscm: cron: "*/30 * * * *" + - gerrit-trigger-tag-created: + project: '{project}' publishers: - email: |