From: Dan Mick Date: Wed, 26 May 2021 19:47:36 +0000 (+0000) Subject: monitoring/grafana/build/Makefile: use --authfile X-Git-Tag: v17.1.0~1764^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b56ff43232420b186e597c245d20d3f4fab70581;p=ceph.git monitoring/grafana/build/Makefile: use --authfile podman login caches auth tokens in auth.json; for sudo, it may be placed in /run/containers/0 or it may be in /run/users/0/containers; the latter directory is removed when root "logs out", which isn't clear what it means with sudo/su. Several builds failed because they couldn't find the cached auth between sudo podman login and sudo podman push. Sidestep the confusion by just using a local file for the auth cache. Signed-off-by: Dan Mick --- diff --git a/monitoring/grafana/build/Makefile b/monitoring/grafana/build/Makefile index 46b1f25c39a..ed641bb102f 100755 --- a/monitoring/grafana/build/Makefile +++ b/monitoring/grafana/build/Makefile @@ -74,14 +74,15 @@ providers: \\n\ push: sudo podman tag ${LOCALTAG} docker.io/${TAG} sudo podman tag ${LOCALTAG} quay.io/${TAG} - sudo podman login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD} docker.io - sudo podman login -u $(CONTAINER_REPO_USERNAME) -p $(CONTAINER_REPO_PASSWORD) quay.io - sudo podman push --format v2s2 docker.io/${TAG} - sudo podman push --format v2s2 quay.io/${TAG} + # sudo podman has issues with auth.json; just override it + sudo podman login --authfile=auth.json -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD} docker.io + sudo podman login --authfile=auth.json -u $(CONTAINER_REPO_USERNAME) -p $(CONTAINER_REPO_PASSWORD) quay.io + sudo podman push --authfile=auth.json --format v2s2 docker.io/${TAG} + sudo podman push --authfile=auth.json --format v2s2 quay.io/${TAG} clean: sudo podman rmi ${LOCALTAG} || true sudo podman rmi docker.io/${TAG} || true sudo podman rmi quay.io/${TAG} || true - rm -f grafana-*.rpm* + rm -f grafana-*.rpm* auth.json rm -f ${DASHBOARD_PROVISIONING}