Skip to content

Commit

Permalink
Push docker tags in a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
infogulch committed Oct 10, 2024
1 parent f308125 commit 96870a8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions make_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ task: test_docker: {
stop: exec.Run & {cmd: "docker stop xtemplate-test", $after: test.hurl.$done} // be nice if we can always run this even if previous steps fail
}

task: push_docker: {
tags: [...string]

for tag in tags {
("push-" + tag): exec.Run & {
cmd: ["docker", "push", tag]
}
}
}

task: build_caddy: {
vars: #vars

Expand Down Expand Up @@ -224,9 +234,5 @@ command: ci: {

test_docker: task.test_docker & {"vars": cfg.vars}
build_docker: task.build_docker & {"vars": cfg.vars, build: $after: test_docker.stop.$done}

push: exec.Run & {
cmd: ["docker", "push", build_docker.tags[0]]
$after: build_docker.build.$done && build_test.kill.$done && build_test_caddy.kill.$done
}
push_docker: task.push_docker & {tags: build_docker.tags} & {[=~"^push"]: $after: build_docker.build.$done}
}

0 comments on commit 96870a8

Please sign in to comment.