Skip to content

Commit d886a51

Browse files
fix pipeline
1 parent f69bf94 commit d886a51

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

codefresh.yaml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,43 @@ version: "1.0"
55
mode: parallel
66
# Stages can help you organize your steps in stages
77
stages:
8+
- "prepare"
89
- "clone"
910
- "build"
1011
- "test"
1112

1213
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"
2014

21-
export_image_tag:
15+
preapre_env:
2216
title: "Export image tag"
2317
type: freestyle
24-
stage: build
18+
stage: prepare
2519
image: alpine
2620
commands:
2721
- |
2822
export isRelease="${{RELEASE}}"
2923
if [[ "$isRelease" == "true" ]]; then
3024
export IMAGE_TAG="${{CF_RELEASE_TAG}}"
25+
export CLONE_REVISION="${{CF_RELEASE_TAG}}"
3126
else
3227
export IMAGE_TAG="${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}}"
28+
export CLONE_REVISION="${{CF_BRANCH}}"
3329
fi
3430
35-
cf_export IMAGE_TAG
31+
cf_export IMAGE_TAG CLONE_REVISION
3632
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
3745

3846
build_v1:
3947
title: "Build v1"
@@ -57,9 +65,6 @@ steps:
5765
- name: clone
5866
on:
5967
- success
60-
- name: export_image_tag
61-
on:
62-
- success
6368

6469
build_v2:
6570
title: "Build v2"
@@ -86,10 +91,6 @@ steps:
8691
- name: build_v1
8792
on:
8893
- success
89-
- name: export_image_tag
90-
on:
91-
- success
92-
9394

9495
create_clusters:
9596
title: 'Create k3d clusters'

0 commit comments

Comments
 (0)