summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/releng-macros.yml2
-rw-r--r--jjb/releng/compass4nfv-docker.yml6
-rw-r--r--jjb/releng/functest-docker.yml14
-rw-r--r--jjb/releng/opnfv-docker-arm.yml6
-rw-r--r--jjb/releng/opnfv-docker.sh3
-rw-r--r--jjb/releng/opnfv-docker.yml6
6 files changed, 21 insertions, 16 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index c2cff3261..330584e25 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -151,7 +151,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 db2e4273b..7f142241c 100644
--- a/jjb/releng/compass4nfv-docker.yml
+++ b/jjb/releng/compass4nfv-docker.yml
@@ -36,7 +36,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
@@ -146,9 +146,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 147bcda98..584dc302c 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:
@@ -200,10 +202,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'
@@ -249,9 +247,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 75e41c1a7..fbf565844 100644
--- a/jjb/releng/opnfv-docker-arm.yml
+++ b/jjb/releng/opnfv-docker-arm.yml
@@ -154,9 +154,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}"
@@ -185,6 +185,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 7f646f1d9..69a9f89c7 100644
--- a/jjb/releng/opnfv-docker.sh
+++ b/jjb/releng/opnfv-docker.sh
@@ -77,6 +77,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 7ee158ce3..fd0b9bd1d 100644
--- a/jjb/releng/opnfv-docker.yml
+++ b/jjb/releng/opnfv-docker.yml
@@ -236,9 +236,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}"
@@ -263,6 +263,8 @@
triggers:
- pollscm:
cron: "*/30 * * * *"
+ - gerrit-trigger-tag-created:
+ project: '{project}'
publishers:
- email: