This repository was archived by the owner on Mar 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathcodefresh.yml
More file actions
71 lines (64 loc) · 1.78 KB
/
codefresh.yml
File metadata and controls
71 lines (64 loc) · 1.78 KB
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
# Build a service with environment variables
version: '1.0'
steps:
init_variables:
title: Init variables
image: alpine
commands:
- cf_export BUILD_HARNESS_VERSION=0.9.0
- cf_export GIT_BRANCH=${{CF_BRANCH}}
build_image:
title: Build image
type: build
description: Build helmfiles
image_name: cloudposse/helmfiles
tag: '${{CF_REVISION}}'
registry: dockerhub
dockerfile: Dockerfile
semver:
title: Export semantic version
image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}}
working_directory: ${{build_image}}
commands:
- make semver/export >> ${{CF_VOLUME_PATH}}/env_vars_to_export
push_image_commit:
title: Push image with commit based semver tags
type: push
candidate: ${{build_image}}
registry: dockerhub
tags:
- "${{SEMVERSION_COMMIT_SHORT}}"
push_image_branch_to_dockerhub:
title: Push image with branch based semver tags
type: push
registry: dockerhub
image_name: cloudposse/helmfiles
candidate: ${{build_image}}
tags:
- "${{SEMVERSION_BRANCH}}"
when:
condition:
all:
executeForBranch: "'${{SEMVERSION_BRANCH}}' != ''"
push_image_tag_to_dockerhub:
title: Push image with tag based semver tags
type: push
registry: dockerhub
image_name: cloudposse/helmfiles
candidate: ${{build_image}}
tag: "${{SEMVERSION_TAG}}"
when:
condition:
all:
executeForTag: "'${{SEMVERSION_TAG}}' != ''"
push_image_latest_to_dockerhub:
title: Push image with latest tag
type: push
registry: dockerhub
image_name: cloudposse/helmfiles
candidate: ${{build_image}}
tag: latest
when:
condition:
all:
executeForMasterBranch: "'${{CF_BRANCH}}' == 'master'"