version changes
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
variable "version" {
|
||||
type = string
|
||||
default = "latest"
|
||||
variable "deployment_version" {
|
||||
type = string
|
||||
description = "The deployment version from CI/CD"
|
||||
default = "unknown"
|
||||
}
|
||||
|
||||
job "code-snippets" {
|
||||
datacenters = ["dc1"]
|
||||
type = "service"
|
||||
|
||||
meta {
|
||||
version = var.deployment_version
|
||||
}
|
||||
|
||||
constraint {
|
||||
operator = "="
|
||||
attribute = "${meta.machine_role}"
|
||||
@@ -26,7 +31,7 @@ job "code-snippets" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "liamsgit.dev/liampietralla/code-snippets:${var.version}"
|
||||
image = "liamsgit.dev/liampietralla/code-snippets:latest"
|
||||
force_pull = true
|
||||
ports = ["http"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user