-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Docker Hub Automated Build Hooks | ||
|
||
This directory contains Docker Hub [Automated Build](https://docs.docker.com/docker-hub/builds/advanced/) hooks. | ||
This is needed since we publish multiple images as part of a single build: | ||
* argoproj/workflow-controller:latest | ||
* argoproj/argoexec:latest | ||
* argoproj/argocli:latest | ||
|
||
It relies the DOCKER_REPO and DOCKER_TAG environment variables that are set by Docker Hub during | ||
the build. | ||
|
||
Hooks can be tested using: | ||
``` | ||
DOCKER_REPO=index.docker.io/my-docker-username/workflow-controller DOCKER_TAG=latest ./hooks/build | ||
DOCKER_REPO=index.docker.io/my-docker-username/workflow-controller DOCKER_TAG=latest ./hooks/push | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -e | ||
docker_org=$(echo $DOCKER_REPO | rev | cut -d / -f 2- | rev) | ||
targets="workflow-controller argoexec argocli" | ||
for target in $targets; do | ||
image_name="${docker_org}/${target}:${DOCKER_TAG}" | ||
docker build --target $target -t $image_name . | ||
done |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -e | ||
docker_org=$(echo $DOCKER_REPO | rev | cut -d / -f 2- | rev) | ||
targets="workflow-controller argoexec argocli" | ||
for target in $targets; do | ||
image_name="${docker_org}/${target}:${DOCKER_TAG}" | ||
docker push $image_name | ||
done |