Skip to content

Commit 9516459

Browse files
committed
Take the image tag from a nomad variable
1 parent 1ea53f6 commit 9516459

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

operations/relay-rewards-controller-live.hcl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
variable "commit_sha" {
2+
type = string
3+
description = "The git commit SHA to use for the runtime image tag"
4+
}
5+
16
job "relay-rewards-controller-live" {
27
datacenters = ["ator-fin"]
38
type = "service"
@@ -28,13 +33,13 @@ job "relay-rewards-controller-live" {
2833
driver = "docker"
2934
config {
3035
network_mode = "host"
31-
image = "ghcr.io/anyone-protocol/relay-rewards-controller:[[ .commit_sha ]]"
36+
image = "ghcr.io/anyone-protocol/relay-rewards-controller:${var.commit_sha}"
3237
force_pull = true
3338
}
3439

3540
env {
3641
IS_LIVE="true"
37-
VERSION="[[ .commit_sha ]]"
42+
VERSION = var.commit_sha
3843
REDIS_MODE="sentinel"
3944
REDIS_MASTER_NAME="relay-rewards-controller-live-redis-master"
4045
USE_HODLER = "true"

operations/relay-rewards-controller-stage.hcl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
variable "commit_sha" {
2+
type = string
3+
description = "The git commit SHA to use for the runtime image tag"
4+
}
5+
16
job "relay-rewards-controller-stage" {
27
datacenters = ["ator-fin"]
38
type = "service"
@@ -28,13 +33,13 @@ job "relay-rewards-controller-stage" {
2833
driver = "docker"
2934
config {
3035
network_mode = "host"
31-
image = "ghcr.io/anyone-protocol/relay-rewards-controller:[[ .commit_sha ]]"
36+
image = "ghcr.io/anyone-protocol/relay-rewards-controller:${var.commit_sha}"
3237
force_pull = true
3338
}
3439

3540
env {
3641
IS_LIVE="true"
37-
VERSION="[[ .commit_sha ]]"
42+
VERSION = var.commit_sha
3843
REDIS_MODE="sentinel"
3944
REDIS_MASTER_NAME="relay-rewards-controller-stage-redis-master"
4045
USE_HODLER = "true"

0 commit comments

Comments
 (0)