-
-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into helm_doc_sources
- Loading branch information
Showing
2,233 changed files
with
299,730 additions
and
88,673 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
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 |
---|---|---|
|
@@ -12,5 +12,4 @@ updates: | |
time: "03:00" | ||
timezone: "US/Pacific" | ||
reviewers: | ||
- Eric-Arellano | ||
- stuhood |
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,16 @@ | ||
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
files( | ||
sources=["*.yaml"], | ||
overrides={ | ||
"auto-cherry-picker.yaml": { | ||
"dependencies": [ | ||
"//build-support/cherry_pick/package.json:support_files", | ||
"//build-support/cherry_pick/package-lock.json:support_files", | ||
"//build-support/cherry_pick/helper.js:support_files", | ||
"//build-support/cherry_pick/make_pr.sh:support_files", | ||
] | ||
} | ||
}, | ||
) |
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,42 +1,25 @@ | ||
# GENERATED, DO NOT EDIT! | ||
# To change, edit `build-support/bin/generate_github_workflows.py` and run: | ||
# ./pants run build-support/bin/generate_github_workflows.py | ||
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run: | ||
# ./pants run src/python/pants_release/generate_github_workflows.py | ||
|
||
|
||
jobs: | ||
audit: | ||
if: ${{ github.repository_owner == 'pantsbuild' }} | ||
if: github.repository_owner == 'pantsbuild' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 10 | ||
- if: github.event_name == 'push' | ||
name: Get commit message for branch builds | ||
run: 'echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV | ||
echo "$(git log --format=%B -n 1 HEAD)" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
' | ||
- if: github.event_name == 'pull_request' | ||
name: Get commit message for PR builds | ||
run: 'echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV | ||
echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
' | ||
- name: Cargo audit (for security vulnerabilities) | ||
run: './cargo install --version 0.16.0 cargo-audit | ||
run: './cargo install --version 0.17.5 cargo-audit | ||
./cargo audit | ||
./cargo audit --ignore RUSTSEC-2020-0128 | ||
' | ||
name: Cargo Audit | ||
'on': | ||
schedule: | ||
- cron: 11 8 * * * | ||
workflow_dispatch: null |
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,105 @@ | ||
name: Auto Cherry-Picker | ||
|
||
on: | ||
# NB: This is safe since we already have merged the PR. | ||
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
pull_request_target: | ||
types: [closed] | ||
branches: [main] | ||
workflow_dispatch: | ||
inputs: | ||
PR_number: | ||
description: The PR number to cherry-pick | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
prerequisites: | ||
name: Gather Prerequisites | ||
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'needs-cherrypick') ) | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr_num: ${{ steps.get-prereqs.outputs.pr_num }} | ||
merge_commit: ${{ steps.get-prereqs.outputs.merge_commit }} | ||
matrix: ${{ steps.get-prereqs.outputs.matrix }} | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- run: npm install ./build-support/cherry_pick | ||
- id: get-prereqs | ||
name: Get Cherry-Pick prerequisites | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }} | ||
script: | | ||
const Helper = require('./build-support/cherry_pick/helper.js'); | ||
const helper = new Helper({octokit: github, context, core}); | ||
const prereqs = await helper.get_prereqs(); | ||
if (prereqs !== null) { | ||
core.setOutput("pr_num", prereqs.pr_num); | ||
core.setOutput("merge_commit", prereqs.merge_commit); | ||
core.setOutput("matrix", prereqs.milestones.map( | ||
milestone => {return { | ||
milestone, | ||
branch_name: `cherry-pick-${prereqs.pr_num}-to-${milestone}`, | ||
}} | ||
)); | ||
} | ||
cherry_picker: | ||
name: Cherry-Pick | ||
needs: prerequisites | ||
runs-on: ubuntu-latest | ||
continue-on-error: true # Don't cancel other jobs if this one fails | ||
strategy: | ||
matrix: | ||
include: ${{ fromJSON(needs.prerequisites.outputs.matrix) }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }} | ||
- name: Prepare cherry-pick branch | ||
if: ${{ !env.ACT }} | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Worker Pants (Pantsbuild GitHub Automation Bot)" | ||
git fetch --depth=2 origin "${{ needs.prerequisites.outputs.merge_commit }}" | ||
# NB: If this fetch fails, we assume that means the milestone branch hasn't been created yet | ||
git fetch --depth 1 origin "${{ matrix.milestone }}" || exit 0 | ||
git checkout -b "${{ matrix.branch_name }}" FETCH_HEAD | ||
git cherry-pick "${{ needs.prerequisites.outputs.merge_commit }}" | ||
git push -u origin "${{ matrix.branch_name }}" | ||
# Now we go back to `main` to ensure we're running the latest `make_pr.sh`. | ||
# (this only really should matter if we're cherry-picking changed to `make_pr.sh` itself). | ||
git checkout main | ||
- name: Create Cherry-Pick Branch | ||
env: | ||
GH_TOKEN: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }} | ||
run: | | ||
bash build-support/cherry_pick/make_pr.sh "${{ needs.prerequisites.outputs.pr_num }}" "${{ matrix.milestone }}" "${{ matrix.branch_name }}" | ||
post_pick: | ||
name: Post-Pick Actions | ||
needs: [cherry_picker, prerequisites] | ||
runs-on: ubuntu-latest | ||
# NB: We don't want to run if the prerequisites job failed or was skipped | ||
if: needs.prerequisites.result == 'success' && (success() || failure()) | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- run: npm install ./build-support/cherry_pick | ||
- name: Run Script | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }} | ||
script: | | ||
const Helper = require('./build-support/cherry_pick/helper.js'); | ||
const helper = new Helper({octokit: github, context, core}); | ||
await helper.cherry_pick_finished("${{ needs.prerequisites.outputs.merge_commit }}", ${{ needs.prerequisites.outputs.matrix }}); |
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 was deleted.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
.github/workflows/clear_self_hosted_persistent_caches.yaml
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,67 @@ | ||
# GENERATED, DO NOT EDIT! | ||
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run: | ||
# ./pants run src/python/pants_release/generate_github_workflows.py | ||
|
||
|
||
jobs: | ||
clean_linux_arm64: | ||
runs-on: | ||
- self-hosted | ||
- Linux | ||
- ARM64 | ||
steps: | ||
- name: df before | ||
run: df -h | ||
- name: Deleting ~/Library/Caches | ||
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true | ||
- name: Deleting ~/.cache | ||
run: du -sh ~/.cache || true; rm -rf ~/.cache || true | ||
- name: Deleting ~/.nce | ||
run: du -sh ~/.nce || true; rm -rf ~/.nce || true | ||
- name: Deleting ~/.rustup | ||
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true | ||
- name: Deleting ~/.pex | ||
run: du -sh ~/.pex || true; rm -rf ~/.pex || true | ||
- name: df after | ||
run: df -h | ||
clean_macos10_15_x86_64: | ||
runs-on: | ||
- self-hosted | ||
- macOS-10.15-X64 | ||
steps: | ||
- name: df before | ||
run: df -h | ||
- name: Deleting ~/Library/Caches | ||
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true | ||
- name: Deleting ~/.cache | ||
run: du -sh ~/.cache || true; rm -rf ~/.cache || true | ||
- name: Deleting ~/.nce | ||
run: du -sh ~/.nce || true; rm -rf ~/.nce || true | ||
- name: Deleting ~/.rustup | ||
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true | ||
- name: Deleting ~/.pex | ||
run: du -sh ~/.pex || true; rm -rf ~/.pex || true | ||
- name: df after | ||
run: df -h | ||
clean_macos11_arm64: | ||
runs-on: | ||
- self-hosted | ||
- macOS-11-ARM64 | ||
steps: | ||
- name: df before | ||
run: df -h | ||
- name: Deleting ~/Library/Caches | ||
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true | ||
- name: Deleting ~/.cache | ||
run: du -sh ~/.cache || true; rm -rf ~/.cache || true | ||
- name: Deleting ~/.nce | ||
run: du -sh ~/.nce || true; rm -rf ~/.nce || true | ||
- name: Deleting ~/.rustup | ||
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true | ||
- name: Deleting ~/.pex | ||
run: du -sh ~/.pex || true; rm -rf ~/.pex || true | ||
- name: df after | ||
run: df -h | ||
name: Clear persistent caches on long-lived self-hosted runners | ||
'on': | ||
workflow_dispatch: {} |
Oops, something went wrong.