Skip to content

Commit

Permalink
Tweak trigger build script
Browse files Browse the repository at this point in the history
  • Loading branch information
thuandt committed Dec 23, 2019
1 parent 54c67ff commit d8abbb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger-docker-hub-build:
image: alpine:latest
script:
- apk add --update curl
- apk add --update curl jq
- sh trigger-build.sh
only:
- web
Expand Down
16 changes: 10 additions & 6 deletions trigger-build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/sh

for t in 2 2.7 3 3.6 3.7; do
curl --silent \
--request POST \
--header "Content-Type:application/json" \
--data "{\"dockerfile\":\"/$t\",\"source_name\":\"master\",\"source_type\":\"Branch\",\"docker_tag\":\"$t\"}" \
--url "${DOCKER_HUB_TRIGGER_URL}"
set -eou pipefail

for t in 2 2.7 3 3.6 3.7 3.8; do
echo "Send build request for Python ${t} to Docker Hub..."
curl --silent \
--request POST \
--header "Content-Type:application/json" \
--data "{\"dockerfile\":\"/$t\",\"source_name\":\"master\",\"source_type\":\"Branch\",\"docker_tag\":\"$t\"}" \
--url "${DOCKER_HUB_TRIGGER_URL}" | jq .state
echo
done

0 comments on commit d8abbb9

Please sign in to comment.