Improvements to Docker build job
- include a parameter for a tag name to pull
- remove useless new version parameter
Change-Id: Ieae837ef807278a84e8eb9f1e3e34a9e55917d70
diff --git a/jjb/onos/onos-docker-build.sh b/jjb/onos/onos-docker-build.sh
index aa2b431..b0e1753 100644
--- a/jjb/onos/onos-docker-build.sh
+++ b/jjb/onos/onos-docker-build.sh
@@ -13,11 +13,12 @@
# set up release build credentials
. onos-build-credentials
-# get the sources
+on# get the sources
git checkout $GERRIT_BRANCH
+git checkout -b docker $ONOS_TAG
# build and deploy the Docker image
-$DOCKER build -t onosproject/onos:${ONOS_VERSION} .
+$DOCKER build -t onosproject/onos:${ONOS_TAG} .
$DOCKER login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_PASSWORD}
-$DOCKER push onosproject/onos:${ONOS_VERSION}
+$DOCKER push onosproject/onos:${ONOS_TAG}
diff --git a/jjb/onos/onos-verify.yaml b/jjb/onos/onos-verify.yaml
index efb7f10..5a6e7a4 100644
--- a/jjb/onos/onos-verify.yaml
+++ b/jjb/onos/onos-verify.yaml
@@ -122,12 +122,38 @@
- string:
name: ONOS_VERSION
default: '1.12'
- description: 'Version of ONOS to build'
+ description: 'Version tag of ONOS to build'
- string:
name: ONOS_NEXT_VERSION
default: '1.13.0-SNAPSHOT'
- description: 'Version of ONOS to build'
+ description: 'Version of ONOS to reset tree to'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '{git-url}'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: '{submodule-recursive}'
+ choosing-strategy: gerrit
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+- docker_build_boiler_plate: &docker_build_boiler_plate
+ name: release_build_boiler_plate
+
+ concurrent: true
+
+ parameters:
+ - lf-infra-parameters:
+ project: '{project}'
+ branch: '{stream}'
+ stream: '{stream}'
+ lftools-version: '{lftools-version}'
+
+ - string:
+ name: ONOS_TAG
+ default: ''
+ description: 'Tag of ONOS to build'
scm:
- lf-infra-gerrit-scm:
@@ -309,7 +335,7 @@
<<: *job_boiler_plate
# yamllint disable-line rule:key-duplicates
- <<: *release_build_boiler_plate
+ <<: *docker_build_boiler_plate
builders:
- lf-provide-maven-settings: