summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-01-22 14:07:55 +0100
committerMauro Sardara <msardara@cisco.com>2019-01-22 14:14:15 +0100
commit5c32a0ffcffa1cb0dfc017b8b2fe5a2e9759af29 (patch)
tree42b52f9989c755e264a39712d3d0d801f19820b5
parent8b00f8a9c2eda66af203a63317bd28069142ddf0 (diff)
[HICN-3] Added first jjb configuration for hicn.
Change-Id: I6d44b8c2b59edb5ba75c64aef50b79a2345605a3 Signed-off-by: Mauro Sardara <msardara@cisco.com>
-rw-r--r--jjb/hicn/hicn.yaml173
-rw-r--r--jjb/hicn/include-raw-hicn-build.sh7
-rw-r--r--jjb/hicn/include-raw-hicn-checkstyle.sh7
-rw-r--r--jjb/hicn/include-raw-hicn-maven-push.sh48
4 files changed, 235 insertions, 0 deletions
diff --git a/jjb/hicn/hicn.yaml b/jjb/hicn/hicn.yaml
new file mode 100644
index 000000000..5f334c8ea
--- /dev/null
+++ b/jjb/hicn/hicn.yaml
@@ -0,0 +1,173 @@
+---
+- project:
+ name: hicn
+ jobs:
+ - 'hicn-verify-{stream}-{os}'
+ - 'hicn-merge-{stream}-{os}'
+
+ project: 'hicn'
+ os:
+ - ubuntu1804:
+ repo-os-part: 'ubuntu.bionic.main'
+ - ubuntu1604:
+ repo-os-part: 'ubuntu.xenial.main'
+ - centos7:
+ repo-os-part: 'centos7'
+
+ stream:
+ - master:
+ branch: 'master'
+ repo-stream-part: 'master'
+
+ type:
+ - short
+ - long
+
+- job-template:
+ name: 'hicn-verify-{stream}-{os}'
+
+ project-type: freestyle
+ node: '{os}-us'
+ concurrent: true
+
+ build-discarder:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: 100
+ 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}'
+ - repo-name-parameter:
+ repo-name: '{repo-stream-part}.{repo-os-part}'
+ - stream-parameter:
+ stream: '{stream}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: 'jenkins-gerrit-credentials'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - fdio-infra-wrappers:
+ build-timeout: 120
+
+ triggers:
+ - gerrit-trigger-checkstyle:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - shell:
+ !include-raw-escape:
+ - include-raw-hicn-build.sh
+
+ publishers:
+ - archive:
+ artifacts: >
+ **/build/*.rpm,
+ **/build/*.deb
+ allow-empty: 'true'
+ fingerprint: false
+ only-if-success: true
+ default-excludes: false
+ - fdio-infra-shiplogs:
+ maven-version: 'mvn33-new'
+
+- job-template:
+ name: 'hicn-merge-{stream}-{os}'
+
+ project-type: freestyle
+ node: '{os}-us'
+
+ build-discarder:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: 100
+ 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}'
+ - maven-project-parameter:
+ maven: 'mvn33-new'
+ - maven-exec:
+ maven-version: 'mvn33-new'
+ - stream-parameter:
+ stream: '{stream}'
+ - repo-name-parameter:
+ repo-name: '{repo-stream-part}.{repo-os-part}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: 'jenkins-gerrit-credentials'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - fdio-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-merged:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - config-file-provider:
+ files:
+ - file-id: '.packagecloud'
+ target: '/root'
+ - config-file-provider:
+ files:
+ - file-id: 'packagecloud_api'
+ target: '/root'
+ - maven-target:
+ maven-version: 'mvn33-new'
+ goals: '--version'
+ settings: 'hicn-settings'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+ - shell:
+ !include-raw-escape:
+ - include-raw-hicn-checkstyle.sh
+ - shell:
+ !include-raw-escape:
+ - include-raw-hicn-build.sh
+ - provide-maven-settings:
+ settings-file: 'hicn-settings'
+ global-settings-file: 'global-settings'
+ - shell:
+ !include-raw-escape:
+ - ../scripts/packagecloud_push.sh
+ - shell:
+ !include-raw-escape:
+ - ../scripts/maven_push_functions.sh
+ - include-raw-hicn-maven-push.sh
+
+ publishers:
+ - archive:
+ artifacts: >
+ **/build/*.rpm,
+ **/build/*.deb
+ allow-empty: 'true'
+ fingerprint: false
+ only-if-success: true
+ default-excludes: false
+ - fdio-infra-shiplogs:
+ maven-version: 'mvn33-new'
+ - naginator:
+ rerun-unstable-builds: false
+ max-failed-builds: 1
+ fixed-delay: 90
diff --git a/jjb/hicn/include-raw-hicn-build.sh b/jjb/hicn/include-raw-hicn-build.sh
new file mode 100644
index 000000000..e1d20a48e
--- /dev/null
+++ b/jjb/hicn/include-raw-hicn-build.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# basic build script example
+set -euxo pipefail
+
+pushd scripts
+bash ./build-packages.sh
+popd
diff --git a/jjb/hicn/include-raw-hicn-checkstyle.sh b/jjb/hicn/include-raw-hicn-checkstyle.sh
new file mode 100644
index 000000000..636590e7a
--- /dev/null
+++ b/jjb/hicn/include-raw-hicn-checkstyle.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ -f ./scripts/checkstyle.sh ];then
+ bash scripts/checkstyle.sh
+else
+ echo "Cannot find scripts/checkstyle.sh - skipping checkstyle"
+fi
diff --git a/jjb/hicn/include-raw-hicn-maven-push.sh b/jjb/hicn/include-raw-hicn-maven-push.sh
new file mode 100644
index 000000000..6e3c9a86e
--- /dev/null
+++ b/jjb/hicn/include-raw-hicn-maven-push.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+set -xe -o pipefail
+echo "*******************************************************************"
+echo "* STARTING PUSH OF PACKAGES TO REPOS"
+echo "* NOTHING THAT HAPPENS BELOW THIS POINT IS RELATED TO BUILD FAILURE"
+echo "*******************************************************************"
+
+[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn"
+GROUP_ID="io.fd.${PROJECT}"
+BASEURL="${NEXUSPROXY}/content/repositories/fd.io."
+BASEREPOID='fdio-'
+
+if [ "${OS}" == "ubuntu1604" ]; then
+ # Find the files
+ JARS=$(find . -type f -iname '*.jar')
+ DEBS=$(find . -type f -iname '*.deb')
+ for i in $JARS
+ do
+ push_jar "$i"
+ done
+
+ for i in $DEBS
+ do
+ push_deb "$i"
+ done
+elif [ "${OS}" == "ubuntu1804" ]; then
+ # Find the files
+ JARS=$(find . -type f -iname '*.jar')
+ DEBS=$(find . -type f -iname '*.deb')
+ for i in $JARS
+ do
+ push_jar "$i"
+ done
+
+ for i in $DEBS
+ do
+ push_deb "$i"
+ done
+elif [ "${OS}" == "centos7" ]; then
+ # Find the files
+ RPMS=$(find . -type f -iname '*.rpm')
+ SRPMS=$(find . -type f -iname '*.srpm')
+ SRCRPMS=$(find . -type f -name '*.src.rpm')
+ for i in $RPMS $SRPMS $SRCRPMS
+ do
+ push_rpm "$i"
+ done
+fi