-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
28 lines (27 loc) · 1.9 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
github_version=$(cat github_version.txt)
ftp_version=$(cat ftp_version.txt)
LOCALPATH=/var/lib/jenkins/workspace/grafana-releases
BINPATH=$LOCALPATH/grafana/bin/linux-ppc64le
if [ $github_version != $ftp_version ]
then
cd $LOCALPATH
git clone https://$USERNAME:[email protected]/Unicamp-OpenPower/repository-scrips.git
cd repository-scrips/
chmod +x empacotar-deb.sh
chmod +x empacotar-rpm.sh
sudo mv empacotar-deb.sh $BINPATH
sudo mv empacotar-rpm.sh $BINPATH
cd $BINPATH
sudo ./empacotar-deb.sh grafana-cli grafana-$github_version-cli $github_version " "
sudo ./empacotar-deb.sh grafana-server grafana-$github_version-server $github_version " "
sudo ./empacotar-rpm.sh grafana-cli grafana-$github_version-cli $github_version " " "The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More"
sudo ./empacotar-rpm.sh grafana-server grafana-$github_version-server $github_version " " "The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More"
if [ $github_version > $ftp_version ]
then
lftp -c "open -u $USER,$PASS ftp://oplab9.parqtec.unicamp.br; put -O /repository/debian/ppc64el/grafana/ /var/lib/jenkins/workspace/grafana-releases/grafana/bin/linux-ppc64le/grafana-cli-$github_version-ppc64le.deb"
lftp -c "open -u $USER,$PASS ftp://oplab9.parqtec.unicamp.br; put -O /repository/debian/ppc64el/grafana/ /var/lib/jenkins/workspace/grafana-releases/grafana/bin/linux-ppc64le/grafana-server-$github_version-ppc64le.deb"
sudo lftp -c "open -u $USER,$PASS ftp://oplab9.parqtec.unicamp.br; put -O /repository/rpm/ppc64le/grafana/ ~/rpmbuild/RPMS/ppc64le/grafana-cli-$github_version-1.ppc64le.rpm"
sudo lftp -c "open -u $USER,$PASS ftp://oplab9.parqtec.unicamp.br; put -O /repository/rpm/ppc64le/grafana/ ~/rpmbuild/RPMS/ppc64le/grafana-server-$github_version-1.ppc64le.rpm"
fi
fi