File tree Expand file tree Collapse file tree 3 files changed +18
-82
lines changed Expand file tree Collapse file tree 3 files changed +18
-82
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -129,14 +129,21 @@ jobs:
129129 /tmp/*.log
130130 ~/.replicated/
131131
132- - name : PR validation info
132+ cleanup :
133+ runs-on : ubuntu-22.04
134+ needs : [setup, test-deployment]
135+ if : always()
136+ steps :
137+ - name : Checkout code
138+ uses : actions/checkout@v4
139+
140+ - name : Setup tools
141+ uses : ./.github/actions/setup-tools
142+ with :
143+ app-dir : ${{ env.APP_DIR }}
144+
145+ - name : Cleanup PR resources
133146 run : |
134- echo "🎉 PR validation completed successfully!"
135- echo "📋 Resources created for this PR:"
136- echo " - Customer: ${{ needs.setup.outputs.channel-name }}"
137- echo " - Cluster: ${{ needs.setup.outputs.channel-name }}"
138- echo " - Channel: ${{ needs.setup.outputs.channel-name }}"
139- echo ""
140- echo "ℹ️ Resources will be automatically cleaned up when this PR is merged to main."
141- echo " For manual cleanup, run: task cleanup-pr-resources BRANCH_NAME=${{ needs.setup.outputs.channel-name }}"
147+ task cleanup-pr-resources BRANCH_NAME="${{ needs.setup.outputs.channel-name }}" || echo "Cleanup completed with some warnings"
148+ working-directory : ${{ env.APP_DIR }}
142149
Original file line number Diff line number Diff line change @@ -440,14 +440,7 @@ The `wg-easy-pr-validation.yaml` workflow is structured for maximum efficiency:
4404402 . ** Chart Packaging** - Builds once, shares artifacts between jobs
4414413 . ** Release Creation** - Creates Replicated channel and release
4424424 . ** Deployment Testing** - Tests full customer workflow
443-
444- ### PR Cleanup Workflow
445- The ` wg-easy-pr-cleanup.yaml ` workflow handles resource cleanup:
446-
447- - ** Triggers** : Only runs when PRs are merged to main (not on every PR update)
448- - ** Resources Cleaned** : Customers, clusters, and channels created during PR validation
449- - ** Smart Cleanup** : Uses the same ` task cleanup-pr-resources ` with proper branch name normalization
450- - ** Graceful Handling** : Continues cleanup even if some resources are already deleted
443+ 5 . ** Automatic Cleanup** - Cleans up PR resources
451444
452445### Reusable Actions
453446Located in ` .github/actions/ ` for consistent tool setup and operations:
@@ -465,14 +458,7 @@ Located in `.github/actions/` for consistent tool setup and operations:
465458- ** Maintainability** - Logic centralized in Taskfile, not scattered in YAML
466459
467460### Usage
468- ** PR Validation** : Runs automatically on pull requests affecting ` applications/wg-easy/ ` . Manual trigger available via ` workflow_dispatch ` .
469-
470- ** PR Cleanup** : Runs automatically when PRs are merged to main. Resources remain available during PR development for testing and debugging.
471-
472- ** Manual Cleanup** : If needed, cleanup can be run manually:
473- ``` bash
474- task cleanup-pr-resources BRANCH_NAME=$( git branch --show-current)
475- ```
461+ PR validation runs automatically on pull requests affecting ` applications/wg-easy/ ` . Manual trigger available via ` workflow_dispatch ` .
476462
477463## Future Considerations
478464
You can’t perform that action at this time.
0 commit comments