Use 'lftools deploy archives' for log upload
[ci-management.git] / jjb / hicn / include-raw-hicn-maven-push.sh
1 #!/bin/bash
2 set -xe -o pipefail
3 echo "*******************************************************************"
4 echo "* STARTING PUSH OF PACKAGES TO REPOS"
5 echo "* NOTHING THAT HAPPENS BELOW THIS POINT IS RELATED TO BUILD FAILURE"
6 echo "*******************************************************************"
7
8 [ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn"
9 GROUP_ID="io.fd.${PROJECT}"
10 BASEURL="${NEXUSPROXY}/content/repositories/fd.io."
11 BASEREPOID='fdio-'
12
13 if [ "${OS}" == "ubuntu1604" ]; then
14     # Find the files
15     JARS=$(find . -type f -iname '*.jar')
16     DEBS=$(find . -type f -iname '*.deb')
17     for i in $JARS
18     do
19         push_jar "$i"
20     done
21
22     for i in $DEBS
23     do
24         push_deb "$i"
25     done
26 elif [ "${OS}" == "ubuntu1804" ]; then
27     # Find the files
28     JARS=$(find . -type f -iname '*.jar')
29     DEBS=$(find . -type f -iname '*.deb')
30     for i in $JARS
31     do
32         push_jar "$i"
33     done
34
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