summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-06-08 15:10:19 +0200
committerDenes Nemeth <denes.nemeth@nokia.com>2018-06-10 23:28:54 +0200
commit3380a0fa7e10d72769bc79fe42db1f2d5a7da278 (patch)
tree78bf2b611ec02302521946122a6475f898e1a5d7
parent24cd5f009f99d686461f6037b16c9a931624c946 (diff)
Add template to build release docker image
The release docker image is built from artifacts in the release repo. This job is only triggered manually by Linux foundation, when a release needs to be built. The release builder still publishes to the staging repo. The images is planed to be moved from staging repo to the release repo manually. Change-Id: I943494d6826aa8f4e9186faa8c82377aa8c5b09f Issue-ID: VFC-728 Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com>
-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