--- /dev/null
+#!/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 :
--- /dev/null
+#!/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
name: jvpp
jobs:
- 'jvpp-verify-{stream}-{os}'
+ - 'jvpp-merge-{stream}-{os}'
project: 'jvpp'
os:
- ubuntu1604:
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]'