File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,9 @@ cmd_publish() {
214
214
215
215
# log into docker
216
216
DOCKER_USERNAME=${DOCKER_USERNAME:- airbytebot}
217
+ set +x
217
218
DOCKER_TOKEN=$( curl -s -H " Content-Type: application/json" -X POST -d ' {"username": "' ${DOCKER_USERNAME} ' ", "password": "' ${DOCKER_PASSWORD} ' "}' https://hub.docker.com/v2/users/login/ | jq -r .token)
219
+ set -x
218
220
219
221
echo " image_name $image_name "
220
222
echo " versioned_image $versioned_image "
@@ -278,7 +280,9 @@ cmd_publish() {
278
280
local arch_versioned_tag=` echo $arch | sed " s/\//-/g" ` -$image_version
279
281
echo " deleting temporary tag: ${image_name} /tags/${arch_versioned_tag} "
280
282
TAG_URL=" https://hub.docker.com/v2/repositories/${image_name} /tags/${arch_versioned_tag} /" # trailing slash is needed!
283
+ set +x
281
284
curl -X DELETE -H " Authorization: JWT ${DOCKER_TOKEN} " " $TAG_URL "
285
+ set -x
282
286
done
283
287
284
288
fi
@@ -289,7 +293,9 @@ cmd_publish() {
289
293
290
294
# To work for private repos we need a token as well
291
295
TAG_URL=" https://hub.docker.com/v2/repositories/${image_name} /tags/${image_version} "
296
+ set +x
292
297
DOCKERHUB_RESPONSE_CODE=$( curl --silent --output /dev/null --write-out " %{http_code}" -H " Authorization: JWT ${DOCKER_TOKEN} " ${TAG_URL} )
298
+ set -x
293
299
if [[ " ${DOCKERHUB_RESPONSE_CODE} " == " 404" ]]; then
294
300
echo " Tag ${image_version} was not registered on DockerHub for image ${image_name} , please try to bump the version again." && exit 1
295
301
fi
You can’t perform that action at this time.
0 commit comments