File tree Expand file tree Collapse file tree 3 files changed +28
-14
lines changed Expand file tree Collapse file tree 3 files changed +28
-14
lines changed Original file line number Diff line number Diff line change 11
11
runs-on : ubuntu-latest
12
12
container : quay.io/cortexproject/cortex-jsonnet-build-image:e158eda
13
13
steps :
14
- - uses : actions/checkout@v2
14
+ - uses : actions/checkout@v4
15
15
name : Checkout
16
16
with :
17
17
fetch-depth : 0
25
25
runs-on : ubuntu-latest
26
26
container : quay.io/cortexproject/cortex-jsonnet-build-image:e158eda
27
27
steps :
28
- - uses : actions/checkout@v2
28
+ - uses : actions/checkout@v4
29
29
name : Checkout
30
30
with :
31
31
fetch-depth : 0
@@ -36,10 +36,14 @@ jobs:
36
36
runs-on : ubuntu-latest
37
37
container : quay.io/cortexproject/cortex-jsonnet-build-image:e158eda
38
38
steps :
39
- - uses : actions/checkout@v2
39
+ - uses : actions/checkout@v4
40
40
name : Checkout
41
41
with :
42
42
fetch-depth : 0
43
43
44
- - name : " Test readme"
45
- run : make test-readme
44
+ - name : " Test readme s3"
45
+ run : make test-readme/s3
46
+ - name : " Test readme azure"
47
+ run : make test-readme/azure
48
+ - name : " Test readme gcs"
49
+ run : make test-readme/gcs
Original file line number Diff line number Diff line change 1
- .PHONY : lint build-image publish-build-image test-readme
1
+ .PHONY : lint build-image publish-build-image test-readme clean
2
2
3
3
JSONNET_FMT := jsonnetfmt
4
4
@@ -47,18 +47,17 @@ build-mixin:
47
47
test-readme : test-readme/azure test-readme/gcs test-readme/s3
48
48
49
49
test-readme/% :
50
- rm -rf $@ && \
51
- mkdir -p $@ && cd $@ && \
52
- tk init --k8s=1.24 && \
53
- jb install github.com/cortexproject/cortex-jsonnet/cortex@main && \
54
- rm -fr ./vendor/cortex && \
55
- cp -r ../../cortex ./vendor/ && \
56
- cp vendor/cortex/$(notdir $@ ) /main.jsonnet.example environments/default/main.jsonnet && \
57
- PAGER=cat tk show environments/default
50
+ @./scripts/test-readme.sh $@
58
51
59
52
clean-white-noise :
60
53
@$(FIND ) . -type f -regextype posix-extended -regex ' .*(md|libsonnet)' -print | \
61
54
SED_BIN=" $( SED) " xargs ./scripts/cleanup-white-noise.sh
62
55
63
56
check-white-noise : clean-white-noise
64
57
@git diff --exit-code --quiet || (echo " Please remove trailing whitespaces running 'make clean-white-noise'" && false)
58
+
59
+ clean :
60
+ rm -rf cortex-mixin/out
61
+ rm -rf cortex-mixin/vendor
62
+ rm -f cortex-mixin/cortex-mixin.zip
63
+ rm -rf test-readme
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -xe
3
+ rm -rf $1
4
+ mkdir -p $1
5
+ cd $1
6
+ tk init --k8s=1.26
7
+ jb install github.com/cortexproject/cortex-jsonnet/cortex@main
8
+ rm -fr ./vendor/cortex
9
+ cp -r ../../cortex ./vendor/
10
+ cp vendor/cortex/$( basename $1 ) /main.jsonnet.example environments/default/main.jsonnet
11
+ PAGER=cat tk show --dangerous-allow-redirect environments/default
You can’t perform that action at this time.
0 commit comments