-
Notifications
You must be signed in to change notification settings - Fork 1
/
codefresh.yml
executable file
·84 lines (78 loc) · 2.71 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
version: '1.0'
steps:
build_step:
type: build
title: Build getupgraded/online-payments_frontend
working_directory: ${{main_clone}}
dockerfile: dockerfiles/production
image_name: getupgraded/online-payments_frontend
tag: ${{CF_BRANCH_TAG_NORMALIZED}}
fail_fast: false
push_latest_tag_step:
type: push
title: Push getupgraded/online-payments_frontend
candidate: ${{build_step}}
tag: 'latest'
registry: ecr
fail_fast: false
when:
branch:
only:
- master
- develop
push_commit_tag_step:
type: push
title: Push getupgraded/online-payments_frontend
candidate: ${{build_step}}
tag: '${{CF_SHORT_REVISION}}'
registry: ecr
fail_fast: false
when:
branch:
only:
- master
- develop
deploy_k8s_staging_step:
title: Deploy getupgraded/online-payments_frontend
description: "[Staging] Deploy getupgraded/online-payments_frontend image to online-payments_frontend."
image: codefresh/cf-deploy-kubernetes:latest
commands:
- /cf-deploy-kubernetes kubernetes/online-payments_frontend-staging.yml.tmpl
environment:
- KUBERNETES_USER=${{KUBERNETES_USER}}
- KUBERNETES_PASSWORD=${{KUBERNETES_PASSWORD}}
- KUBERNETES_SERVER=${{KUBERNETES_SERVER}}
- KUBERNETES_NAMESPACE=staging
when:
branch:
only:
- develop
# deploy_k8s_production_step:
# title: Deploy getupgraded/online-payments_frontend
# description: "[Production] Deploy getupgraded/online-payments_frontend image to online-payments_frontend."
# image: codefresh/cf-deploy-kubernetes:latest
# commands:
# - /cf-deploy-kubernetes kubernetes/online-payments_frontend.yml.tmpl
# environment:
# - KUBERNETES_USER=${{KUBERNETES_USER}}
# - KUBERNETES_PASSWORD=${{KUBERNETES_PASSWORD}}
# - KUBERNETES_SERVER=${{KUBERNETES_SERVER}}
# - KUBERNETES_NAMESPACE=${{KUBERNETES_NAMESPACE}}
# when:
# branch:
# only:
# - master
slack_notification_step:
title: Notify deploy in Slack
description: Send a Slack notification to developers on deployment.
image: tutum/curl
commands:
- curl -X POST --data-urlencode 'payload={"text":"Finished production rollout of new release for `getupgraded/online-payments_frontend` (<https://github.com/getupgraded/online-payments_frontend/commit/${{CF_SHORT_REVISION}}|${{CF_SHORT_REVISION}}>) to `${{KUBERNETES_NAMESPACE}}.`"}' ${{SLACK_WEBHOOK_URL}}
environment:
- SLACK_WEBHOOK_URL=${{SLACK_WEBHOOK_URL}}
- CF_SHORT_REVISION=${{CF_SHORT_REVISION}}
- KUBERNETES_NAMESPACE=${{KUBERNETES_NAMESPACE}}
when:
branch:
only:
- master