Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
cd charts/quickstart-openshift-emerald
yq eval '.global.enabled=false' -i values-"$DEPLOYMENT_NUMBER".yaml

# We always run this to avoid deleting developer databases on commit pushes after a PR is opened
# there is a small edge case where a cleanup could be interrupted by this if 2 PRs open closely together
- name: Unset / No-op Crunchy development DB cleanup
run: |
PR_VALUES_FILEPATH=charts/quickstart-openshift-emerald/charts/database/values.yaml ./.github/scripts/crunchy.sh u

- name: Commit and push update
shell: bash
run: |
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ jobs:
yq eval '.global.enabled=true' -i values-"$DEPLOYMENT_NUMBER".yaml
yq eval '.global.tag="${{ needs.builds.outputs.sha }}"' -i values-"$DEPLOYMENT_NUMBER".yaml

# We always run this to avoid deleting developer databases on commit pushes after a PR is opened
# there is a small edge case where a cleanup could be interrupted by this if 2 PRs open closely together
- name: Unset / No-op Crunchy development DB cleanup
run: |
PR_VALUES_FILEPATH=charts/quickstart-openshift-emerald/charts/database/values.yaml ./.github/scripts/crunchy.sh u

# On a newly opened PR we drop the old database and crunchy will standup a fresh db
- name: Refresh developer database for newly opened PR
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') }}
run: |
DEPLOYMENT_NUMBER=${{ steps.get-deployment-number.outputs.DEPLOYMENT_NUMBER }}
PR_VALUES_FILEPATH=charts/quickstart-openshift-emerald/charts/database/values.yaml ./.github/scripts/crunchy.sh s $DEPLOYMENT_NUMBER

- name: Commit and push update
shell: bash
Expand Down
Loading