forked from codefresh-contrib/cfstep-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
94 lines (88 loc) · 2.35 KB
/
codefresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '1.0'
steps:
define_the_versions_list:
image: alpine
commands:
- |-
cat <<EOF > helmVersionsList
2.9.0
2.9.1
2.10.0
2.11.0
2.12.0
2.12.1
2.12.2
2.12.3
2.13.0
2.13.1
2.14.0
2.14.1
2.14.2
2.14.3
2.15.0
2.15.1
2.15.2
2.16.0
2.16.1
3.0.0-beta.2
3.0.0-beta.3
3.0.0
3.0.1
3.0.2
when:
condition:
all:
notRecursivelyInvoked: 'includes("${{HELM_VERSION}}", "${{") == true'
run-cli-loop:
image: codefresh/cli
commands:
- for VAR in $(cat helmVersionsList); do codefresh wait $(codefresh run ${{CF_PIPELINE_NAME}} -d --branch ${{CF_BRANCH}} --variable HELM_VERSION=${VAR} --trigger ${{CF_PIPELINE_TRIGGER_ID}} --context github) & done
- for j in $(jobs -p); do wait $j || (echo "Failed to build one of the images" && ! break); done
when:
condition:
all:
notRecursivelyInvoked: 'includes("${{HELM_VERSION}}", "${{") == true'
clone:
type: git-clone
arguments:
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
git: github
revision: '${{CF_REVISION}}'
when:
condition:
all:
recursivelyInvoked: 'includes("${{HELM_VERSION}}", "${{") == false'
build_image:
type: build
working_directory: '${{clone}}'
image_name: '${{STEP_IMAGE}}'
tag: '${{HELM_VERSION}}-${{CF_SHORT_REVISION}}'
build_arguments:
- 'HELM_VERSION=${{HELM_VERSION}}'
- 'S3_PLUGIN_VERSION=0.8.0'
- 'GCS_PLUGIN_VERSION=0.2.0'
- 'PUSH_PLUGIN_VERSION=0.7.1'
when:
condition:
all:
recursivelyInvoked: 'includes("${{HELM_VERSION}}", "${{") == false'
push:
type: push
registry: dockerhub
tag: ${{HELM_VERSION}}
candidate: ${{build_image}}
when:
condition:
all:
recursivelyInvoked: 'includes("${{HELM_VERSION}}", "${{") == false'
masterBranch: 'match("${{CF_BRANCH}}", "^master", true) == true'
push_latest:
type: push
registry: dockerhub
tag: latest
candidate: ${{build_image}}
when:
condition:
all:
latestHelmVersion: "'${{HELM_VERSION}}' == '${{LATEST_VERSION}}'"
masterBranch: "'${{CF_BRANCH}}' == 'master'"