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

CI - adding cleanup step in merge workflows #4111

Merged
merged 1 commit into from
Sep 25, 2023
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/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,8 @@ jobs:
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"

- name: clean up workspace
if: ${{ always() }}
run: |
rm -rf ./*
rm -rf ./.??*
23 changes: 23 additions & 0 deletions .github/workflows/dockers_builder_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: force chown to avoid errors
run: sudo chown -R $USER:$USER .
- name: Git config
run: git config --global --add safe.directory /__w/navitia/navitia
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y httpie
Expand Down Expand Up @@ -82,12 +84,20 @@ jobs:
run: |
echo '{"text":":warning: Github Actions: workflow dockers_builder_dev Job front_bullseye_builder is failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}}

- name: clean up workspace
if: ${{ always() }}
run: |
rm -rf ./*
rm -rf ./.??*

front_jessie_builder:
runs-on: [self-hosted, corefront, sandbox]
name: Front Jessie builder (Dev)
steps:
- name: force chown to avoid errors
run: sudo chown -R $USER:$USER .
- name: Git config
run: git config --global --add safe.directory /__w/navitia/navitia
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y httpie
Expand Down Expand Up @@ -152,13 +162,20 @@ jobs:
run: |
echo '{"text":":warning: Github Actions: workflow dockers_builder_dev Job front_jessie_builder is failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}}

- name: clean up workspace
if: ${{ always() }}
run: |
rm -rf ./*
rm -rf ./.??*

backend_jessie_builder:
runs-on: [self-hosted, kraken, sandbox]
name: Backend Jessie builder (Dev)
steps:
- name: force chown to avoid errors
run: sudo chown -R $USER:$USER .
- name: Git config
run: git config --global --add safe.directory /__w/navitia/navitia
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y zip httpie curl python3 python3-pip
Expand Down Expand Up @@ -275,6 +292,12 @@ jobs:
run: |
echo '{"text":":warning: Github Actions: workflow dockers_builder_dev Job backend_jessie_builder is failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}}

- name: clean up workspace
if: ${{ always() }}
run: |
rm -rf ./*
rm -rf ./.??*

publish_aws:
runs-on: [self-hosted, corefront, sandbox]
name: Aws Dispatch (Dev)
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/publish_navitia_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: force chown to avoid errors
run: chown -R $USER:$USER .
- name: Git config
run: git config --global --add safe.directory /__w/navitia/navitia
- name: Checkout
uses: actions/checkout@v3
- name: Build website in Slate format
Expand All @@ -40,3 +42,9 @@ jobs:
if: failure()
run: |
echo '{"text":":warning: Navitia Github Actions: publish_navitia_documentation failed ! (https://github.com/hove-io/navitia/actions?query=workflow%3A%22Publish+Navitia+Documentation%22)"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}}

- name: clean up workspace
if: ${{ always() }}
run: |
rm -rf ./*
rm -rf ./.??*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why do we need this second line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm -rf ./* does not remove dot files. The second line is to force the removal of .git (and other existing dot things)

Copy link
Contributor

@woshilapin woshilapin Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but why the ? (doubled). I thought ./.* would have been enough 🤔 Is it to avoid matching . (current directory) and .. (parent directory)?