diff --git a/.controlplane/controlplane.yml b/.controlplane/controlplane.yml index f394fe1c..1d6c75f9 100644 --- a/.controlplane/controlplane.yml +++ b/.controlplane/controlplane.yml @@ -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: diff --git a/.github/workflows/promote-staging-to-production.yml b/.github/workflows/promote-staging-to-production.yml index 62a82a89..5788a52d 100644 --- a/.github/workflows/promote-staging-to-production.yml +++ b/.github/workflows/promote-staging-to-production.yml @@ -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: @@ -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: