Skip to content

Commit 51e5fe2

Browse files
committed
feat(workflow): distinguish plan-only builds to ensure safe CI execution
1 parent dd0de0d commit 51e5fe2

13 files changed

Lines changed: 110 additions & 26 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ k8s/environments/dev
77
.kube
88
netrc
99
.roomservice/
10+
.sailr/

examples/ci-build/hello/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx:alpine
2+
COPY index.html /usr/share/nginx/html/index.html

examples/ci-build/hello/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head><title>CI Build</title></head>
4+
<body><h1>Hello from CI Build!</h1></body>
5+
</html>

hello-sailr/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM scratch

k8s/environments/local/config.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ name = "hello-sailr"
1010
version = "latest"
1111
path = "hello-sailr"
1212

13+
14+
[[service]]
15+
name = "ci-build-hello"
16+
version = "ci"
17+
path = "examples/ci-build/hello"
18+
1319
[service.build]
14-
path = "."
15-
dockerfile = "Dockerfile"
20+
path = "examples/ci-build/hello"
21+
include = ["Dockerfile", "index.html"]
22+
build_command = "docker build -t hello-sailr:ci ."
23+
push_command = "true"

k8s/generated/local/examples/ci-build/hello/deployment.yaml

Whitespace-only changes.

k8s/generated/local/examples/ci-build/hello/service.yaml

Whitespace-only changes.

k8s/templates/examples/ci-build/hello/deployment.yaml

Whitespace-only changes.

k8s/templates/examples/ci-build/hello/service.yaml

Whitespace-only changes.

sailr.workflow.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@ environment = "local"
33
mode = "check"
44
interactive = false
55
build = "plan"
6+
generate = "disabled"
7+
deploy = "disabled"
8+
report = "text"
9+
10+
[workflow.ci-generate]
11+
environment = "local"
12+
mode = "check"
13+
interactive = false
14+
build = "plan"
615
generate = "run"
716
deploy = "disabled"
817
report = "text"
18+
19+
[workflow.ci-build-plan]
20+
environment = "local"
21+
mode = "check"
22+
interactive = false
23+
build = "plan"
24+
generate = "disabled"
25+
deploy = "disabled"
26+
report = "text"
27+
28+
[workflow.ci-build]
29+
environment = "local"
30+
mode = "build"
31+
interactive = false
32+
build = "run"
33+
generate = "disabled"
34+
deploy = "disabled"
35+
report = "text"

0 commit comments

Comments
 (0)