Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIENT-3005] CI/CD: Remove Github artifacts after uploading them to JFrog in each pipeline stage #638

Merged
merged 4 commits into from
Jun 20, 2024
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/bump-stage-and-upload-to-jfrog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
version: ${{ needs.promote-dev-build-to-rc.outputs.new_version }}
secrets: inherit

# See reason for deleting artifacts in dev-workflow-p2.yml
delete-artifacts:
needs: upload-rc-artifacts-to-jfrog
uses: ./.github/workflows/delete-artifacts.yml

ff-dev-to-stage:
name: Fast forward dev branch to stage branch to include the bump to RC commit
needs: promote-dev-build-to-rc
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/delete-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
workflow_call:

jobs:
delete-artifacts:
runs-on: ubuntu-22.04
steps:
- name: Remove artifacts with dev version
uses: geekyeggo/delete-artifact@v5
with:
name: '*.build'
5 changes: 5 additions & 0 deletions .github/workflows/dev-workflow-p2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ jobs:
with:
version: ${{ needs.bump-dev-number.outputs.new_version }}
secrets: inherit

# We don't want the artifacts in JFrog to also exist in Github
delete-artifacts:
needs: upload-to-jfrog
uses: ./.github/workflows/delete-artifacts.yml
8 changes: 8 additions & 0 deletions .github/workflows/stage-to-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ jobs:
packages-dir: artifacts/
password: ${{ secrets.PYPI_API_TOKEN }}

# See reason for deleting artifacts in dev-workflow-p2.yml
delete-artifacts:
needs: [
upload-to-jfrog,
publish-to-pypi
]
uses: ./.github/workflows/delete-artifacts.yml

fast-forward-stage-to-master:
needs: build-artifacts
uses: ./.github/workflows/fast-forward-merge.yml
Expand Down
Loading