-
Notifications
You must be signed in to change notification settings - Fork 18
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
Merge latest changes into release-1.31 #829
Changes from all commits
de53534
72808cd
522a161
a47d342
407f739
4d5f406
22f04c6
6748308
969662f
1a993cc
e8475bf
87eb341
6ee8863
de6fb4f
e4dadd1
27c91c8
cfa7f99
d189816
5fe3c27
6b15893
02f369b
6ce90fa
a5d0ae4
a2c00fb
c74b9f5
d3c4a36
9e0a43c
1a7bafd
2b9d49a
4215adc
27247c4
edd536f
5af076a
a646a0b
ed25214
83ca3ed
d44b5c5
49a5da9
43ab3b8
e64824c
426d150
45b544f
d57414c
ef30a2e
c618f09
8c0f665
610393f
af047ce
78a3a88
b6ee33b
8369545
dc44838
82985e3
db9fdd6
2ee8e70
95fe533
18e1a24
cabc958
8ae6d48
499a2db
84a1769
f21e2a9
4d0d1cc
fea66ee
65bb21d
ed8525e
0b2daa5
6e585f1
6e343fc
e30d4ad
4469973
abb6f7f
577a5ff
687df33
13875ac
c871eb9
7cce595
851387c
03149aa
d6de281
953f4dd
ca54963
297bed5
528d459
92828c5
a741eaa
f6ef548
13689bd
00ab5b0
5bbb1bd
bf485e7
86b5a29
4291ca3
5b032a9
2e71353
aa8b78f
e1dd58e
a8e140b
3528193
b4055df
81bb027
79f3145
be1e3a6
47810ae
eb63322
99e7a5e
19b9957
00ea902
c17d3cf
db581ac
00236be
83c1ffb
8d20f34
aa6c32a
7314175
dd2cd3b
2f1c021
bd42a49
29feb03
c648d82
7f732c9
376da2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,16 +13,16 @@ Make sure to follow the steps below and ensure all actions are completed and sig | |
- **K8s version**: 1.xx | ||
|
||
<!-- Set this to the name of the person responsible for running the release tasks, e.g. @neoaggelos --> | ||
- **Owner**: | ||
- **Owner**: `who plans to do the work` | ||
|
||
<!-- Set this to the name of the team-member that will sign-off the tasks --> | ||
- **Reviewer**: | ||
- **Reviewer**: `who plans to review the work` | ||
|
||
<!-- Link to PR to initialize the release branch (see below) --> | ||
- **PR**: | ||
- | ||
- **PR**: https://github.com/canonical/k8s-snap/pull/`<int>` | ||
|
||
<!-- Link to PR to initialize auto-update job for the release branch (see below) --> | ||
- **PR**: | ||
- **PR**: https://github.com/canonical/k8s-snap/pull/`<int>` | ||
|
||
#### Actions | ||
|
||
|
@@ -53,7 +53,7 @@ The steps are to be followed in-order, each task must be completed by the person | |
- [ ] **Owner**: Create `release-1.xx` branch from latest `master` in k8s-dqlite | ||
- `git clone [email protected]:canonical/k8s-dqlite.git ~/tmp/release-1.xx` | ||
- `pushd ~/tmp/release-1.xx` | ||
- `git switch main` | ||
- `git switch master` | ||
- `git pull` | ||
- `git checkout -b release-1.xx` | ||
- `git push origin release-1.xx` | ||
|
@@ -89,7 +89,7 @@ The steps are to be followed in-order, each task must be completed by the person | |
- [ ] **Owner**: Create `release-1.xx` branch from latest `main` in rawfile-localpv | ||
- `git clone [email protected]:canonical/rawfile-localpv.git ~/tmp/release-1.xx` | ||
- `pushd ~/tmp/release-1.xx` | ||
- `git switch main` | ||
- `git switch rockcraft` | ||
- `git pull` | ||
- `git checkout -b release-1.xx` | ||
- `git push origin release-1.xx` | ||
|
@@ -98,7 +98,6 @@ The steps are to be followed in-order, each task must be completed by the person | |
- [ ] **Reviewer**: Ensure `release-1.xx` branch is based on latest changes on `main` at the time of the release cut. | ||
- [ ] **Owner**: Create PR to initialize `release-1.xx` branch: | ||
- [ ] Update `KUBERNETES_RELEASE_MARKER` to `stable-1.xx` in [/build-scripts/hack/update-component-versions.py][] | ||
- [ ] Update `master` to `release-1.xx` in [/build-scripts/components/k8s-dqlite/version][] | ||
- [ ] Update `"main"` to `"release-1.xx"` in [/build-scripts/hack/generate-sbom.py][] | ||
- [ ] `git commit -m 'Release 1.xx'` | ||
- [ ] Create PR against `release-1.xx` with the changes and request review from **Reviewer**. Make sure to update the issue `Information` section with a link to the PR. | ||
|
@@ -107,43 +106,22 @@ The steps are to be followed in-order, each task must be completed by the person | |
- [ ] Add `release-1.xx` in [.github/workflows/update-components.yaml][] | ||
- [ ] Remove unsupported releases from the list (if applicable, consult with **Reviewer**) | ||
- [ ] Create PR against `main` with the changes and request review from **Reviewer**. Make sure to update the issue information with a link to the PR. | ||
- [ ] **Reviewer**: On merge, confirm [Auto-update strict branch] action runs to completion and that the `autoupdate/release-1.xx-strict` branch is created. | ||
- [ ] **Owner**: Create launchpad builders for `release-1.xx` | ||
- [ ] Go to [lp:k8s][] and do **Import now** to pick up all latest changes. | ||
- [ ] Under **Branches**, select `release-1.xx`, then **Create snap package** | ||
- [ ] Set **Snap recipe name** to `k8s-snap-1.xx` | ||
- [ ] Set **Owner** to `Canonical Kubernetes (containers)` | ||
- [ ] Set **The project that this Snap is associated with** to `k8s` | ||
- [ ] Set **Series** to Infer from snapcraft.yaml | ||
- [ ] Set **Processors** to `AMD x86-64 (amd64)` and `ARM ARMv8 (arm64)` | ||
- [ ] Enable **Automatically build when branch changes** | ||
- [ ] Enable **Automatically upload to store** | ||
- [ ] Set **Registered store name** to `k8s` | ||
- [ ] In **Store Channels**, set **Track** to `1.xx-classic` and **Risk** to `edge`. Leave **Branch** empty | ||
- [ ] Click **Create snap package** at the bottom of the page. | ||
- [ ] **Owner**: Create launchpad builders for `release-1.xx-strict` | ||
- [ ] Return to [lp:k8s][]. | ||
- [ ] Under **Branches**, select `autoupdate/release-1.xx-strict`, then **Create snap package** | ||
- [ ] Set **Snap recipe name** to `k8s-snap-1.xx-strict` | ||
- [ ] Set **Owner** to `Canonical Kubernetes (containers)` | ||
- [ ] Set **The project that this Snap is associated with** to `k8s` | ||
- [ ] Set **Series** to Infer from snapcraft.yaml | ||
- [ ] Set **Processors** to `AMD x86-64 (amd64)` and `ARM ARMv8 (arm64)` | ||
- [ ] Enable **Automatically build when branch changes** | ||
- [ ] Enable **Automatically upload to store** | ||
- [ ] Set **Registered store name** to `k8s` | ||
- [ ] In **Store Channels**, set **Track** to `1.xx` and **Risk** to `edge`. Leave **Branch** empty | ||
- [ ] Click **Create snap package** at the bottom of the page. | ||
- [ ] **Reviewer**: On merge, confirm [Auto-update strict branch] action runs to completion and that the `autoupdate/release-1.xx-*` flavor branches are created. | ||
- [ ] autoupdate/release-1.xx-strict | ||
- [ ] autoupdate/release-1.xx-moonray | ||
- [ ] **Owner**: Create launchpad builders for `release-1.xx` and flavors | ||
- [ ] Run the [Confirm Snap Builds][] Action | ||
- [ ] **Reviewer**: Ensure snap recipes are created in [lp:k8s/+snaps][] | ||
- look for `k8s-snap-1.xx` | ||
- look for `k8s-snap-1.xx-strict` | ||
- [ ] look for `k8s-snap-1.xx-classic` | ||
- [ ] look for `k8s-snap-1.xx-strict` | ||
- [ ] look for `k8s-snap-1.xx-moonray` | ||
- [ ] make sure each is "Authorized for Store Upload" | ||
|
||
#### After release | ||
|
||
- [ ] **Owner** follows up with the **Reviewer** and team about things to improve around the process. | ||
- [ ] **Owner**: After a few weeks of stable CI, update default track to `1.xx/stable` via | ||
- On the snap [releases page][], select `Track` > `1.xx` | ||
- [ ] **Reviewer**: Ensure snap recipes are created in [lp:k8s/+snaps][] | ||
|
||
|
||
<!-- LINKS --> | ||
|
@@ -161,6 +139,7 @@ The steps are to be followed in-order, each task must be completed by the person | |
[.github/workflows/update-components.yaml]: ../workflows/update-components.yaml | ||
[/build-scripts/components/hack/update-component-versions.py]: ../../build-scripts/components/hack/update-component-versions.py | ||
[/build-scripts/components/k8s-dqlite/version]: ../../build-scripts/components/k8s-dqlite/version | ||
[/build-scripts/hack/generate-sbom.py]: ../..//build-scripts/hack/generate-sbom.py | ||
[/build-scripts/hack/generate-sbom.py]: ../../build-scripts/hack/generate-sbom.py | ||
[lp:k8s]: https://code.launchpad.net/~cdk8s/k8s/+git/k8s-snap | ||
[lp:k8s/+snaps]: https://launchpad.net/k8s/+snaps | ||
[Confirm Snap Builds]: https://github.com/canonical/canonical-kubernetes-release-ci/actions/workflows/create-release-branch.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Auto-merge Successful PRs | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */4 * * *" # Every 4 hours | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
merge-successful-prs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@v2 | ||
with: | ||
egress-policy: audit | ||
- name: Checking out repo | ||
uses: actions/checkout@v4 | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
- uses: actions/setup-python@v5 | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
with: | ||
python-version: '3.12' | ||
- name: Auto-merge pull requests if all status checks pass | ||
env: | ||
GH_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
run: | | ||
build-scripts/hack/auto-merge-successful-pr.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
TICS: | ||
permissions: | ||
|
@@ -27,6 +27,9 @@ | |
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{matrix.branch}} | ||
- uses: actions/setup-python@v5 | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
with: | ||
python-version: '3.12' | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -47,22 +50,22 @@ | |
|
||
# TICS requires us to have the test results in cobertura xml format under the | ||
# directory use below | ||
make go.unit | ||
sudo make go.unit | ||
go install github.com/boumenot/gocover-cobertura@latest | ||
gocover-cobertura < coverage.txt > coverage.xml | ||
mkdir .coverage | ||
mv ./coverage.xml ./.coverage/ | ||
|
||
# Install the TICS and staticcheck | ||
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 | ||
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 | ||
. <(curl --silent --show-error 'https://canonical.tiobe.com/tiobeweb/TICS/api/public/v1/fapi/installtics/Script?cfg=default&platform=linux&url=https://canonical.tiobe.com/tiobeweb/TICS/') | ||
|
||
# We need to have our project built | ||
# We load the dqlite libs here instead of doing through make because TICS | ||
# will try to build parts of the project itself | ||
sudo add-apt-repository -y ppa:dqlite/dev | ||
sudo apt install dqlite-tools libdqlite-dev -y | ||
make clean | ||
sudo make clean | ||
go build -a ./... | ||
|
||
TICSQServer -project k8s-snap -tmpdir /tmp/tics -branchdir $HOME/work/k8s-snap/k8s-snap/ | ||
|
@@ -79,6 +82,8 @@ | |
- { branch: main, channel: latest/edge } | ||
# Stable branches | ||
# Add branches to test here | ||
- { branch: release-1.30, channel: 1.30-classic/edge } | ||
- { branch: release-1.31, channel: 1.31-classic/edge } | ||
|
||
steps: | ||
- name: Harden Runner | ||
|
@@ -103,6 +108,8 @@ | |
format: "sarif" | ||
output: "trivy-k8s-repo-scan--results.sarif" | ||
severity: "MEDIUM,HIGH,CRITICAL" | ||
env: | ||
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db" | ||
- name: Gather Trivy repo scan results | ||
run: | | ||
cp trivy-k8s-repo-scan--results.sarif ./sarifs/ | ||
|
@@ -111,7 +118,10 @@ | |
snap download k8s --channel ${{ matrix.channel }} | ||
mv ./k8s*.snap ./k8s.snap | ||
unsquashfs k8s.snap | ||
./trivy rootfs ./squashfs-root/ --format sarif > sarifs/snap.sarif | ||
for var in $(env | grep -o '^TRIVY_[^=]*'); do | ||
unset "$var" | ||
done | ||
./trivy --db-repository public.ecr.aws/aquasecurity/trivy-db rootfs ./squashfs-root/ --format sarif > sarifs/snap.sarif | ||
- name: Get HEAD sha | ||
run: | | ||
SHA="$(git rev-parse HEAD)" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Documentation Spelling Check | ||
|
||
on: | ||
workflow_dispatch: | ||
# pull_request: | ||
# paths: | ||
# - 'docs/**' | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
spell-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
- name: Install aspell | ||
run: sudo apt-get install aspell aspell-en | ||
- id: spell-check | ||
name: Spell Check | ||
run: make spelling | ||
working-directory: docs/canonicalk8s | ||
continue-on-error: true | ||
# - if: ${{ github.event_name == 'pull_request' && steps.spell-check.outcome == 'failure' }} | ||
# uses: actions/github-script@v6 | ||
# with: | ||
# script: | | ||
# github.rest.issues.createComment({ | ||
# issue_number: context.issue.number, | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# body: 'Hi, looks like pyspelling job found some issues, you can check it [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})' | ||
# }) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
branches: | ||
- main | ||
- autoupdate/strict | ||
|
@@ -10,6 +12,8 @@ | |
- 'autoupdate/release-[0-9]+.[0-9]+-strict' | ||
- 'autoupdate/sync/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -19,6 +23,7 @@ | |
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment | ||
checks: write # for golangci/golangci-lint-action to checks to allow the action to annotate code in the PR. | ||
name: Unit Tests & Code Quality | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -67,6 +72,19 @@ | |
# root ownership so the tests must be run as root: | ||
run: sudo make go.unit | ||
|
||
- name: dqlite-for-golangci-lint | ||
working-directory: src/k8s | ||
run: | | ||
sudo add-apt-repository ppa:dqlite/dev | ||
sudo apt update | ||
sudo apt install dqlite-tools libdqlite-dev | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 1: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
with: | ||
version: v1.61 | ||
working-directory: src/k8s | ||
|
||
test-binary: | ||
name: Binaries | ||
runs-on: ubuntu-latest | ||
|
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium