summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@linuxfoundation.org>2018-06-11 19:28:30 +0000
committerGerrit Code Review <gerrit@onap.org>2018-06-11 19:28:30 +0000
commitbddee66a4652d8cc66d988287a231de05bba2c6e (patch)
tree593c4ac6e8a20d49819dc4a55d55e4e13c6e2faf
parent273a7d3896f12d5eb4f4b34a150d467369555a98 (diff)
parent3380a0fa7e10d72769bc79fe42db1f2d5a7da278 (diff)
Merge "Add template to build release docker image"
-rw-r--r--jjb/global-templates-docker.yaml50
-rw-r--r--jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-nokiav2.yaml5
2 files changed, 55 insertions, 0 deletions
diff --git a/jjb/global-templates-docker.yaml b/jjb/global-templates-docker.yaml
index 8145efacd..b1db09a6b 100644
--- a/jjb/global-templates-docker.yaml
+++ b/jjb/global-templates-docker.yaml
@@ -349,3 +349,53 @@
server: '{server-name}'
project: '{project}'
branch: '{branch}'
+
+- job-template:
+ name: '{project-name}-{subproject}-{stream}-release-version-docker-no-sonar'
+ # Job template for Docker final release job
+ #
+ # The purpose of this job template is to run "docker build and docker push"
+ # for projects using this template.
+ #
+ # Required Variables:
+ # branch: git branch (eg. stable/lithium or master)
+ <<: *docker_job_boiler_plate
+
+ docker_registry: '$DOCKER_REGISTRY:10003'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+ git-url: '$GIT_URL/$PROJECT'
+ refspec: '$GERRIT_REFSPEC'
+ branch: '$GERRIT_BRANCH'
+ submodule-recursive: true
+ choosing-strategy: default
+
+ builders:
+ - lf-infra-docker-login:
+ global-settings-file: 'global-settings'
+ settings-file: '{mvn-settings}'
+ - shell: '{pre_build_script}'
+ - inject:
+ # Docker registry is purposely not using an '_' so as to not conflict
+ # with the Jenkins global env var
+ properties-content: |
+ DOCKER_ARGS={docker_build_args}
+ DOCKER_NAME={docker_name}
+ DOCKER_ROOT={docker_root}
+ DOCKER_TAG={docker_tag}
+ DOCKERREGISTRY={docker_registry}
+ BUILD_MODE=STAGING
+
+ # Do the docker build
+ - shell: !include-raw: ../shell/snapshot-strip.sh
+ - shell: !include-raw: ../shell/docker-build.sh
+ - inject:
+ # Import the docker image information from the build step
+ properties-file: 'env_inject.txt'
+ # Execute any post build clean-up or testing
+ - shell: '{post_build_script}'
+ # Provided all steps have already passed, push the docker image
+ - shell: !include-raw: ../shell/docker-push.sh
+
diff --git a/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-nokiav2.yaml b/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-nokiav2.yaml
index 3c8ada8ab..7a93b8b8c 100644
--- a/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-nokiav2.yaml
+++ b/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-nokiav2.yaml
@@ -43,6 +43,11 @@
docker_name: 'onap/vfc/nfvo/svnfm/nokiav2'
docker_root: '$WORKSPACE/nokiav2/deployment'
docker_registry: '$DOCKER_REGISTRY:10003'
+ - '{project-name}-{subproject}-{stream}-release-version-docker-no-sonar':
+ docker_build_args: '--build-arg MODE= --build-arg REPO=releases'
+ docker_name: 'onap/vfc/nfvo/svnfm/nokiav2'
+ docker_root: '$WORKSPACE/nokiav2/deployment'
+ docker_registry: '$DOCKER_REGISTRY:10003'
files: 'nokiav2/**'
archive-artifacts: ''
build-node: ubuntu1604-docker-8c-8g