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 e56f313
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions make_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@ 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 {
(tag): exec.Run & {
cmd: ["docker", "push", tag]
"$after": $after
}
}
}

task: build_caddy: {
vars: #vars

Expand Down Expand Up @@ -224,9 +235,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, $after: build_docker.build.$done}
}

0 comments on commit e56f313

Please sign in to comment.