summaryrefslogtreecommitdiffstats
path: root/screwdriver
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@yahooinc.com>2022-03-29 10:13:05 +0200
committerArnstein Ressem <aressem@yahooinc.com>2022-03-29 10:13:05 +0200
commitbafbce2be95a77c385ba02b594b2577392e28cfc (patch)
tree3e9e97ad6fda9119333a08469c951628cd9b82f5 /screwdriver
parent9bced6805fe2d89f9ba316399474a831c85985ff (diff)
Fail if some RPM uploads failed.
Diffstat (limited to 'screwdriver')
-rwxr-xr-xscrewdriver/delete-old-artifactory-artifacts.sh2
-rwxr-xr-xscrewdriver/publish-unpublished-rpms-to-jfrog-cloud.sh7
-rwxr-xr-xscrewdriver/upload-rpm-to-artifactory.sh12
3 files changed, 13 insertions, 8 deletions
diff --git a/screwdriver/delete-old-artifactory-artifacts.sh b/screwdriver/delete-old-artifactory-artifacts.sh
index a08a1479a5a..9235575baff 100755
--- a/screwdriver/delete-old-artifactory-artifacts.sh
+++ b/screwdriver/delete-old-artifactory-artifacts.sh
@@ -5,7 +5,7 @@
set -euo pipefail
MAX_NUMBER_OF_RELEASES=200
-ARTIFACTORY_URL="https://artifactory.verizonmedia.com/artifactory"
+ARTIFACTORY_URL="https://artifactory.yahooinc.com/artifactory"
# JFrog Cloud repo file
if [[ ! -f /etc/yum.repos.d/vespa.repo ]]; then
diff --git a/screwdriver/publish-unpublished-rpms-to-jfrog-cloud.sh b/screwdriver/publish-unpublished-rpms-to-jfrog-cloud.sh
index bea4cd46978..4f70668e63e 100755
--- a/screwdriver/publish-unpublished-rpms-to-jfrog-cloud.sh
+++ b/screwdriver/publish-unpublished-rpms-to-jfrog-cloud.sh
@@ -27,7 +27,7 @@ if [[ ! -f /etc/yum.repos.d/vespa.repo ]]; then
cat << 'EOF' > /etc/yum.repos.d/vespa.repo
[vespa-release]
name=Vespa releases
-baseurl=https://artifactory.verizonmedia.com/artifactory/vespa/centos/7/release/$basearch
+baseurl=https://artifactory.yahooinc.com/artifactory/vespa/centos/7/release/$basearch
gpgcheck=0
enabled=1
EOF
@@ -65,6 +65,7 @@ if [[ -n $SCREWDRIVER ]] && [[ -z $SD_PULL_REQUEST ]]; then
echo "Uploading $rpm ..."
if ! $MYDIR/upload-rpm-to-artifactory.sh $rpm ; then
echo "Could not upload $rpm"
+ UPLOAD_FAILED=true
else
echo "$rpm uploaded"
fi
@@ -72,3 +73,7 @@ if [[ -n $SCREWDRIVER ]] && [[ -z $SD_PULL_REQUEST ]]; then
echo
fi
+if [[ -n $UPLOAD_FAILED ]]; then
+ echo "Some RPMs failed to upload"
+ exit 1
+fi
diff --git a/screwdriver/upload-rpm-to-artifactory.sh b/screwdriver/upload-rpm-to-artifactory.sh
index 21a38ffdb2f..9482bc2dc6a 100755
--- a/screwdriver/upload-rpm-to-artifactory.sh
+++ b/screwdriver/upload-rpm-to-artifactory.sh
@@ -16,12 +16,12 @@ main() {
exit 1
fi
- curl -vL -H "Authorization: Bearer $JFROG_API_TOKEN" \
- -H "X-Checksum-Sha1: $(sha1sum $RPM | awk '{print $1}')" \
- -H "X-Checksum-Sha256: $(sha256sum $RPM | awk '{print $1}')" \
- -H "X-Checksum-MD5: $(md5sum $RPM | awk '{print $1}')" \
- -X PUT "https://artifactory.verizonmedia.com/artifactory/vespa/$OS_DISTRO/$RELEASEVER/$MATURITY/$BASEARCH/Packages/$RPM" \
- -T $RPM
+ curl -vLf -H "Authorization: Bearer $JFROG_API_TOKEN" \
+ -H "X-Checksum-Sha1: $(sha1sum $RPM | awk '{print $1}')" \
+ -H "X-Checksum-Sha256: $(sha256sum $RPM | awk '{print $1}')" \
+ -H "X-Checksum-MD5: $(md5sum $RPM | awk '{print $1}')" \
+ -X PUT "https://artifactory.yahooinc.com/artifactory/vespa/$OS_DISTRO/$RELEASEVER/$MATURITY/$BASEARCH/Packages/$RPM" \
+ -T $RPM
}
main "$@"