diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-02-11 13:48:18 +0100 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-02-15 10:19:10 +0100 |
commit | afa8332ca87a5ee1728ff0f438224ee466406a6d (patch) | |
tree | 83f49c5f91d37691b985f79e2bb5cf70efd12c73 /jjb | |
parent | ad682cc1bcc04b8ea27f1e535c45240702769a7c (diff) |
JVPP-22: introducing jvpp merge job
Change-Id: I77627860800bed6568c964d713596d9a0bd18fc7
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'jjb')
-rwxr-xr-x[-rw-r--r--] | jjb/jvpp/include-raw-jvpp-build.sh | 0 | ||||
-rwxr-xr-x | jjb/jvpp/include-raw-jvpp-maven-push.sh | 49 | ||||
-rwxr-xr-x | jjb/jvpp/include-raw-jvpp-packetcloud-push.sh | 26 | ||||
-rw-r--r-- | jjb/jvpp/jvpp.yaml | 99 |
4 files changed, 174 insertions, 0 deletions
diff --git a/jjb/jvpp/include-raw-jvpp-build.sh b/jjb/jvpp/include-raw-jvpp-build.sh index 7a0a5fa71..7a0a5fa71 100644..100755 --- a/jjb/jvpp/include-raw-jvpp-build.sh +++ b/jjb/jvpp/include-raw-jvpp-build.sh diff --git a/jjb/jvpp/include-raw-jvpp-maven-push.sh b/jjb/jvpp/include-raw-jvpp-maven-push.sh new file mode 100755 index 000000000..6554a58c2 --- /dev/null +++ b/jjb/jvpp/include-raw-jvpp-maven-push.sh @@ -0,0 +1,49 @@ +#!/bin/bash +set -xe -o pipefail +echo "*******************************************************************" +echo "* STARTING PUSH OF JVPP 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 ./java -type f -iname '*.jar') + DEBS=$(find ./build-root/packages/ -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 ./java -type f -iname '*.jar') + DEBS=$(find ./build-root/packages/ -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 ./build-root/packages/ -type f -iname '*.rpm') + SRPMS=$(find ./build-root/packages/ -type f -iname '*.srpm') + SRCRPMS=$(find ./build-root/packages/ -type f -name '*.src.rpm') + for i in $RPMS $SRPMS $SRCRPMS + do + push_rpm "$i" + done +fi +# vim: ts=4 sw=4 sts=4 et ft=sh : diff --git a/jjb/jvpp/include-raw-jvpp-packetcloud-push.sh b/jjb/jvpp/include-raw-jvpp-packetcloud-push.sh new file mode 100755 index 000000000..2917606cc --- /dev/null +++ b/jjb/jvpp/include-raw-jvpp-packetcloud-push.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# PCIO_CO is a Jenkins Global Environment variable + +set -x + +echo "STARTING JVPP PACKAGECLOUD PUSH" + +sleep 10 + +FACTER_OS=$(/usr/bin/facter operatingsystem) + +if [ -f ~/.packagecloud ]; then + case "$FACTER_OS" in + Ubuntu) + FACTER_LSBNAME=$(/usr/bin/facter lsbdistcodename) + DEBS=$(find ./build-root/packages/ -type f -iname '*.deb') + package_cloud push "${PCIO_CO}/${STREAM}/ubuntu/${FACTER_LSBNAME}/main/" ${DEBS} + ;; + CentOS) + FACTER_OSMAJREL=$(/usr/bin/facter operatingsystemmajrelease) + FACTER_ARCH=$(/usr/bin/facter architecture) + RPMS=$(find ./build-root/packages/ -type f -iregex '.*/.*\.\(s\)?rpm') + package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS} + ;; + esac +fi diff --git a/jjb/jvpp/jvpp.yaml b/jjb/jvpp/jvpp.yaml index 1a99ed2cb..a526bd1aa 100644 --- a/jjb/jvpp/jvpp.yaml +++ b/jjb/jvpp/jvpp.yaml @@ -3,6 +3,7 @@ name: jvpp jobs: - 'jvpp-verify-{stream}-{os}' + - 'jvpp-merge-{stream}-{os}' project: 'jvpp' os: - ubuntu1604: @@ -84,9 +85,107 @@ fingerprint: false only-if-success: true default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + archive-artifacts: '/tmp/jvpp-failed-unittests/*/* **/core' - naginator: rerun-unstable-builds: false max-failed-builds: 2 fixed-delay: 90 - email-notification: email-prefix: '[jvpp]' + +- job-template: + name: 'jvpp-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}' + - reverse: + jobs: 'vpp-merge-{stream}-{os}' + result: 'success' + + 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: 'vpp-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - ../scripts/setup_jvpp_dev_env.sh + - include-raw-jvpp-build.sh + - provide-maven-settings: + settings-file: 'jvpp-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ./include-raw-jvpp-packetcloud-push.sh + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-jvpp-maven-push.sh + + publishers: + - archive: + artifacts: > + **/build-root/packages/*.rpm, + **/build-root/packages/*.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 + - email-notification: + email-prefix: '[jvpp]' |