@@ -24,14 +24,14 @@ jobs:
24
24
sudo chown -R `id -u`:`id -g` ./quickstart/_dist
25
25
26
26
- name : ' Upload artifacts'
27
- uses : actions/upload-artifact@v1
27
+ uses : actions/upload-artifact@v2
28
28
with :
29
29
name : test-artifacts
30
30
path : ./quickstart/_dist
31
31
32
32
build-image :
33
33
runs-on : ubuntu-latest
34
-
34
+ needs : [build-test-artifacts]
35
35
strategy :
36
36
matrix :
37
37
starter : ["multi-cloud", "aks", "eks", "gke" ,"kind"]
40
40
- name : ' Checkout'
41
41
uses : actions/checkout@v1
42
42
43
+ - name : ' Download test-artifacts'
44
+ uses : actions/download-artifact@v2
45
+ with :
46
+ name : test-artifacts
47
+ path : ./quickstart/_dist
48
+
43
49
- name : ' Docker login'
44
50
run : |
45
51
echo ${{ secrets.DOCKER_AUTH }} | docker login --username kbstci --password-stdin
@@ -51,14 +57,14 @@ jobs:
51
57
docker run \
52
58
--rm \
53
59
--privileged \
54
- -v `pwd`/oci :/tmp/work \
60
+ -v `pwd`:/tmp/work \
55
61
-v $HOME/.docker:/root/.docker \
56
62
--entrypoint buildctl-daemonless.sh \
57
63
moby/buildkit:master \
58
64
build \
59
65
--frontend dockerfile.v0 \
60
66
--local context=/tmp/work \
61
- --local dockerfile=/tmp/work \
67
+ --local dockerfile=/tmp/work/oci \
62
68
--output type=image,name=kubestack/framework-dev:test-${{ github.sha }}-${{ matrix.starter }},push=true \
63
69
--export-cache type=registry,ref=kubestack/framework-dev:buildcache-${{ matrix.starter }},push=true \
64
70
--import-cache type=registry,ref=kubestack/framework-dev:buildcache-${{ matrix.starter }} \
@@ -74,13 +80,14 @@ jobs:
74
80
75
81
steps :
76
82
- name : ' Download test-artifacts'
77
- uses : actions/download-artifact@v1
83
+ uses : actions/download-artifact@v2
78
84
with :
79
85
name : test-artifacts
86
+ path : ./quickstart/_dist
80
87
81
88
- name : ' Unzip ${{ matrix.starter }} quickstart'
82
89
run : |
83
- unzip test-artifacts /kubestack-starter-${{ matrix.starter }}-*.zip
90
+ unzip quickstart/_dist /kubestack-starter-${{ matrix.starter }}-*.zip
84
91
85
92
- name : ' Docker build'
86
93
env :
@@ -109,7 +116,7 @@ jobs:
109
116
sed -i 's/resource_group = ""/resource_group = "terraform-kubestack-testing"/g' config.auto.tfvars
110
117
111
118
# EKS: set region
112
- sed -i 's/region = ""/region = "eu-west-1"/g' providers.tf
119
+ sed -i 's/region = ""/region = "eu-west-1"/g' providers.tf || true
113
120
114
121
# EKS: set cluster_availability_zones
115
122
sed -i 's/cluster_availability_zones = ""/cluster_availability_zones = "eu-west-1a,eu-west-1b"/g' config.auto.tfvars
@@ -173,9 +180,10 @@ jobs:
173
180
174
181
steps :
175
182
- name : ' Download test-artifacts'
176
- uses : actions/download-artifact@v1
183
+ uses : actions/download-artifact@v2
177
184
with :
178
185
name : test-artifacts
186
+ path : ./quickstart/_dist
179
187
180
188
- name : ' Docker login'
181
189
run : |
@@ -188,7 +196,7 @@ jobs:
188
196
run : |
189
197
SOURCE_IMAGE=kubestack/framework-dev:test-${{ github.sha }}-${{ matrix.starter }}
190
198
docker pull $SOURCE_IMAGE
191
- TARGET_IMAGE=$(cat test-artifacts /kubestack-starter-${{ matrix.starter }}/Dockerfile | sed 's/FROM //')
199
+ TARGET_IMAGE=$(cat quickstart/_dist /kubestack-starter-${{ matrix.starter }}/Dockerfile | sed 's/FROM //')
192
200
docker tag $SOURCE_IMAGE $TARGET_IMAGE
193
201
docker push $TARGET_IMAGE
194
202
@@ -204,9 +212,10 @@ jobs:
204
212
205
213
steps :
206
214
- name : ' Download test-artifacts'
207
- uses : actions/download-artifact@v1
215
+ uses : actions/download-artifact@v2
208
216
with :
209
217
name : test-artifacts
218
+ path : ./quickstart/_dist
210
219
211
220
- name : ' Setup gcloud'
212
221
uses : GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -215,12 +224,12 @@ jobs:
215
224
216
225
- name : ' Publish ${{ matrix.starter }} starter'
217
226
run : |
218
- SOURCE_FILE=test-artifacts /kubestack-starter-${{ matrix.starter }}-${{ github.sha }}.zip
227
+ SOURCE_FILE=quickstart/_dist /kubestack-starter-${{ matrix.starter }}-${{ github.sha }}.zip
219
228
TARGET_BUCKET=dev.quickstart.kubestack.com
220
229
if [[ $GITHUB_REF = refs/tags/v* ]]
221
230
then
222
231
VERSION=$(echo $GITHUB_REF | sed -e "s#^refs/tags/##")
223
- SOURCE_FILE=test-artifacts /kubestack-starter-${{ matrix.starter }}-${VERSION}.zip
232
+ SOURCE_FILE=quickstart/_dist /kubestack-starter-${{ matrix.starter }}-${VERSION}.zip
224
233
TARGET_BUCKET=quickstart.kubestack.com
225
234
fi
226
235
gsutil -m cp $SOURCE_FILE gs://$TARGET_BUCKET
0 commit comments