Skip to content

Commit

Permalink
Extract the branch to a variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed May 30, 2024
1 parent 43795dc commit bd332a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/deploy/staging.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
variable "branch_or_sha" {
type = string
default = "main"
}
job "dpulc-staging" {
region = "global"
datacenters = ["dc1"]
Expand Down Expand Up @@ -25,7 +29,7 @@ job "dpulc-staging" {
}
driver = "docker"
config {
image = "ghcr.io/pulibrary/dpul-collections:main"
image = "ghcr.io/pulibrary/dpul-collections:${ var.branch_or_sha }"
command = "bash"
args = ["-c", "/app/bin/migrate"]
force_pull = true
Expand All @@ -45,7 +49,7 @@ job "dpulc-staging" {
task "webserver" {
driver = "docker"
config {
image = "ghcr.io/pulibrary/dpul-collections:main"
image = "ghcr.io/pulibrary/dpul-collections:${ var.branch_or_sha }"
ports = ["http"]
force_pull = true
}
Expand Down

0 comments on commit bd332a3

Please sign in to comment.