forked from alexei-led/pumba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodefresh.yaml
102 lines (92 loc) · 2.84 KB
/
codefresh.yaml
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
95
96
97
98
99
100
101
102
version: '1.0'
steps:
# BUG: Codefrehs does not support target option
get_release_info:
image: codefreshio/git-image:latest
commands:
- cf_export GIT_MOST_RECENT_TAG="$(git describe --tags --abbrev=0)"
- cf_export GIT_TAG_MESSAGE=$(git tag -l $GIT_MOST_RECENT_TAG -n 20 | awk '{$1=""; print}')
when:
branch:
only:
- /[0-9]+[.][0-9]+[.][0-9]+/
# test_build:
# type: build
# dockerfile: docker/Dockerfile
# target: build-and-test
# title: "multi-stage build: target==build-and-test ..."
# description: compile for linux amd64
# image_name: gaiaadm/pumba/test
# no_cf_cache: true
# build_arguments:
# - VCS_COMMIT_ID=${{CF_REVISION}}
# - VCS_BRANCH_NAME=${{CF_BRANCH}}
# - VCS_SLUG=${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
# - CODECOV_TOKEN=${{CODECOV_TOKEN}}
# report_coverage:
# image: ${{test_build}}
# title: "Uploading coverage report to Codecov.io ..."
# description: upload coverage report
# environment:
# - CI_BUILD_ID=${{CF_BUILD_ID}}
# - CI_BUILD_URL=${{CF_BUILD_URL}}
main_build:
type: build
dockerfile: docker/Dockerfile
title: "multi-stage build ..."
description: compile for linux amd64
image_name: gaiaadm/pumba
no_cf_cache: true
build_arguments:
- VCS_COMMIT_ID=${{CF_REVISION}}
- VCS_BRANCH_NAME=${{CF_BRANCH}}
- VCS_SLUG=${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
- CODECOV_TOKEN=${{CODECOV_TOKEN}}
gox_build:
type: build
dockerfile: docker/Dockerfile
title: "Building and releasing to the GitHub ..."
description: cross-platform compile, run unit tests, release to the GitHub
image_name: pumba/github/release
no_cf_cache: true
build_arguments:
- RELEASE=true
- VCS_COMMIT_ID=${{CF_REVISION}}
- VCS_BRANCH_NAME=${{CF_BRANCH}}
- VCS_SLUG=${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
- RELEASE_TAG=${{GIT_MOST_RECENT_TAG}}
- TAG_MESSAGE="${{GIT_TAG_MESSAGE}}"
- GITHUB_TOKEN=${{GITHUB_TOKEN}}
when:
branch:
only:
- /[0-9]+[.][0-9]+[.][0-9]+/
push_branch:
type: push
title: "Pushing pumba:branch ..."
description: Push Pumba image to DockerHub
candidate: ${{main_build}}
tag: ${{CF_BRANCH}}
image_name: gaiaadm/pumba
push_revision:
type: push
title: "Pushing pumba:branch-revision ..."
description: Push Pumba image to the DockerHub
candidate: ${{main_build}}
tag: ${{CF_BRANCH}}-${{CF_SHORT_REVISION}}
image_name: gaiaadm/pumba
when:
branch:
ignore:
- /[0-9]+[.][0-9]+[.][0-9]+/
push_latest:
type: push
title: "Pushing pumba:latest ..."
description: Push Pumba image to the DockerHub
candidate: ${{main_build}}
tag: latest
image_name: gaiaadm/pumba
when:
branch:
only:
- master