Initial nsh_sfc jjb 42/1442/3
authorEd Warnicke <eaw@cisco.com>
Tue, 7 Jun 2016 22:46:04 +0000 (17:46 -0500)
committerEd Warnicke <eaw@cisco.com>
Tue, 7 Jun 2016 23:22:30 +0000 (18:22 -0500)
Change-Id: If77fdd4778eb54b3cba683a94b3cb84d1203fd00
Signed-off-by: Ed Warnicke <eaw@cisco.com>
jjb/nsh_sfc/include-raw-nsh_sfc-build.sh [new file with mode: 0644]
jjb/nsh_sfc/nsh_sfc.yaml [new file with mode: 0644]

diff --git a/jjb/nsh_sfc/include-raw-nsh_sfc-build.sh b/jjb/nsh_sfc/include-raw-nsh_sfc-build.sh
new file mode 100644 (file)
index 0000000..1d5d27c
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+# basic build script example
+set -e -o pipefail
+# do nothing but print the current slave hostname
+hostname
+export CCACHE_DIR=/tmp/ccache
+if [ -d $CCACHE_DIR ];then
+    echo $CCACHE_DIR exists
+    du -sk $CCACHE_DIR
+else
+    echo $CCACHE_DIR does not exist.  This must be a new slave.
+fi
+
+echo "cat /etc/bootstrap.sha"
+if [ -f /etc/bootstrap.sha ];then
+    cat /etc/bootstrap.sha
+else
+    echo "Cannot find /etc/bootstrap.sha"
+fi
+
+echo "cat /etc/bootstrap-functions.sha"
+if [ -f /etc/bootstrap-functions.sha ];then
+    cat /etc/bootstrap-functions.sha
+else
+    echo "Cannot find /etc/bootstrap-functions.sha"
+fi
+
+echo "sha1sum of this script: ${0}"
+sha1sum $0
+
+scripts/ci/verify.sh
+
+echo "*******************************************************************"
+echo "* NSH_SFC BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
diff --git a/jjb/nsh_sfc/nsh_sfc.yaml b/jjb/nsh_sfc/nsh_sfc.yaml
new file mode 100644 (file)
index 0000000..605630f
--- /dev/null
@@ -0,0 +1,150 @@
+- project:
+    name: nsh_sfc
+    jobs:
+        - '{project}-verify-{stream}-{os}'
+        - '{project}-merge-{stream}-{os}'
+        - '{project}-verify-image-{stream}-{os}'
+
+    project: 'nsh_sfc'
+    os:
+        - ubuntu1404
+        - ubuntu1604
+        - centos7
+    stream:
+        - master:
+            branch: 'master'
+
+- job-template:
+    name: 'nsh_sfc-verify-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-{os}'
+    concurrent: true
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - os-parameter:
+            os: '{os}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit-trigger-patch-submitted:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - shell:
+            !include-raw-escape: include-raw-nsh_sfc-build.sh
+
+- job-template:
+    name: 'nsh_sfc-verify-image-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-image-{os}'
+    concurrent: true
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - os-parameter:
+            os: '{os}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - comment-added-contains-event:
+                    comment-contains-value: 'verify-images'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+            skip-vote:
+                successful: true
+                failed: true
+                unstable: true
+                notbuilt: true
+
+    builders:
+        - shell:
+            !include-raw-escape: include-raw-nsh_sfc-build.sh
+
+- job-template:
+    name: 'nsh_sfc-merge-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'merge-{os}'
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - os-parameter:
+            os: '{os}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit-trigger-patch-merged:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - shell:
+            !include-raw-escape: include-raw-nsh_sfc-build.sh
\ No newline at end of file