-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into upgrade-envoy-version210
Signed-off-by: Lukasz Dziedziak <[email protected]>
- Loading branch information
Showing
575 changed files
with
3,762 additions
and
2,523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
### Checklist prior to review | ||
## Motivation | ||
|
||
<!-- | ||
Each of these sections need to be filled by the author when opening the PR. | ||
<!-- Why are we doing this change --> | ||
|
||
If something doesn't apply please check the box and add a justification after the `--` | ||
--> | ||
## Implementation information | ||
|
||
<!-- Explain how this was done and potentially alternatives considered and discarded --> | ||
|
||
- [ ] [Link to relevant issue][1] as well as docs and UI issues -- | ||
- [ ] This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like `syscall.Mkfifo` have equivalent implementation on the other OS -- | ||
- [ ] Tests (Unit test, E2E tests, manual test on universal and k8s) -- | ||
- Don't forget `ci/` labels to run additional/fewer tests | ||
- [ ] Do you need to update [`UPGRADE.md`](../blob/master/UPGRADE.md)? -- | ||
- [ ] Does it need to be backported according to the [backporting policy](../blob/master/CONTRIBUTING.md#backporting)? ([this](https://github.com/kumahq/kuma/actions/workflows/auto-backport.yaml) GH action will add "backport" label based on these [file globs](https://github.com/kumahq/kuma/blob/master/.github/workflows/auto-backport.yaml#L6), if you want to prevent it from adding the "backport" label use [no-backport-autolabel](https://github.com/kumahq/kuma/blob/master/.github/workflows/auto-backport.yaml#L8) label) -- | ||
## Supporting documentation | ||
|
||
<!-- Is there a MADR? An Issue? A related PR? --> | ||
|
||
Fix #XX | ||
|
||
<!-- | ||
> Changelog: skip | ||
--> | ||
<!-- | ||
Uncomment the above section to explicitly set a [`> Changelog:` entry here](https://github.com/kumahq/kuma/blob/master/CONTRIBUTING.md#submitting-a-patch)? | ||
--> | ||
|
||
[1]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Check CI stability for PRs with "ci/verify-stability" or "ci/verify-stability-merge-master" label | ||
|
||
on: | ||
schedule: | ||
# Monday to Friday: Every 2 hours from 7 PM to 7 AM CEST | ||
- cron: "0 17 * * 1-5" | ||
- cron: "0 19 * * 1-5" | ||
- cron: "0 21 * * 1-5" | ||
- cron: "0 23 * * 1-5" | ||
- cron: "0 1 * * 2-6" | ||
- cron: "0 3 * * 2-6" | ||
- cron: "0 5 * * 2-6" | ||
# Saturday and Sunday: Every 2 hours all day | ||
- cron: "0 */2 * * 6,0" | ||
workflow_dispatch: # Allows manual trigger from GitHub Actions UI | ||
env: | ||
GH_USER: "github-actions[bot]" | ||
GH_EMAIL: "<41898282+github-actions[bot]@users.noreply.github.com>" | ||
jobs: | ||
trigger-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate GitHub app token | ||
id: github-app-token | ||
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ steps.github-app-token.outputs.token }} | ||
- name: Get open pull requests and save to file | ||
run: | | ||
gh pr list --json number,labels > open_prs.json | ||
env: | ||
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} | ||
- name: Process PRs | ||
id: process_prs | ||
run: | | ||
cat open_prs.json | ||
pr_numbers_with_verify_stability=$(jq -r '.[] | select(.labels[]?.name == "ci/verify-stability") | .number' open_prs.json) | ||
pr_numbers_with_verify_stability_merge_master=$(jq -r '.[] | select(.labels[]?.name == "ci/verify-stability-merge-master") | .number' open_prs.json) | ||
echo "PRs with 'ci/verify-stability' label: $pr_numbers_with_verify_stability" | ||
echo "PRs with 'ci/verify-stability-merge-master' label: $pr_numbers_with_verify_stability_merge_master" | ||
echo "pr_numbers_with_verify_stability=$pr_numbers_with_verify_stability" >> $GITHUB_OUTPUT | ||
echo "pr_numbers_with_verify_stability_merge_master=$pr_numbers_with_verify_stability_merge_master" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} | ||
- name: Merge master branch (if applicable) and push a single commit | ||
if: steps.process_prs.outputs.pr_numbers_with_verify_stability != '' | ||
run: | | ||
for pr_number in ${{ steps.process_prs.outputs.pr_numbers_with_verify_stability }}; do | ||
current_datetime=$(date +"%Y-%m-%d %H:%M:%S") | ||
echo "Processing PR #$pr_number" | ||
# Fetch PR details to get the base branch (original branch name) | ||
pr_branch=$(gh pr view $pr_number --json headRefName --jq '.headRefName') | ||
echo "The original branch for PR #$pr_number is $pr_branch" | ||
git fetch origin pull/$pr_number/head:$pr_branch | ||
git checkout $pr_branch | ||
git config user.name "${GH_USER}" | ||
git config user.email "${GH_EMAIL}" | ||
# Check if the PR needs to merge with master | ||
if echo "${{ steps.process_prs.outputs.pr_numbers_with_verify_stability_merge_master }}" | grep -wq "$pr_number"; then | ||
echo "Merging master into PR #$pr_number" | ||
git fetch origin master | ||
git merge origin/master --no-ff --no-commit | ||
git commit --allow-empty -m "Merge master into PR #$pr_number" | ||
fi | ||
# Commit an empty commit to trigger the CI | ||
echo "Pushing empty commit to trigger CI for PR #$pr_number on $current_datetime" | ||
git commit --allow-empty -m "Trigger CI for PR #$pr_number on $current_datetime" | ||
git push origin $pr_branch | ||
done | ||
env: | ||
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.