diff options
author | Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org> | 2017-03-29 13:08:25 -0500 |
---|---|---|
committer | Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org> | 2017-04-17 12:58:40 -0500 |
commit | 5fbe770c61ba1e2a645f706a44bbe334f473c59f (patch) | |
tree | 555b7581bdb098c28212a316b8d0cdf3bca27de2 | |
parent | 37e84f5d156daeeedba0e8ee856e2307698a027e (diff) |
Configure VPP to publish to packagecloud.io
Added a packagecloud_push script to push artifacts to the
packagecloud.io repository
Added the stream-parameter and packagecloud_push script to the VPP merge
job to allow artifacts to be published to packagecloud repositories in
addition to Nexus repositories
Change-Id: I9076ee35a6d330579ba72aa19a455b3d7a22e7f5
Signed-off-by: Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
-rw-r--r-- | jjb/scripts/packagecloud_push.sh | 19 | ||||
-rw-r--r-- | jjb/vpp/include-raw-vpp-packagecloud-push.sh | 15 | ||||
-rw-r--r-- | jjb/vpp/vpp.yaml | 11 |
3 files changed, 28 insertions, 17 deletions
diff --git a/jjb/scripts/packagecloud_push.sh b/jjb/scripts/packagecloud_push.sh new file mode 100644 index 000000000..805cf1296 --- /dev/null +++ b/jjb/scripts/packagecloud_push.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# PCIO_CO is a Jenkins Global Environment variable + +FACTER_OS=$(/usr/bin/facter operatingsystem) + +case "$FACTER_OS" in + Ubuntu) + FACTER_LSBNAME=$(/usr/bin/facter lsbdistcodename) + DEBS=$(find . -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 . -type f -iregex '.*/.*\.\(s\)?rpm') + package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS} + ;; +esac diff --git a/jjb/vpp/include-raw-vpp-packagecloud-push.sh b/jjb/vpp/include-raw-vpp-packagecloud-push.sh deleted file mode 100644 index 8908d09c5..000000000 --- a/jjb/vpp/include-raw-vpp-packagecloud-push.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ "${OS}" == "ubuntu1404" ]; then - DEBS=$(find . -type f -iname '*.deb') - package_cloud push fdio/test/ubuntu/trusty/main ${DEBS} -elif [ "${OS}" == "ubuntu1604" ]; then - DEBS=$(find . -type f -iname '*.deb') - package_cloud push fdio/test/ubuntu/xenial/main ${DEBS} -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') - package_cloud push fdio/test/el/7/os/x86_64/ ${RPMS} ${SRPMS} ${SRCRPMS} -fi
\ No newline at end of file diff --git a/jjb/vpp/vpp.yaml b/jjb/vpp/vpp.yaml index 36e12c0b1..22c6196d3 100644 --- a/jjb/vpp/vpp.yaml +++ b/jjb/vpp/vpp.yaml @@ -215,6 +215,8 @@ maven: 'mvn33-new' - maven-exec: maven-version: 'mvn33-new' + - stream-parameter: + stream: '{stream}' - repo-name-parameter: repo-name: '{repo-stream-part}.{repo-os-part}' @@ -254,6 +256,10 @@ !include-raw-escape: - ../scripts/maven_push_functions.sh - include-raw-vpp-maven-push.sh + - shell: + !include-raw-escape: + - ../scripts/packagecloud_push.sh + publishers: - archive: artifacts: 'build-root/*.rpm,build-root/*.deb,dpdk/*.rpm,dpdk/*.deb' @@ -692,6 +698,8 @@ branch: '{branch}' - os-parameter: os: '{os}' + - stream-parameter: + stream: '{stream}' - repo-name-parameter: repo-name: '{repo-stream-part}.{repo-os-part}' @@ -728,7 +736,7 @@ - include-raw-vpp-build.sh - shell: !include-raw-escape: - - include-raw-vpp-packagecloud-push.sh + - ../scripts/packagecloud_push.sh publishers: - archive: @@ -739,4 +747,3 @@ default-excludes: false - fdio-infra-shiplogs: maven-version: 'mvn33-new' - |