-
Notifications
You must be signed in to change notification settings - Fork 96
/
scripts.tm
62 lines (52 loc) · 1.22 KB
/
scripts.tm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright 2023 Terramate GmbH
// SPDX-License-Identifier: MPL-2.0
globals {
planfile = "out.tfplan"
}
script "test" {
name = "Terramate tests"
job {
commands = [
["bash", "-c", "terraform init -lock=false >/dev/null"],
["bash", "-c", "terraform plan -out=${global.planfile} >/dev/null"]
]
}
job {
command = [
"go", "test", "-race", "-count=1", "-timeout", "30m"]
}
}
script "preview" {
name = "Preview Terramate tests"
job {
commands = [
["bash", "-c", "terraform init -lock=false >/dev/null"],
["bash", "-c", "terraform plan -out=${global.planfile} >/dev/null"]
]
}
job {
command = [
"go", "test", "-race", "-count=1", "-timeout", "30m", {
sync_preview = true,
terraform_plan_file = global.planfile,
}
]
}
}
script "deploy" {
name = "Deploy Terramate tests"
job {
commands = [
["bash", "-c", "terraform init -lock=false >/dev/null"],
["bash", "-c", "terraform plan -out=${global.planfile} >/dev/null"]
]
}
job {
command = [
"go", "test", "-race", "-count=1", "-timeout", "30m", {
sync_deployment = true,
terraform_plan_file = global.planfile,
}
]
}
}