-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWORKSPACE
More file actions
66 lines (54 loc) · 1.46 KB
/
WORKSPACE
File metadata and controls
66 lines (54 loc) · 1.46 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
workspace {
id = "edd11090a41b0291301431d0"
engine = ~docker
configuration = "local"
environment = "dev"
}
locals {
is_local_build = terrabuild.configuration == "local"
target_env = terrabuild.environment ?? "dev"
dotnet = { config: local.is_local_build && local.target_env == "dev" ? "Debug" : "Release"
evaluate: local.is_local_build && local.target_env == "dev" }
runtimes = {
dotnet: terrabuild.ci ? "linux-x64" : "linux-arm64"
}
versions = {
dotnet_sdk: "10.0.201" # https://mcr.microsoft.com/artifact/mar/dotnet/sdk/tags
pnpm: "22-10" # https://hub.docker.com/r/guergeiro/pnpm/tags
}
}
target install {
outputs = []
artifacts = ~workspace
build = ~lazy
}
target build {
artifacts = ~managed
depends_on = [ target.install
target.^build ]
}
target test {
artifacts = ~managed
depends_on = [ target.build ]
}
target dist {
artifacts = ~external
depends_on = [ target.build ]
}
extension @dotnet {
image = local.is_local_build ? nothing : "mcr.microsoft.com/dotnet/sdk:${local.versions.dotnet_sdk}"
defaults {
runtime = local.runtimes.dotnet
configuration = local.dotnet.config
evaluate = local.dotnet.evaluate
}
}
extension @pnpm {
image = local.is_local_build ? nothing : "docker.io/guergeiro/pnpm:${local.versions.pnpm}"
defaults {
frozen = true
}
env {
CI = true
}
}