Add the demo git to the build. 21/3821/4
authorJerry Flood <jf9860@att.com>
Tue, 2 May 2017 20:00:03 +0000 (16:00 -0400)
committerJerry Flood <jf9860@att.com>
Wed, 3 May 2017 15:48:42 +0000 (11:48 -0400)
robot repo should use demo repo as a submodule instead of a copy of their
stuff. Coordination is needed between demo

Also move the shell script out of the template as per review

Issue: TEST-14
Change-Id: I0c1d8d9d3b1317d1c099c8fdaafa389af71d7b60
Signed-off-by: Jerry Flood <jf9860@att.com>
jjb/global-templates-python.yaml
jjb/testsuite/testsuite-docker.sh [new file with mode: 0644]
jjb/testsuite/testsuite.yaml

index 63f6131..d787b38 100644 (file)
 
       - docker-login
 
 
       - docker-login
 
-      - shell: |
-          cp $WORKSPACE/docker/* .
-          docker -D build -t openecomp/testsuite .
-          export REPO="nexus3.onap.org:10003"
-          for tag in $tags
-          do
-              docker tag openecomp/testsuite:latest $REPO/openecomp/testsuite:$tag
-              docker push $REPO/openecomp/testsuite:$tag
-          done
+      - shell: '{script}'
+
+    publishers:
+      - infra-shiplogs:
+          maven-version: '{maven-version}'
+
+- job-template:
+    name: '{project-name}-{stream}-3scm-docker-shell-daily'
+    project-type: freestyle
+    node: 'ubuntu1604-docker-8c-8g'
+
+    properties:
+      - infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+      - maven-exec:
+          maven-version: '{maven-version}'
+
+    scm:
+      - gerrit-trigger-scm:
+          refspec: ''
+          choosing-strategy: 'default'
+      - git-extra-project:
+          project: '{extra-project1}'
+          refspec: '{extra-refspec1}'
+          branch: '{extra-branch1}'
+          checkout-dir: '{checkout-dir1}'
+      - git-extra-project:
+          project: '{extra-project2}'
+          refspec: '{extra-refspec2}'
+          branch: '{extra-branch2}'
+          checkout-dir: '{checkout-dir2}'
+      - git-extra-project:
+          project: '{extra-project3}'
+          refspec: '{extra-refspec3}'
+          branch: '{extra-branch3}'
+          checkout-dir: '{checkout-dir3}'
+
+    wrappers:
+      - infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    triggers:
+      # 12 AM UTC
+      - timed: 'H 12 * * *'
+      - gerrit-trigger-release-manually:
+          server: '{server-name}'
+          project: '{project}'
+          branch: '{branch}'
+
+    builders:
+
+      - provide-maven-settings:
+          global-settings-file: 'global-settings'
+          settings-file: '{mvn-settings}'
+
+      - inject:
+          properties-file: version.properties
+
+      - docker-login
+
+      - shell: '{script}'
 
     publishers:
       - infra-shiplogs:
           maven-version: '{maven-version}'
 
     publishers:
       - infra-shiplogs:
           maven-version: '{maven-version}'
+
diff --git a/jjb/testsuite/testsuite-docker.sh b/jjb/testsuite/testsuite-docker.sh
new file mode 100644 (file)
index 0000000..33eea4f
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+echo '============== CALLING SCRIPT TO CREATE DOCKER IMAGES ================='
+cp $WORKSPACE/docker/* .
+docker -D build -t openecomp/testsuite .
+export REPO="nexus3.onap.org:10003"
+for tag in $tags
+do
+  docker tag openecomp/testsuite:latest $REPO/openecomp/testsuite:$tag
+  docker push $REPO/openecomp/testsuite:$tag
+done
index d9d8831..80897db 100644 (file)
@@ -3,7 +3,9 @@
     name: testsuite
     project-name: 'testsuite'
     jobs:
     name: testsuite
     project-name: 'testsuite'
     jobs:
-      - '{project-name}-{stream}-2scm-docker-shell-daily'
+      - '{project-name}-{stream}-3scm-docker-shell-daily':
+          script:
+            !include-raw-escape: 'testsuite-docker.sh'
 
     project: 'testsuite'
     extra-project1: 'testsuite/python-testing-utils'
 
     project: 'testsuite'
     extra-project1: 'testsuite/python-testing-utils'
     extra-refspec2: 'refs/heads/{branch}'
     checkout-dir2: 'testsuite/heatbridge'
 
     extra-refspec2: 'refs/heads/{branch}'
     checkout-dir2: 'testsuite/heatbridge'
 
+    extra-project3: 'demo'
+    extra-branch3: 'master'
+    extra-refspec3: 'refs/heads/{branch}'
+    checkout-dir3: 'demo'
+
     stream:
       - 'master':
           branch: 'master'
     stream:
       - 'master':
           branch: 'master'