Skip to content

Commit

Permalink
fix org
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Jan 29, 2025
1 parent 1ef522b commit 269c684
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
13 changes: 7 additions & 6 deletions .controlplane/controlplane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,24 @@ aliases:

apps:
react-webpack-rails-tutorial-production:
# Simulate Production Version
# Simulate Production Version. Create with this command:
# cpflow apply-template app postgres redis daily-task rails -a react-webpack-rails-tutorial-production -o shakacode-open-source-examples-production
<<: *common
# Don't allow overriding the org and app by ENV vars b/c production is sensitive!
allow_org_override_by_env: false
allow_app_override_by_env: false

# Use a different organization for production.
cpln_org: shakacode-open-source-examples
# Use a different organization only for production.
cpln_org: shakacode-open-source-examples-production

upstream: react-webpack-rails-tutorial-staging

react-webpack-rails-tutorial-staging:
<<: *common
# QA Apps are like Heroku review apps, but the use `prefix` so you can run a commmand like
# this to create a QA app for the tutorial app.
# `cpflow setup gvc postgres redis rails -a qa-react-webpack-rails-tutorial-pr-1234`
qa-react-webpack-rails-tutorial:
# Review Apps are like Heroku review apps, but the use `prefix` so you can run a command like
# this to create a QA app for the tutorial app.
# `cpflow setup-app -a qa-react-webpack-rails-tutorial-pr-1234`
<<: *common
# Order matters!
setup_app_templates:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/promote-staging-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
promote-to-production:
runs-on: ubuntu-latest
if: github.event.inputs.confirm_promotion == 'promote'

env:
APP_NAME: ${{ vars.PRODUCTION_APP_NAME }}
CPLN_ORG: ${{ vars.CPLN_ORG_PRODUCTION }}
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_PRODUCTION }}
UPSTREAM_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
Expand All @@ -39,13 +39,13 @@ jobs:
run: |
echo "🚀 Starting promotion from staging to production... for app ${APP_NAME}"
if ! cpflow promote-app-from-upstream -a "${APP_NAME}" -t "${UPSTREAM_TOKEN}" --org "${CPLN_ORG}"; then
if ! cpflow promote-app-from-upstream -a "${APP_NAME}" -t "${UPSTREAM_TOKEN}" --org "${CPLN_ORG}" --verbose --trace ; then
echo "❌ Failed to promote staging to production"
exit 1
fi
echo "✅ Successfully promoted staging to production"
- name: Create GitHub Release
if: success()
env:
Expand Down

0 comments on commit 269c684

Please sign in to comment.