codefresh 0.85.0 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mocks__/codefresh.yml +40 -0
- package/docs/index.js +19 -18
- package/lib/interface/cli/commands/root/root.sdk.spec.js +1 -1
- package/lib/interface/cli/completion/tree.json +1 -1
- package/package.json +3 -3
- package/codefresh-arm.yml +0 -261
- package/codefresh-release.yml +0 -482
- package/codefresh.yml +0 -385
package/codefresh-release.yml
DELETED
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
# this pipeline should only be executed on master branch
|
|
2
|
-
version: '1.0'
|
|
3
|
-
mode: parallel
|
|
4
|
-
stages:
|
|
5
|
-
- prepare
|
|
6
|
-
- docker
|
|
7
|
-
- build
|
|
8
|
-
- github
|
|
9
|
-
- packages
|
|
10
|
-
- documentation
|
|
11
|
-
steps:
|
|
12
|
-
fail_if_not_master:
|
|
13
|
-
stage: prepare
|
|
14
|
-
title: "Validate running on master branch"
|
|
15
|
-
image: codefresh/build-cli
|
|
16
|
-
commands:
|
|
17
|
-
- >-
|
|
18
|
-
if [ "${{CF_BRANCH}}" != "master" ]; then
|
|
19
|
-
echo This pipeline should be run only on master
|
|
20
|
-
exit 1
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
main_clone:
|
|
24
|
-
stage: prepare
|
|
25
|
-
title: 'Cloning main repository...'
|
|
26
|
-
type: git-clone
|
|
27
|
-
repo: codefresh-io/cli
|
|
28
|
-
revision: ${{CF_BRANCH}}
|
|
29
|
-
git: cf_github
|
|
30
|
-
when:
|
|
31
|
-
steps:
|
|
32
|
-
- name: fail_if_not_master
|
|
33
|
-
on:
|
|
34
|
-
- success
|
|
35
|
-
|
|
36
|
-
extract_version:
|
|
37
|
-
stage: prepare
|
|
38
|
-
title: "Exporting package.json version"
|
|
39
|
-
image: codefresh/build-cli
|
|
40
|
-
commands:
|
|
41
|
-
- 'export PACKAGE_VERSION=$(jq -r ".version" package.json)'
|
|
42
|
-
- "echo Current version: $PACKAGE_VERSION"
|
|
43
|
-
- "cf_export PACKAGE_VERSION"
|
|
44
|
-
when:
|
|
45
|
-
steps:
|
|
46
|
-
- name: main_clone
|
|
47
|
-
on:
|
|
48
|
-
- success
|
|
49
|
-
|
|
50
|
-
install:
|
|
51
|
-
stage: prepare
|
|
52
|
-
title: "Installing dependencies"
|
|
53
|
-
image: codefresh/build-cli
|
|
54
|
-
commands:
|
|
55
|
-
- "yarn install"
|
|
56
|
-
when:
|
|
57
|
-
steps:
|
|
58
|
-
- name: main_clone
|
|
59
|
-
on:
|
|
60
|
-
- success
|
|
61
|
-
|
|
62
|
-
generate_comletion:
|
|
63
|
-
stage: prepare
|
|
64
|
-
title: "Generating commands completion tree"
|
|
65
|
-
image: codefresh/build-cli
|
|
66
|
-
commands:
|
|
67
|
-
- "yarn generate-completion"
|
|
68
|
-
when:
|
|
69
|
-
steps:
|
|
70
|
-
- name: install
|
|
71
|
-
on:
|
|
72
|
-
- success
|
|
73
|
-
|
|
74
|
-
# in case the candidate image will not be found the release flow will crash and this means that the build pipelines has failed
|
|
75
|
-
push_step_alpine:
|
|
76
|
-
stage: docker
|
|
77
|
-
type: push
|
|
78
|
-
title: "Push alpine release image"
|
|
79
|
-
image_name: codefresh/cli
|
|
80
|
-
tags:
|
|
81
|
-
- ${{PACKAGE_VERSION}}
|
|
82
|
-
- latest
|
|
83
|
-
scale:
|
|
84
|
-
push_to_dockerhub_alpine:
|
|
85
|
-
registry: dockerhub
|
|
86
|
-
title: "push to dockerhub"
|
|
87
|
-
candidate: codefresh/cli:${{CF_SHORT_REVISION}}
|
|
88
|
-
push_to_gcr_alpine:
|
|
89
|
-
title: "push to gcr"
|
|
90
|
-
candidate: gcr.io/codefresh-inc/codefresh/cli:${{CF_SHORT_REVISION}}
|
|
91
|
-
push_to_quay_alpine:
|
|
92
|
-
registry: cf-quay
|
|
93
|
-
title: "push to quay.io"
|
|
94
|
-
candidate: quay.io/codefresh/cli:${{CF_SHORT_REVISION}}
|
|
95
|
-
when:
|
|
96
|
-
steps:
|
|
97
|
-
- name: extract_version
|
|
98
|
-
on:
|
|
99
|
-
- success
|
|
100
|
-
|
|
101
|
-
push_step_debian:
|
|
102
|
-
stage: docker
|
|
103
|
-
type: push
|
|
104
|
-
title: "Push debian release image"
|
|
105
|
-
image_name: codefresh/cli
|
|
106
|
-
tags:
|
|
107
|
-
- ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}
|
|
108
|
-
- latest${{DEBIAN_TAG_POSTFIX}}
|
|
109
|
-
scale:
|
|
110
|
-
push_to_dockerhub_debian:
|
|
111
|
-
registry: dockerhub
|
|
112
|
-
title: "push to dockerhub"
|
|
113
|
-
candidate: codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}
|
|
114
|
-
push_to_gcr_debian:
|
|
115
|
-
title: "push to gcr"
|
|
116
|
-
candidate: gcr.io/codefresh-inc/codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}
|
|
117
|
-
push_to_quay_debian:
|
|
118
|
-
registry: cf-quay
|
|
119
|
-
title: "push to quay.io"
|
|
120
|
-
candidate: quay.io/codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}
|
|
121
|
-
when:
|
|
122
|
-
steps:
|
|
123
|
-
- name: extract_version
|
|
124
|
-
on:
|
|
125
|
-
- success
|
|
126
|
-
|
|
127
|
-
# in case the candidate image will not be found the release flow will crash and this means that the build pipelines has failed
|
|
128
|
-
push_step_alpine_rootless:
|
|
129
|
-
stage: docker
|
|
130
|
-
type: push
|
|
131
|
-
title: "Push alpine release image"
|
|
132
|
-
image_name: codefresh/cli
|
|
133
|
-
tags:
|
|
134
|
-
- ${{PACKAGE_VERSION}}${{ROOTLESS_TAG_POSTFIX}}
|
|
135
|
-
- latest${{ROOTLESS_TAG_POSTFIX}}
|
|
136
|
-
scale:
|
|
137
|
-
push_to_dockerhub_alpine_rootless:
|
|
138
|
-
registry: dockerhub
|
|
139
|
-
title: "push to dockerhub"
|
|
140
|
-
candidate: codefresh/cli:${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}}
|
|
141
|
-
push_to_gcr_alpine_rootless:
|
|
142
|
-
title: "push to gcr"
|
|
143
|
-
candidate: gcr.io/codefresh-inc/codefresh/cli:${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}}
|
|
144
|
-
push_to_quay_alpine_rootless:
|
|
145
|
-
registry: cf-quay
|
|
146
|
-
title: "push to quay.io"
|
|
147
|
-
candidate: quay.io/codefresh/cli:${{CF_SHORT_REVISION}}${{ROOTLESS_TAG_POSTFIX}}
|
|
148
|
-
when:
|
|
149
|
-
steps:
|
|
150
|
-
- name: extract_version
|
|
151
|
-
on:
|
|
152
|
-
- success
|
|
153
|
-
|
|
154
|
-
push_step_debian_rootless:
|
|
155
|
-
stage: docker
|
|
156
|
-
type: push
|
|
157
|
-
title: "Push debian release image"
|
|
158
|
-
image_name: codefresh/cli
|
|
159
|
-
tags:
|
|
160
|
-
- ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
161
|
-
- latest${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
162
|
-
scale:
|
|
163
|
-
push_to_dockerhub_debian_rootless:
|
|
164
|
-
registry: dockerhub
|
|
165
|
-
title: "push to dockerhub"
|
|
166
|
-
candidate: codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
167
|
-
push_to_gcr_debian_rootless:
|
|
168
|
-
title: "push to gcr"
|
|
169
|
-
candidate: gcr.io/codefresh-inc/codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
170
|
-
push_to_quay_debian_rootless:
|
|
171
|
-
registry: cf-quay
|
|
172
|
-
title: "push to quay.io"
|
|
173
|
-
candidate: quay.io/codefresh/cli:${{CF_SHORT_REVISION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
174
|
-
when:
|
|
175
|
-
steps:
|
|
176
|
-
- name: extract_version
|
|
177
|
-
on:
|
|
178
|
-
- success
|
|
179
|
-
|
|
180
|
-
create_manifest_list:
|
|
181
|
-
stage: docker
|
|
182
|
-
type: "codefresh-inc/multiarch-manifester"
|
|
183
|
-
arguments:
|
|
184
|
-
image_name: codefresh/cli
|
|
185
|
-
arch_tag_postfixes:
|
|
186
|
-
arm64: "${{ARM_TAG_POSTFIX}}"
|
|
187
|
-
registries:
|
|
188
|
-
- name: 'quay.io'
|
|
189
|
-
username: '${{QUAY_USERNAME}}'
|
|
190
|
-
password: '${{QUAY_PASSWORD}}'
|
|
191
|
-
- name: 'docker.io'
|
|
192
|
-
username: '${{DOCKERHUB_USERNAME}}'
|
|
193
|
-
password: '${{DOCKERHUB_PASSWORD}}'
|
|
194
|
-
- name: 'gcr.io'
|
|
195
|
-
path_prefix: codefresh-inc
|
|
196
|
-
username: '${{GCR_CODEFRESH_INC_USERNAME}}'
|
|
197
|
-
password: '${{GCR_CODEFRESH_INC_PASSWORD}}'
|
|
198
|
-
scale:
|
|
199
|
-
master_branch_tags_alpine:
|
|
200
|
-
arguments:
|
|
201
|
-
tags:
|
|
202
|
-
- ${{PACKAGE_VERSION}}
|
|
203
|
-
- latest
|
|
204
|
-
master_branch_tags_debian:
|
|
205
|
-
arguments:
|
|
206
|
-
tags:
|
|
207
|
-
- ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}
|
|
208
|
-
- latest${{DEBIAN_TAG_POSTFIX}}
|
|
209
|
-
master_branch_tags_alpine_rootless:
|
|
210
|
-
arguments:
|
|
211
|
-
tags:
|
|
212
|
-
- ${{PACKAGE_VERSION}}${{ROOTLESS_TAG_POSTFIX}}
|
|
213
|
-
- latest${{ROOTLESS_TAG_POSTFIX}}
|
|
214
|
-
master_branch_tags_debian_rootless:
|
|
215
|
-
arguments:
|
|
216
|
-
tags:
|
|
217
|
-
- ${{PACKAGE_VERSION}}${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
218
|
-
- latest${{DEBIAN_TAG_POSTFIX}}${{ROOTLESS_TAG_POSTFIX}}
|
|
219
|
-
when:
|
|
220
|
-
steps:
|
|
221
|
-
- name: push_step_alpine
|
|
222
|
-
on:
|
|
223
|
-
- success
|
|
224
|
-
- name: push_step_debian
|
|
225
|
-
on:
|
|
226
|
-
- success
|
|
227
|
-
- name: push_step_alpine_rootless
|
|
228
|
-
on:
|
|
229
|
-
- success
|
|
230
|
-
- name: push_step_debian_rootless
|
|
231
|
-
on:
|
|
232
|
-
- success
|
|
233
|
-
|
|
234
|
-
compile_executables:
|
|
235
|
-
stage: build
|
|
236
|
-
title: "Compiling executables"
|
|
237
|
-
image: codefresh/build-cli
|
|
238
|
-
commands:
|
|
239
|
-
- "rm -rf dist"
|
|
240
|
-
- "yarn pkg"
|
|
241
|
-
when:
|
|
242
|
-
steps:
|
|
243
|
-
- name: generate_comletion
|
|
244
|
-
on:
|
|
245
|
-
- success
|
|
246
|
-
|
|
247
|
-
archive_linux:
|
|
248
|
-
stage: build
|
|
249
|
-
title: "Archiving linux distribution"
|
|
250
|
-
image: codefresh/build-cli
|
|
251
|
-
commands:
|
|
252
|
-
- "rm -rf ./dist/linux"
|
|
253
|
-
- "mkdir -p ./dist/linux"
|
|
254
|
-
- "cp --force README.md LICENSE ./dist/linux"
|
|
255
|
-
- "cp --force ./dist/codefresh-linux ./dist/linux/codefresh"
|
|
256
|
-
- "tar -cf codefresh-v${{PACKAGE_VERSION}}-linux-x64.tar README.md LICENSE -C ./dist/linux codefresh"
|
|
257
|
-
- "gzip -f codefresh-v${{PACKAGE_VERSION}}-linux-x64.tar"
|
|
258
|
-
when:
|
|
259
|
-
steps:
|
|
260
|
-
- name: compile_executables
|
|
261
|
-
on:
|
|
262
|
-
- success
|
|
263
|
-
|
|
264
|
-
archive_macos:
|
|
265
|
-
stage: build
|
|
266
|
-
title: "Archiving macos distribution"
|
|
267
|
-
image: codefresh/build-cli
|
|
268
|
-
commands:
|
|
269
|
-
- "rm -rf ./dist/macos"
|
|
270
|
-
- "mkdir -p ./dist/macos"
|
|
271
|
-
- "cp --force README.md LICENSE ./dist/macos"
|
|
272
|
-
- "cp --force ./dist/codefresh-macos ./dist/macos/codefresh"
|
|
273
|
-
- "tar -cf codefresh-v${{PACKAGE_VERSION}}-macos-x64.tar README.md LICENSE -C ./dist/macos codefresh"
|
|
274
|
-
- "gzip -f codefresh-v${{PACKAGE_VERSION}}-macos-x64.tar"
|
|
275
|
-
when:
|
|
276
|
-
steps:
|
|
277
|
-
- name: compile_executables
|
|
278
|
-
on:
|
|
279
|
-
- success
|
|
280
|
-
|
|
281
|
-
archive_win:
|
|
282
|
-
stage: build
|
|
283
|
-
title: "Archiving win distribution"
|
|
284
|
-
image: codefresh/build-cli
|
|
285
|
-
commands:
|
|
286
|
-
- "rm -rf ./dist/win"
|
|
287
|
-
- "mkdir -p ./dist/win"
|
|
288
|
-
- "cp --force README.md LICENSE ./dist/win"
|
|
289
|
-
- "cp --force ./dist/codefresh-win.exe ./dist/win/codefresh.exe"
|
|
290
|
-
- "zip codefresh-v${{PACKAGE_VERSION}}-win-x64.zip README.md LICENSE -j ./dist/win/codefresh.exe "
|
|
291
|
-
when:
|
|
292
|
-
steps:
|
|
293
|
-
- name: compile_executables
|
|
294
|
-
on:
|
|
295
|
-
- success
|
|
296
|
-
|
|
297
|
-
archive_alpine:
|
|
298
|
-
stage: build
|
|
299
|
-
title: "Archiving macos distribution"
|
|
300
|
-
image: codefresh/build-cli
|
|
301
|
-
commands:
|
|
302
|
-
- "rm -rf ./dist/alpine"
|
|
303
|
-
- "mkdir -p ./dist/alpine"
|
|
304
|
-
- "cp --force README.md LICENSE ./dist/alpine"
|
|
305
|
-
- "cp --force ./dist/codefresh-alpine ./dist/alpine/codefresh"
|
|
306
|
-
- "tar -cf codefresh-v${{PACKAGE_VERSION}}-alpine-x64.tar README.md LICENSE -C ./dist/alpine codefresh"
|
|
307
|
-
- "gzip -f codefresh-v${{PACKAGE_VERSION}}-alpine-x64.tar"
|
|
308
|
-
when:
|
|
309
|
-
steps:
|
|
310
|
-
- name: compile_executables
|
|
311
|
-
on:
|
|
312
|
-
- success
|
|
313
|
-
|
|
314
|
-
create_release:
|
|
315
|
-
stage: github
|
|
316
|
-
title: "Create github release"
|
|
317
|
-
image: codefresh/build-cli
|
|
318
|
-
fail_fast: false
|
|
319
|
-
commands:
|
|
320
|
-
- 'curl --fail -X POST -d ''{"tag_name":"v${{PACKAGE_VERSION}}","target_commitish":"${{CF_REVISION}}","name":"Codefresh V${{PACKAGE_VERSION}}"}'' -H "Content-Type: application/json" -H "Authorization: token ${{GITHUB_TOKEN}}" https://api.github.com/repos/codefresh-io/cli/releases'
|
|
321
|
-
when:
|
|
322
|
-
steps:
|
|
323
|
-
- name: compile_executables
|
|
324
|
-
on:
|
|
325
|
-
- success
|
|
326
|
-
|
|
327
|
-
get_release:
|
|
328
|
-
stage: github
|
|
329
|
-
title: "Get github release"
|
|
330
|
-
image: codefresh/build-cli
|
|
331
|
-
commands:
|
|
332
|
-
- "curl --fail https://api.github.com/repos/codefresh-io/cli/releases/tags/v${{PACKAGE_VERSION}}"
|
|
333
|
-
- "export GITHUB_RELEASE_ID=$(curl --fail https://api.github.com/repos/codefresh-io/cli/releases/tags/v${{PACKAGE_VERSION}} | jq -r '.id')"
|
|
334
|
-
- "echo Github release id: $GITHUB_RELEASE_ID"
|
|
335
|
-
- "cf_export GITHUB_RELEASE_ID"
|
|
336
|
-
when:
|
|
337
|
-
steps:
|
|
338
|
-
- name: create_release
|
|
339
|
-
on:
|
|
340
|
-
- success
|
|
341
|
-
- failure
|
|
342
|
-
|
|
343
|
-
upload_linux:
|
|
344
|
-
stage: github
|
|
345
|
-
title: "Upload linux executable to github release"
|
|
346
|
-
image: codefresh/build-cli
|
|
347
|
-
commands:
|
|
348
|
-
# upload linux-x64 asset
|
|
349
|
-
- 'curl --fail -X POST -H "Content-Type:application/octet-stream" -H "Authorization: token ${{GITHUB_TOKEN}}" --data-binary @codefresh-v${{PACKAGE_VERSION}}-linux-x64.tar.gz https://uploads.github.com/repos/codefresh-io/cli/releases/${{GITHUB_RELEASE_ID}}/assets?name=codefresh-v${{PACKAGE_VERSION}}-linux-x64.tar.gz'
|
|
350
|
-
when:
|
|
351
|
-
steps:
|
|
352
|
-
- name: get_release
|
|
353
|
-
on:
|
|
354
|
-
- success
|
|
355
|
-
- name: archive_linux
|
|
356
|
-
on:
|
|
357
|
-
- success
|
|
358
|
-
|
|
359
|
-
upload_macos:
|
|
360
|
-
stage: github
|
|
361
|
-
title: "Upload macos executable to github release"
|
|
362
|
-
image: codefresh/build-cli
|
|
363
|
-
commands:
|
|
364
|
-
# upload macos-x64 asset
|
|
365
|
-
- 'curl --fail -X POST -H "Content-Type:application/octet-stream" -H "Authorization: token ${{GITHUB_TOKEN}}" --data-binary @codefresh-v${{PACKAGE_VERSION}}-macos-x64.tar.gz https://uploads.github.com/repos/codefresh-io/cli/releases/${{GITHUB_RELEASE_ID}}/assets?name=codefresh-v${{PACKAGE_VERSION}}-macos-x64.tar.gz'
|
|
366
|
-
when:
|
|
367
|
-
steps:
|
|
368
|
-
- name: get_release
|
|
369
|
-
on:
|
|
370
|
-
- success
|
|
371
|
-
- name: archive_macos
|
|
372
|
-
on:
|
|
373
|
-
- success
|
|
374
|
-
|
|
375
|
-
upload_win:
|
|
376
|
-
stage: github
|
|
377
|
-
title: "Upload win executable to github release"
|
|
378
|
-
image: codefresh/build-cli
|
|
379
|
-
commands:
|
|
380
|
-
# upload win-x64 asset
|
|
381
|
-
- 'curl --fail -X POST -H "Content-Type:application/octet-stream" -H "Authorization: token ${{GITHUB_TOKEN}}" --data-binary @codefresh-v${{PACKAGE_VERSION}}-win-x64.zip https://uploads.github.com/repos/codefresh-io/cli/releases/${{GITHUB_RELEASE_ID}}/assets?name=codefresh-v${{PACKAGE_VERSION}}-win-x64.zip'
|
|
382
|
-
when:
|
|
383
|
-
steps:
|
|
384
|
-
- name: get_release
|
|
385
|
-
on:
|
|
386
|
-
- success
|
|
387
|
-
- name: archive_win
|
|
388
|
-
on:
|
|
389
|
-
- success
|
|
390
|
-
|
|
391
|
-
upload_alpine:
|
|
392
|
-
stage: github
|
|
393
|
-
title: "Upload alpine executable to github release"
|
|
394
|
-
image: codefresh/build-cli
|
|
395
|
-
commands:
|
|
396
|
-
# upload alpine-x64 asset
|
|
397
|
-
- 'curl --fail -X POST -H "Content-Type:application/octet-stream" -H "Authorization: token ${{GITHUB_TOKEN}}" --data-binary @codefresh-v${{PACKAGE_VERSION}}-alpine-x64.tar.gz https://uploads.github.com/repos/codefresh-io/cli/releases/${{GITHUB_RELEASE_ID}}/assets?name=codefresh-v${{PACKAGE_VERSION}}-alpine-x64.tar.gz'
|
|
398
|
-
when:
|
|
399
|
-
steps:
|
|
400
|
-
- name: get_release
|
|
401
|
-
on:
|
|
402
|
-
- success
|
|
403
|
-
- name: archive_alpine
|
|
404
|
-
on:
|
|
405
|
-
- success
|
|
406
|
-
|
|
407
|
-
deploy_to_npm:
|
|
408
|
-
stage: packages
|
|
409
|
-
title: "Publishing To Npm"
|
|
410
|
-
type: npm-publish
|
|
411
|
-
arguments:
|
|
412
|
-
NPM_TOKEN: '${{NPM_TOKEN}}'
|
|
413
|
-
DIR: ./cli
|
|
414
|
-
when:
|
|
415
|
-
steps:
|
|
416
|
-
- name: generate_comletion
|
|
417
|
-
on:
|
|
418
|
-
- success
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
update_brew_formula:
|
|
422
|
-
stage: packages
|
|
423
|
-
title: "Updating homebrew formula"
|
|
424
|
-
image: codefresh/build-cli
|
|
425
|
-
commands:
|
|
426
|
-
- VERSION=v${{PACKAGE_VERSION}}
|
|
427
|
-
- curl -L https://github.com/codefresh-io/cli/releases/download/$VERSION/codefresh-$VERSION-macos-x64.tar.gz > $VERSION.tar.gz
|
|
428
|
-
- echo "compute SHA256 ..."
|
|
429
|
-
- SHA256="$(shasum -a 256 ./$VERSION.tar.gz | awk '{print $1}')"
|
|
430
|
-
- echo "generate file from template ..."
|
|
431
|
-
- sed -e "s/{{ VERSION }}/$VERSION/g" -e "s/{{ SHA256 }}/$SHA256/g" ./brew/template.rb > codefresh.rb
|
|
432
|
-
- echo "Updating file in GitHub"
|
|
433
|
-
- |
|
|
434
|
-
curl -v -i -X PUT -H 'Authorization: token '${{GITHUB_TOKEN}}'' -d "{ \
|
|
435
|
-
\"message\": \"update formula version $VERSION\", \
|
|
436
|
-
\"content\": \"$(openssl base64 -A -in codefresh.rb)\", \
|
|
437
|
-
\"sha\": $(curl -X GET https://api.github.com/repos/codefresh-io/homebrew-cli/contents/Formula/codefresh.rb | jq .sha) \
|
|
438
|
-
}" https://api.github.com/repos/codefresh-io/homebrew-cli/contents/Formula/codefresh.rb
|
|
439
|
-
when:
|
|
440
|
-
steps:
|
|
441
|
-
- name: upload_macos
|
|
442
|
-
on:
|
|
443
|
-
- success
|
|
444
|
-
|
|
445
|
-
update_documentation:
|
|
446
|
-
stage: documentation
|
|
447
|
-
title: "Update documentation http://cli.codefresh.io"
|
|
448
|
-
image: codefresh/build-cli
|
|
449
|
-
commands:
|
|
450
|
-
- "yarn"
|
|
451
|
-
- "echo cleaning previous public dir and recreating worktree"
|
|
452
|
-
- "rm -rf public && git worktree prune && git worktree add -B gh-pages public origin/gh-pages"
|
|
453
|
-
- "echo Building public docs"
|
|
454
|
-
- "yarn run build-public-docs"
|
|
455
|
-
- "echo Push new docs to gh-pages detached branch"
|
|
456
|
-
- 'git config --global user.email "auto-ci@codefresh.io" && git config --global user.name "Automated CI"'
|
|
457
|
-
- 'cd public && git add --all && git commit -m "Publish new documentation for version ${{PACKAGE_VERSION}}" && git push https://${{GITHUB_TOKEN}}@github.com/codefresh-io/cli.git'
|
|
458
|
-
environment:
|
|
459
|
-
- HUGO_VERSION=0.32.0
|
|
460
|
-
when:
|
|
461
|
-
steps:
|
|
462
|
-
- name: upload_linux
|
|
463
|
-
on:
|
|
464
|
-
- success
|
|
465
|
-
- name: upload_macos
|
|
466
|
-
on:
|
|
467
|
-
- success
|
|
468
|
-
- name: upload_win
|
|
469
|
-
on:
|
|
470
|
-
- success
|
|
471
|
-
- name: upload_alpine
|
|
472
|
-
on:
|
|
473
|
-
- success
|
|
474
|
-
- name: update_brew_formula
|
|
475
|
-
on:
|
|
476
|
-
- success
|
|
477
|
-
- name: deploy_to_npm
|
|
478
|
-
on:
|
|
479
|
-
- success
|
|
480
|
-
- name: create_manifest_list
|
|
481
|
-
on:
|
|
482
|
-
- success
|