File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ pipeline {
16
16
GITHUB_TOKEN = credentials(' 498b4638-2d02-4ce5-832d-8a57d01d97ab' )
17
17
GITLAB_TOKEN = credentials(' b6f0f1dd-6952-4cf6-95d1-9c06380283f0' )
18
18
GITLAB_NAMESPACE = credentials(' gitlab-namespace-id' )
19
+ DOCKERHUB_TOKEN = credentials(' docker-hub-ci-pat' )
19
20
EXT_RELEASE_TYPE = ' pip_version'
20
21
EXT_PIP = ' python-ldap'
21
22
BUILD_VERSION_ARG = ' LDAP_VERSION'
@@ -390,13 +391,13 @@ pipeline {
390
391
echo "Syncing readme to Docker Hub"
391
392
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/README.lite"
392
393
fi
393
- DH_TOKEN=$(curl -d '{"username":"'${DOCKERUSER}'", "password":"'${DOCKERPASS }'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
394
+ DH_TOKEN=$(curl -d '{"username":"'${DOCKERUSER}'", "password":"'${DOCKERHUB_TOKEN }'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
394
395
curl -s \
395
396
-H "Authorization: JWT ${DH_TOKEN}" \
396
397
-H "Content-Type: application/json" \
397
398
-X PATCH \
398
- -d "{\" full_description\" :$(jq -Rsa . ${DH_README_SYNC_PATH})}" \
399
- https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE}
399
+ -d "{\\ "full_description\ \ ":$(jq -Rsa . ${DH_README_SYNC_PATH})}" \
400
+ https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE} || :
400
401
else
401
402
echo "Not the default Github branch. Skipping readme sync to Docker Hub."
402
403
fi
You can’t perform that action at this time.
0 commit comments