-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unify docker build and push In order to pass cloudops image verification we need to print the image digest in the log. The digest is printed as a part of `docker push` or `docker pull` (it's a part of registry specification). * Better condition
Rail Aliiev
authored and
Rok Garbas
committed
Jun 6, 2019
1 parent
f83f9b9
commit ed51b34
Showing
2 changed files
with
105 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
test $IMAGE_TASK_ID | ||
test $SECRET_URL | ||
test $DOCKERHUB_EMAIL | ||
test $DOCKERHUB_USER | ||
test $TAG | ||
|
||
dockerhub_password=$(curl $SECRET_URL | python -c 'import json, sys; a = json.load(sys.stdin); print a["secret"]["docker"]["password"]') | ||
|
||
WORKDIR=$(mktemp -d) | ||
cd $WORKDIR | ||
|
||
curl -L -o image.tar https://queue.taskcluster.net/v1/task/$IMAGE_TASK_ID/artifacts/public/image.tar | ||
docker load < image.tar | ||
docker login -e $DOCKERHUB_EMAIL -u $DOCKERHUB_USER -p $dockerhub_password | ||
docker push $TAG |