-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWORKSPACE
More file actions
66 lines (52 loc) · 1.41 KB
/
WORKSPACE
File metadata and controls
66 lines (52 loc) · 1.41 KB
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
63
64
65
66
# build projects
target build {
depends_on = [ target.^build ]
}
# test projects
target test {
depends_on = [ target.build ]
}
# generate artifacts
target dist {
depends_on = [ target.build
target.^build ]
}
# plan deployment
target plan {
build = terrabuild.retry ? ~always : ~auto
depends_on = [ ]
}
# run deployment
target apply {
depends_on = [ target.plan
target.^dist ]
}
locals {
dotnet = { config: terrabuild.environment ? "Release" : "Debug" }
runtimes = {
dotnet: terrabuild.ci ? "linux-x64" : "linux-arm64"
docker: terrabuild.ci ? ["linux/amd64"] : ["linux/arm64"]
}
docker_tags = {
dotnet_sdk: "9.0" # https://mcr.microsoft.com/artifact/mar/dotnet/sdk/tags
dotnet_runtime: "9.0" # https://mcr.microsoft.com/artifact/mar/dotnet/runtime/tags
nodejs: "22.16.0-alpine3.22" # https://hub.docker.com/_/node/tags
nginx: "1.28.0-alpine" # https://hub.docker.com/_/nginx/tags
}
}
extension @dotnet {
image = "mcr.microsoft.com/dotnet/sdk:${local.docker_tags.dotnet_sdk}"
defaults {
runtime = local.runtimes.dotnet
configuration = local.dotnet.config
}
}
extension @docker {
defaults {
platforms = local.runtimes.docker
image = "ghcr.io/magnusopera/${terrabuild.project}"
}
}
extension @npm {
image = "node:${local.docker_tags.nodejs}"
}