Skip to content

Commit ca10047

Browse files
committed
provision the appˆ
1 parent e043485 commit ca10047

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.controlplane/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export APP_NAME=react-webpack-rails-tutorial
6363

6464
# Provision all infrastructure on Control Plane.
6565
# app react-webpack-rails-tutorial will be created per definition in .controlplane/controlplane.yml
66-
cpl apply-template gvc postgres redis rails daily-task -a $APP_NAME
66+
cpl setup-app -a $APP_NAME
6767

6868
# Build and push docker image to Control Plane repository
6969
# Note, may take many minutes. Be patient.

.github/actions/deploy-to-control-plane/action.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ runs:
3838
shell: bash
3939
run: |
4040
cpln profile update default
41-
# cpln profile update default --token ${CPLN_TOKEN}
4241
4342
# Caching step
4443
- uses: actions/cache@v2
@@ -49,6 +48,15 @@ runs:
4948
${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile', '**/package.json', '**/yarn.lock') }}
5049
${{ runner.os }}-docker-
5150
51+
- name: cpl setup-app
52+
shell: bash
53+
run: |
54+
if ! cpl exists -a ${{ inputs.app_name }} ; then
55+
cpl setup-app -a ${{ inputs.app_name }}
56+
fi
57+
# Provision all infrastructure on Control Plane.
58+
# app react-webpack-rails-tutorial will be created per definition in .controlplane/controlplane.yml
59+
5260
- name: cpl build-image
5361
shell: bash
5462
run: |

.github/workflows/deploy-to-control-plane-review.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ jobs:
4545
fi
4646
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
4747
48+
- name: Get App Name
49+
run: |
50+
echo "APP_NAME=qa-react-webpack-rails-tutorial-pr-${{ env.PR_NUMBER }}" >> $GITHUB_ENV
51+
echo "App Name: ${{ env.APP_NAME }}"
52+
4853
- uses: ./.github/actions/deploy-to-control-plane
4954
with:
50-
app_name: qa-react-webpack-rails-tutorial-pr-${{ env.PR_NUMBER }}
55+
app_name: ${{ env.APP_NAME }}
5156
org: ${{ secrets.CPLN_ORG_STAGING }}

0 commit comments

Comments
 (0)