summaryrefslogtreecommitdiffstats
path: root/container
diff options
context:
space:
mode:
authorDan Mick <dan.mick@redhat.com>2024-11-21 03:23:50 +0100
committerDan Mick <dan.mick@redhat.com>2024-12-04 01:38:51 +0100
commit18d14b22f31c65ad3db79c7930a841157b68deee (patch)
tree937227f47ddf9ac717076d8de292d4667e2a971e /container
parentcontainer/Containerfile: purge .repo files with secrets before commit (diff)
downloadceph-18d14b22f31c65ad3db79c7930a841157b68deee.tar.xz
ceph-18d14b22f31c65ad3db79c7930a841157b68deee.zip
container/Containerfile: allow failure from curl to stop build
curl doesn't actually fail unless -f is used; also, add some sh -e flags. Signed-off-by: Dan Mick <dan.mick@redhat.com>
Diffstat (limited to 'container')
-rw-r--r--container/Containerfile12
1 files changed, 6 insertions, 6 deletions
diff --git a/container/Containerfile b/container/Containerfile
index ff414e39d39..8a0e90dcf1a 100644
--- a/container/Containerfile
+++ b/container/Containerfile
@@ -65,25 +65,25 @@ RUN \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo
# ISCSI repo
-RUN set -x && \
+RUN set -ex && \
curl -s -L https://shaman.ceph.com/api/repos/tcmu-runner/main/latest/centos/9/repo?arch=$(arch) -o /etc/yum.repos.d/tcmu-runner.repo && \
case "${CEPH_REF}" in \
quincy|reef) \
- curl -s -L https://download.ceph.com/ceph-iscsi/3/rpm/el9/ceph-iscsi.repo -o /etc/yum.repos.d/ceph-iscsi.repo ;\
+ curl -fs -L https://download.ceph.com/ceph-iscsi/3/rpm/el9/ceph-iscsi.repo -o /etc/yum.repos.d/ceph-iscsi.repo ;\
;;\
main|*) \
- curl -s -L https://shaman.ceph.com/api/repos/ceph-iscsi/main/latest/centos/9/repo -o /etc/yum.repos.d/ceph-iscsi.repo ;\
+ curl -fs -L https://shaman.ceph.com/api/repos/ceph-iscsi/main/latest/centos/9/repo -o /etc/yum.repos.d/ceph-iscsi.repo ;\
;;\
esac
# Ceph repo
-RUN set -x && \
+RUN set -ex && \
rpm --import 'https://download.ceph.com/keys/release.asc' && \
ARCH=$(arch); if [ "${ARCH}" == "aarch64" ]; then ARCH="arm64"; fi ;\
IS_RELEASE=0 ;\
if [[ "${CI_CONTAINER}" == "true" ]] ; then \
# TODO: this can return different ceph builds (SHA1) for x86 vs. arm runs. is it important to fix?
- REPO_URL=$(curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/9/${ARCH}&flavor=${OSD_FLAVOR}&ref=${CEPH_REF}&sha1=latest" | jq -r .[0].url) ;\
+ REPO_URL=$(curl -fs "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/9/${ARCH}&flavor=${OSD_FLAVOR}&ref=${CEPH_REF}&sha1=latest" | jq -r .[0].url) ;\
else \
IS_RELEASE=1 ;\
REPO_URL="https://${PRERELEASE_USERNAME}:${PRERELEASE_PASSWORD}@download.ceph.com/prerelease/ceph/rpm-${CEPH_REF}/el9/" ;\
@@ -195,7 +195,7 @@ RUN \
grep -sqo "obtain_device_list_from_udev = 0" /etc/lvm/lvm.conf
# CLEAN UP!
-RUN set -x && \
+RUN set -ex && \
dnf clean all && \
rm -rf /var/cache/dnf/* && \
rm -rf /var/lib/dnf/* && \