File tree 5 files changed +13
-28
lines changed
.github/actions/deploy-to-control-plane
5 files changed +13
-28
lines changed Original file line number Diff line number Diff line change 20
20
- rake
21
21
- daily
22
22
inheritEnv : true
23
- image : " /org/APP_ORG/image/APP_IMAGE "
23
+ image : {{APP_IMAGE_LINK}}
24
24
defaultOptions :
25
25
autoscaling :
26
26
minScale : 1
30
30
external :
31
31
outboundAllowCIDR :
32
32
- 0.0.0.0/0
33
- identityLink : /org/APP_ORG/gvc/APP_GVC/identity/postgres-poc-identity
Original file line number Diff line number Diff line change 1
1
# Template setup of the GVC, roughly corresponding to a Heroku app
2
2
kind : gvc
3
- name : APP_GVC
3
+ name : {{APP_NAME}}
4
4
spec :
5
5
# For using templates for test apps, put ENV values here, stored in git repo.
6
6
# Production apps will have values configured manually after app creation.
7
7
env :
8
8
- name : DATABASE_URL
9
- # Password does not matter because host postgres.APP_GVC .cpln.local can only be accessed
9
+ # Password does not matter because host postgres.{{APP_NAME}} .cpln.local can only be accessed
10
10
# locally within CPLN GVC, and postgres running on a CPLN workload is something only for a
11
11
# test app that lacks persistence.
12
- value : ' postgres://the_user:the_password@postgres.APP_GVC .cpln.local:5432/APP_GVC '
12
+ value : ' postgres://the_user:the_password@postgres.{{APP_NAME}} .cpln.local:5432/{{APP_NAME}} '
13
13
- name : RAILS_ENV
14
14
value : production
15
15
- name : NODE_ENV
18
18
value : ' true'
19
19
- name : REDIS_URL
20
20
# No password for GVC local Redis. See comment above for postgres.
21
- value : ' redis://redis.APP_GVC .cpln.local:6379'
21
+ value : ' redis://redis.{{APP_NAME}} .cpln.local:6379'
22
22
# Part of standard configuration
23
23
staticPlacement :
24
24
locationLinks :
25
- - /org/APP_ORG/location/APP_LOCATION
25
+ - {{APP_LOCATION_LINK}}
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ bindings:
106
106
# - use
107
107
# - view
108
108
principalLinks :
109
- - //gvc/APP_GVC /identity/postgres-poc-identity
109
+ - //gvc/{{APP_NAME}} /identity/postgres-poc-identity
110
110
targetKind : secret
111
111
targetLinks :
112
112
- //secret/postgres-poc-credentials
@@ -139,9 +139,6 @@ spec:
139
139
args :
140
140
- " -c"
141
141
- " cat /usr/local/bin/cpln-entrypoint.sh >> ./cpln-entrypoint.sh && chmod u+x ./cpln-entrypoint.sh && ./cpln-entrypoint.sh postgres"
142
- # command: "cpln-entrypoint.sh"
143
- # args:
144
- # - "postgres"
145
142
ports :
146
143
- number : 5432
147
144
protocol : tcp
Original file line number Diff line number Diff line change 14
14
value : debug
15
15
# Inherit other ENV values from GVC
16
16
inheritEnv : true
17
- image : ' /org/APP_ORG/image/APP_IMAGE '
17
+ image : {{APP_IMAGE_LINK}}
18
18
# 512 corresponds to a standard 1x dyno type
19
19
memory : 512Mi
20
20
ports :
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ name: Deploy-To-Control-Plane
4
4
description : ' Deploys both to staging and to review apps'
5
5
6
6
inputs :
7
- # The name of the app to deploy
8
7
app_name :
9
8
description : ' The name of the app to deploy'
10
9
required : true
27
26
run : |
28
27
sudo npm install -g @controlplane/cli
29
28
cpln --version
30
- gem install cpl -v 1.2.0
31
-
29
+ gem install cpl
30
+ cpl --version
32
31
- name : Set Short SHA
33
32
id : vars
34
33
shell : bash
@@ -56,23 +55,13 @@ runs:
56
55
fi
57
56
# Provision all infrastructure on Control Plane.
58
57
# app react-webpack-rails-tutorial will be created per definition in .controlplane/controlplane.yml
59
-
60
58
- name : cpl build-image
61
59
shell : bash
62
60
run : |
63
61
cpln image docker-login
64
- cpl build-image -a ${{ inputs.app_name }} --commit ${{steps.vars.outputs.sha_short}} --org ${{inputs.org}}
65
- # --cache /tmp/.docker-cache
66
-
67
- - name : Run release script
68
- shell : bash
69
- run : |
70
- # Run database migrations (or other release tasks) with the latest image,
71
- # while the app is still running on the previous image.
72
- # This is analogous to the release phase.
73
- cpl run:detached './.controlplane/release_script.sh' -a ${{ inputs.app_name }} --image latest
74
-
62
+ BUILDKIT_PROGRESS=plain cpl build-image -a ${{ inputs.app_name }} --commit ${{steps.vars.outputs.sha_short}} --org ${{inputs.org}}
63
+ # --cache /tmp/.docker-cache
75
64
- name : Deploy to Control Plane
76
65
shell : bash
77
66
run : |
78
- cpl deploy-image -a ${{ inputs.app_name }} --org ${{inputs.org}}
67
+ cpl deploy-image -a ${{ inputs.app_name }} --run-release-phase -- org ${{inputs.org}}
You can’t perform that action at this time.
0 commit comments