Create generic jenkins job to build and push a docker image
[releng.git] / jjb / opnfv / opnfv-docker.yml
similarity index 66%
rename from jjb/functest/functest-docker.yml
rename to jjb/opnfv/opnfv-docker.yml
index ee5adc6..dfff050 100644 (file)
@@ -1,15 +1,17 @@
 ##############################################
-# job configuration for functest docker build
+# job configuration for docker build and push
 ##############################################
 
 - project:
 
-    name: functest-docker
+    name: opnfv-docker
 
-    project: 'functest'
+    project:
+        - 'functest'
+        - 'yardstick'
 
     jobs:
-        - 'functest-docker-build-push-{stream}'
+        - '{project}-docker-build-push-{stream}'
 
     stream:
         - master:
@@ -18,9 +20,8 @@
 ########################
 # job templates
 ########################
-
 - job-template:
-    name: 'functest-docker-build-push-{stream}'
+    name: '{project}-docker-build-push-{stream}'
 
     project-type: freestyle
 
     parameters:
         - project-parameter:
             project: '{project}'
-        - functest-docker-parameter
-
+        - 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:
 
     builders:
         - shell:
-            !include-raw ./functest-docker.sh
+            !include-raw ./opnfv-docker.sh
 
     triggers:
         - pollscm: "*/30 * * * *"
-
-
-########################
-# parameter macros
-########################
-- parameter:
-    name: functest-docker-parameter
-    parameters:
-        - 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."