File tree 4 files changed +65
-2
lines changed
4 files changed +65
-2
lines changed Original file line number Diff line number Diff line change 13
13
- " *" # run for tags
14
14
15
15
jobs :
16
+ #
17
+ #
18
+ # check complete demo is in sync with individual manifest, it should block fom merge. Should this be a diferent file?
19
+ complete-demo-check :
20
+ runs-on : ubuntu-latest
21
+ env :
22
+ COMPLETE_DEMO_ARGS : --rm -v ${{ github.workspace }}:/workdir
23
+ COMPLETE_DEMO_DIR : ' deploy/kubernetes/'
24
+ COMPLETE_DEMO_IMAGE : ' manifests-image'
25
+ steps :
26
+ - uses : actions/checkout@v2
27
+
28
+ #
29
+ #
30
+ # Build image
31
+ - name : Build image
32
+ env :
33
+ DOCKER_BUILDKIT : 1
34
+ run : docker build -t $COMPLETE_DEMO_IMAGE $COMPLETE_DEMO_DIR
35
+
36
+ #
37
+ #
38
+ # Check that manifest and complete-demo.yaml ahve the same content
39
+ - name : check comeplte-demo content
40
+ run : docker run $COMPLETE_DEMO_ARGS $COMPLETE_DEMO_IMAGE make -C $COMPLETE_DEMO_DIR check-complete-demo
41
+
42
+ #
43
+ #
44
+ # check that we can deploy complete-demo
45
+ # NOTE: what about docker compose? maybe doesn't make sense if we use the KIND action
46
+ # NOTE: later we can test that the documentation is tested, as in previous cronjobs in travis
16
47
deployments-tests :
17
48
runs-on : ubuntu-latest
18
49
env :
37
68
until [ "$(kubectl get pods -n sock-shop --no-headers | grep -cEv '([0-9]+)/\1')" -eq 0 ]; do
38
69
sleep 5s
39
70
done
71
+ kubectl get pod -A
40
72
73
+ #
74
+ #
75
+ # build openapi and healtcheck images
41
76
build-test-images :
42
77
if : startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
43
78
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change
1
+ .PHONY : gen-complete-demo
2
+ gen-complete-demo :
3
+ make -C deploy/kubernetes docker-gen-complete-demo
4
+
5
+ .PHONY : check-generated-files
6
+ check-generated-files :
7
+ make -C deploy/kubernetes docker-check-complete-demo
Original file line number Diff line number Diff line change
1
+ FROM alpine:3.12.0 AS runtime
2
+
3
+ RUN apk add bash make
4
+
5
+ WORKDIR /workdir
Original file line number Diff line number Diff line change
1
+ PWD = $(shell pwd)
1
2
MANIFESTS = $(or $(shell printenv MANIFESTS) , manifests)
2
3
3
4
.PHONY : gen-complete-demo
4
5
gen-complete-demo :
5
6
cat ${MANIFESTS} /* > complete-demo.yaml
6
7
7
- .PHONY : val -complete-demo
8
- val -complete-demo :
8
+ .PHONY : check -complete-demo
9
+ check -complete-demo :
9
10
cat ${MANIFESTS} /* | diff complete-demo.yaml -
11
+
12
+ .dockerimage : Dockerfile
13
+ docker build -t manifests-image .
14
+ touch .dockerimage
15
+
16
+ .PHONY : docker-%
17
+ docker-% : .dockerimage
18
+ docker \
19
+ run \
20
+ --rm \
21
+ -it \
22
+ -u ${UID} :${GID} \
23
+ -v ${PWD} :/workdir \
24
+ manifests-image \
25
+ make $*
You can’t perform that action at this time.
0 commit comments