Merge "Create script to automate deployment"
[ci-management.git] / jjb / vpp / include-raw-vpp-maven-push.sh
1 #!/bin/bash
2
3 # Copyright 2015,2016 The Linux Foundation
4 #           2015,2016 Cisco Systems
5
6 set -xe -o pipefail
7 echo "*******************************************************************"
8 echo "* STARTING PUSH OF PACKAGES TO REPOS"
9 echo "* NOTHING THAT HAPPENS BELOW THIS POINT IS RELATED TO BUILD FAILURE"
10 echo "*******************************************************************"
11
12 source ../scripts/maven_push_functions.sh
13
14 # Determine the path to maven
15 if [ -z "${MAVEN_SELECTOR}" ]; then
16     echo "ERROR: No Maven install detected!"
17     exit 1
18 fi
19
20 if [ "${OS}" == "ubuntu1404" ]; then
21     # Find the files
22     JARS=$(find . -type f -iname '*.jar')
23     DEBS=$(find . -type f -iname '*.deb')
24     for i in $JARS
25     do
26         push_jar "$i"
27     done
28
29     for i in $DEBS
30     do
31         push_deb "$i"
32     done
33 elif [ "${OS}" == "ubuntu1604" ]; then
34     DEBS=$(find . -type f -iname '*.deb')
35     for i in $DEBS
36     do
37         push_deb "$i"
38     done
39 elif [ "${OS}" == "centos7" ]; then
40     # Find the files
41     RPMS=$(find . -type f -iname '*.rpm')
42     SRPMS=$(find . -type f -iname '*.srpm')
43     SRCRPMS=$(find . -type f -name '*.src.rpm')
44     for i in $RPMS $SRPMS $SRCRPMS
45     do
46         push_rpm "$i"
47     done
48 fi
49 # vim: ts=4 sw=4 sts=4 et ft=sh :