@@ -5,35 +5,43 @@ version: "1.0"
5
5
mode : parallel
6
6
# Stages can help you organize your steps in stages
7
7
stages :
8
+ - " prepare"
8
9
- " clone"
9
10
- " build"
10
11
- " test"
11
12
12
13
steps :
13
- clone :
14
- title : " Cloning repository"
15
- type : " git-clone"
16
- repo : " codefresh-contrib/vcluster-prometheus-operator-plugin"
17
- revision : " ${{CF_BRANCH}}"
18
- git : " codefresh-git-integration-contrib"
19
- stage : " clone"
20
14
21
- export_image_tag :
22
- title : " Export image tag "
15
+ preapre_env :
16
+ title : " Prepare variables "
23
17
type : freestyle
24
- stage : build
18
+ stage : prepare
25
19
image : alpine
26
20
commands :
27
21
- |
28
22
export isRelease="${{RELEASE}}"
29
23
if [[ "$isRelease" == "true" ]]; then
30
24
export IMAGE_TAG="${{CF_RELEASE_TAG}}"
25
+ export CLONE_REVISION="${{CF_RELEASE_TAG}}"
31
26
else
32
27
export IMAGE_TAG="${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}}"
28
+ export CLONE_REVISION="${{CF_BRANCH}}"
33
29
fi
34
30
35
- cf_export IMAGE_TAG
31
+ cf_export IMAGE_TAG CLONE_REVISION
36
32
33
+ clone :
34
+ title : " Cloning repository"
35
+ type : " git-clone"
36
+ repo : " codefresh-contrib/vcluster-prometheus-operator-plugin"
37
+ revision : " ${{CLONE_REVISION}}"
38
+ git : " codefresh-git-integration-contrib"
39
+ stage : " clone"
40
+ when :
41
+ steps :
42
+ - name : preapre_env
43
+ on :
44
+ - success
37
45
38
46
build_v1 :
39
47
title : " Build v1"
@@ -50,16 +58,13 @@ steps:
50
58
builder :
51
59
driver_opts : " image=moby/buildkit:v0.14.1"
52
60
cache_from :
53
- - ghcr.io/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}:v1-${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE }}
61
+ - ghcr.io/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}:v1-${{IMAGE_TAG }}
54
62
- ghcr.io/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}:v1-main
55
63
when :
56
64
steps :
57
65
- name : clone
58
66
on :
59
67
- success
60
- - name : export_image_tag
61
- on :
62
- - success
63
68
64
69
build_v2 :
65
70
title : " Build v2"
76
81
builder :
77
82
driver_opts : " image=moby/buildkit:v0.14.1"
78
83
cache_from :
79
- - ghcr.io/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}:v2-${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE }}
84
+ - ghcr.io/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}:v2-${{IMAGE_TAG }}
80
85
- ghcr.io/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}:v2-main
81
86
when :
82
87
steps :
@@ -86,10 +91,6 @@ steps:
86
91
- name : build_v1
87
92
on :
88
93
- success
89
- - name : export_image_tag
90
- on :
91
- - success
92
-
93
94
94
95
create_clusters :
95
96
title : ' Create k3d clusters'
0 commit comments