Skip to content

Commit

Permalink
Switch to docker-sync
Browse files Browse the repository at this point in the history
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
  • Loading branch information
JPZ13 committed Sep 5, 2021
1 parent b60e0db commit caf62ca
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
4 changes: 1 addition & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ assets
community
coverage.out
dist
docs
examples
manifests
sdks
test/e2e
ui/dist
ui/node_modules
v3
vendor
vendor
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ git-ask-pass.sh
/.brew_home
/go-diagrams/
/.run/
.docker-sync
7 changes: 7 additions & 0 deletions docker-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "2"
syncs:
tooling-sync:
src: ./

options:
compose-file-path: ./hack/docker-compose.tooling.yaml
5 changes: 5 additions & 0 deletions hack/docker-compose.tooling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3'
services:
tooling:
image: argo-wf-tools
command: make codegen
27 changes: 13 additions & 14 deletions hack/makecmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ build_tools_image() {
docker build -t argo-wf-tools -f ./hack/Dockerfile-tools .
}

run_mounted_command() {
docker run \
-it \
--mount type=bind,source="$(pwd)",target=/go/src/github.com/argoproj/argo-workflows \
argo-wf-tools \
"$@"
start_sync() {
docker-sync start
}

start_sync_stack() {
docker-sync-stack start
}

stop_sync() {
docker-sync stop
}

prune_docker_images() {
Expand All @@ -34,14 +38,9 @@ do
codegen)
ensure_vendor
build_tools_image
run_mounted_command make codegen
prune_docker_containers
prune_docker_images
;;
lint)
ensure_vendor
build_tools_image
run_mounted_command make lint
start_sync
start_sync_stack
stop_sync
prune_docker_containers
prune_docker_images
;;
Expand Down

0 comments on commit caf62ca

Please sign in to comment.