summaryrefslogtreecommitdiffstats
path: root/jjb/opnfv/opnfv-docker.yml
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-11-20 16:36:21 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2015-11-26 13:36:06 +0100
commit7c7f2f0bc299c31a1fe5ffe3271b44439c80a65d (patch)
tree8c4a3c2d8dc9674d05ac1d6310608c63ceda7739 /jjb/opnfv/opnfv-docker.yml
parentc21e64ac3e342f820ad31ba264d8b7c93b3cd91f (diff)
Create generic jenkins job to build and push a docker image
This is a proposal so that we use the same methodology when it comes to building and pushing docker images. With this approach, yardstick Makefile is not needed for automation. For now, it is usable by Yardstick and Functest docker images. JIRA: RELENG-55 Change-Id: I58cfb4740cdfca82f69c102caefe9f29c92f099e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'jjb/opnfv/opnfv-docker.yml')
-rw-r--r--jjb/opnfv/opnfv-docker.yml76
1 files changed, 76 insertions, 0 deletions
diff --git a/jjb/opnfv/opnfv-docker.yml b/jjb/opnfv/opnfv-docker.yml
new file mode 100644
index 000000000..dfff050a9
--- /dev/null
+++ b/jjb/opnfv/opnfv-docker.yml
@@ -0,0 +1,76 @@
+##############################################
+# job configuration for docker build and push
+##############################################
+
+- project:
+
+ name: opnfv-docker
+
+ project:
+ - 'functest'
+ - 'yardstick'
+
+ jobs:
+ - '{project}-docker-build-push-{stream}'
+
+ stream:
+ - master:
+ branch: 'master'
+
+########################
+# job templates
+########################
+- job-template:
+ name: '{project}-docker-build-push-{stream}'
+
+ project-type: freestyle
+
+ node: ericsson-build
+
+ disabled: false
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - string:
+ name: GIT_BASE
+ default: "https://gerrit.opnfv.org/gerrit/$PROJECT"
+ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+ - string:
+ name: PUSH_IMAGE
+ default: "true"
+ description: "To enable/disable pushing the image to Dockerhub."
+ - string:
+ name: BASE_VERSION
+ default: "brahmaputra.0"
+ description: "Base version to be used."
+ - string:
+ name: DOCKER_REPO_NAME
+ default: "opnfv/{project}"
+ description: "Dockerhub repo to be pushed to."
+ - string:
+ name: UPDATE_LATEST_STABLE
+ default: "false"
+ description: "This will update the latest_stable image only."
+ - string:
+ name: STABLE_TAG
+ description: "If above option is true, this is the tag to be pulled."
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ builders:
+ - shell:
+ !include-raw ./opnfv-docker.sh
+
+ triggers:
+ - pollscm: "*/30 * * * *"