Skip to content

Commit

Permalink
provision the appˆ
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Jan 22, 2024
1 parent e043485 commit ca10047
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .controlplane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export APP_NAME=react-webpack-rails-tutorial

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

# Build and push docker image to Control Plane repository
# Note, may take many minutes. Be patient.
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/deploy-to-control-plane/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ runs:
shell: bash
run: |
cpln profile update default
# cpln profile update default --token ${CPLN_TOKEN}
# Caching step
- uses: actions/cache@v2
Expand All @@ -49,6 +48,15 @@ runs:
${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile', '**/package.json', '**/yarn.lock') }}
${{ runner.os }}-docker-
- name: cpl setup-app
shell: bash
run: |
if ! cpl exists -a ${{ inputs.app_name }} ; then
cpl setup-app -a ${{ inputs.app_name }}
fi
# Provision all infrastructure on Control Plane.
# app react-webpack-rails-tutorial will be created per definition in .controlplane/controlplane.yml

- name: cpl build-image
shell: bash
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy-to-control-plane-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ jobs:
fi
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Get App Name
run: |
echo "APP_NAME=qa-react-webpack-rails-tutorial-pr-${{ env.PR_NUMBER }}" >> $GITHUB_ENV
echo "App Name: ${{ env.APP_NAME }}"
- uses: ./.github/actions/deploy-to-control-plane
with:
app_name: qa-react-webpack-rails-tutorial-pr-${{ env.PR_NUMBER }}
app_name: ${{ env.APP_NAME }}
org: ${{ secrets.CPLN_ORG_STAGING }}

0 comments on commit ca10047

Please sign in to comment.