Skip to content

Commit

Permalink
Revert to autoupdate branches (#536)
Browse files Browse the repository at this point in the history
* Revert "Fixup how to checkout from origin (#535)"

This reverts commit 07ce6fb.

* Revert "fixup fast-forward PR job (#534)"

This reverts commit 8471e97.

* Revert "Adjust moonray and strict branches (#531)"

This reverts commit 59ccf36.
  • Loading branch information
neoaggelos committed Jul 8, 2024
1 parent 07ce6fb commit 7b684f1
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 182 deletions.
71 changes: 16 additions & 55 deletions .github/ISSUE_TEMPLATE/create_release_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ Make sure to follow the steps below and ensure all actions are completed and sig
<!-- Set this to the name of the team-member that will sign-off the tasks -->
- **Reviewer**:

<!-- Link to PRs to initialize the release branch (see below) -->
- **PR (release-1.xx)**:
- **PR (moonray/release-1.xx)**:
- **PR (strict/release-1.xx)**:

<!-- Link to PR to initialize the release branch (see below) -->
- **PR**:
-
<!-- Link to PR to initialize auto-update job for the release branch (see below) -->
- **PR**:

Expand All @@ -32,7 +30,6 @@ The steps are to be followed in-order, each task must be completed by the person

- [ ] **Owner**: Add the assignee and reviewer as assignees to the GitHub issue
- [ ] **Owner**: Ensure that you are part of the ["containers" team](https://launchpad.net/~containers)
- [ ] **Owner**: Ensure that are no [fast-forward PRs](https://github.com/canonical/k8s-snap/pulls) open against the `moonray/main` and `strict/main` branches.
- [ ] **Owner**: Request a new `1.xx` Snapstore track for the snaps similar to the [snapstore track-request][].
- #### Post template on https://discourse.charmhub.io/

Expand All @@ -44,14 +41,15 @@ The steps are to be followed in-order, each task must be completed by the person

Hi,

Could we please have the following tracks for k8s-snap?

- "1.xx"
- "1.xx-classic"
- "1.xx-moonray"
Could we please have a track "1.xx-classic" and "1.xx" for the respective K8s snap release?

Thank you, $name

- [ ] **Owner**: Create `release-1.xx` branch from latest `main`
- `git switch main`
- `git pull`
- `git checkout -b release-1.xx`
- `git push origin release-1.xx`
- [ ] **Owner**: Create `release-1.xx` branch from latest `master` in k8s-dqlite
- `git clone git@github.com:canonical/k8s-dqlite.git ~/tmp/release-1.xx`
- `pushd ~/tmp/release-1.xx`
Expand Down Expand Up @@ -97,44 +95,19 @@ The steps are to be followed in-order, each task must be completed by the person
- `git push origin release-1.xx`
- `popd`
- `rm -rf ~/tmp/release-1.xx`
- [ ] **Owner**: Create `release-1.xx` branch from latest `main`
- `git switch main`
- `git pull`
- `git checkout -b release-1.xx`
- `git push origin release-1.xx`
- [ ] **Reviewer**: Ensure `release-1.xx` branch is based on latest changes on `main` at the time of the release cut.
- [ ] **Owner**: Create `moonray/release-1.xx` branch from latest `moonray/main`
- `git switch moonray/main`
- `git pull`
- `git checkout -b moonray/release-1.xx`
- `git push origin moonray/release-1.xx`
- [ ] **Reviewer**: Ensure `moonray/release-1.xx` branch is based on latest changes on `moonray/main` at the time of the release cut.
- [ ] **Owner**: Create `strict/release-1.xx` branch from latest `strict/main`
- `git switch strict/main`
- `git pull`
- `git checkout -b strict/release-1.xx`
- `git push origin strict/release-1.xx`
- [ ] **Reviewer**: Ensure `strict/release-1.xx` branch is based on latest changes on `strict/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 PRs against `release-1.xx` with the changes and request review from **Reviewer**. Make sure to update the issue `Information` section with link to the PR.
- [ ] **Reviewer**: Ensure `release-1.xx` PR is merged and builds Kubernetes 1.xx.
- [ ] **Owner**: Create PRs to initialize `moonray/release-1.xx` branch.
- [ ] `git checkout moonray/release-1.xx`
- [ ] `git merge release-1.xx`
- [ ] Create PR against `moonray/release-1.xx` with the changes and request review from **Reviewer**. Make sure to update the issue `Information` section with link to the PR.
- [ ] **Owner**: Create PRs to initialize `strict/release-1.xx` branch.
- [ ] `git checkout strict/release-1.xx`
- [ ] `git merge release-1.xx`
- [ ] Create PR against `strict/release-1.xx` with the changes and request review from **Reviewer**. Make sure to update the issue `Information` section with link to the PR.
- [ ] **Reviewer**: Review and merge PRs to initialize the release branches for `moonray/release-1.xx` and `strict/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.
- [ ] **Reviewer**: Review and merge PR to initialize branch.
- [ ] **Owner**: Create PR to initialize `update-components.yaml` job for `release-1.xx` branch:
- [ ] 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**
Expand All @@ -148,9 +121,9 @@ The steps are to be followed in-order, each task must be completed by the person
- [ ] 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 `strict/release-1.xx`
- [ ] **Owner**: Create launchpad builders for `release-1.xx-strict`
- [ ] Return to [lp:k8s][].
- [ ] Under **Branches**, select `strict/release-1.xx`, then **Create snap package**
- [ ] 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`
Expand All @@ -161,29 +134,17 @@ The steps are to be followed in-order, each task must be completed by the person
- [ ] 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.
- [ ] **Owner**: Create launchpad builders for `moonray/release-1.xx`
- [ ] Return to [lp:k8s][].
- [ ] Under **Branches**, select `moonray/release-1.xx`, then **Create snap package**
- [ ] Set **Snap recipe name** to `k8s-snap-1.xx-moonray`
- [ ] 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-moonray` and **Risk** to `edge`. Leave **Branch** empty
- [ ] Click **Create snap package** at the bottom of the page.
- [ ] **Reviewer**: Ensure snap recipes are created in [lp:k8s/+snaps][]
- look for `k8s-snap-1.xx`
- look for `k8s-snap-1.xx-moonray`
- look for `k8s-snap-1.xx-strict`

#### 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 -->
[Auto-update strict branch]: https://github.com/canonical/k8s-snap/actions/workflows/strict.yaml
Expand Down
59 changes: 0 additions & 59 deletions .github/workflows/fast-forward.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: Go
on:
push:
branches:
- 'main'
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'strict/main'
- 'strict/release-[0-9]+.[0-9]+'
- 'moonray/main'
- 'moonray/release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
pull_request:

Expand All @@ -19,6 +18,7 @@ jobs:
test:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
name: Unit Tests & Code Quality
runs-on: ubuntu-latest

Expand Down
57 changes: 11 additions & 46 deletions .github/workflows/integration-informing.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Informing Integration Tests

on:
# TODO(neoaggelos): needs updating the "Figure out target branch" below
# push:
# branches:
# - main
# - 'release-[0-9]+.[0-9]+'
# - 'autoupdate/sync/**'
push:
branches:
- main
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/sync/**'
pull_request:

permissions:
Expand All @@ -25,26 +24,8 @@ jobs:
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Figure out target branch
# ${{ steps.branch.outputs.upstream }} == "main", "release-1.30"
# ${{ steps.branch.outputs.target }} == "moonray/main", "moonray/release-1.30"
id: branch
run: |
echo "upstream=${{ github.base_ref }}" >> "$GITHUB_OUTPUT"
echo "target=${{ matrix.patch }}/${{ github.base_ref }}" >> "$GITHUB_OUTPUT"
- name: Checking out repo
uses: actions/checkout@v4
- name: Merge ${{ github.head_ref }} into ${{ steps.branch.outputs.target }}
run: |
git config user.name k8s-bot
git config user.email k8s-bot@canonical.com
git fetch origin
git checkout ${{ github.head_ref }}
git checkout ${{ steps.branch.outputs.target }}
git merge ${{ github.head_ref }} -m "Auto-merge ${{ github.head_ref }}"
- name: Install lxd
run: |
sudo snap refresh lxd --channel 5.21/stable
Expand All @@ -54,6 +35,9 @@ jobs:
- name: Install snapcraft
run: |
sudo snap install snapcraft --classic
- name: Apply ${{ matrix.patch }} patch
run: |
./build-scripts/patches/${{ matrix.patch }}/apply
- name: Build snap
run: |
sg lxd -c 'snapcraft --use-lxd'
Expand All @@ -74,30 +58,8 @@ jobs:
fail-fast: false
runs-on: ubuntu-20.04
steps:
- name: Figure out target branch
# ${{ steps.branch.outputs.upstream }} == "main", "release-1.30"
# ${{ steps.branch.outputs.target }} == "moonray/main", "moonray/release-1.30"
id: branch
run: |
echo "upstream=${{ github.base_ref }}" >> "$GITHUB_OUTPUT"
echo "target=${{ matrix.patch }}/${{ github.base_ref }}" >> "$GITHUB_OUTPUT"
- name: Checking out repo
uses: actions/checkout@v4
- name: Merge ${{ github.head_ref }} into ${{ steps.branch.outputs.target }}
run: |
git config user.name k8s-bot
git config user.email k8s-bot@canonical.com
git fetch origin
git checkout ${{ github.head_ref }}
git checkout ${{ steps.branch.outputs.target }}
git merge ${{ github.head_ref }} -m "Auto-merge ${{ github.head_ref }}"
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ steps.branch.outputs.target }}
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -115,6 +77,9 @@ jobs:
with:
name: k8s-${{ matrix.patch }}.snap
path: build
- name: Apply ${{ matrix.patch }} patch
run: |
./build-scripts/patches/${{ matrix.patch }}/apply
- name: Run end to end tests
run: |
export TEST_SNAP="$PWD/build/k8s-${{ matrix.patch }}.snap"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: Integration Tests
on:
push:
branches:
- 'main'
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'strict/main'
- 'strict/release-[0-9]+.[0-9]+'
- 'moonray/main'
- 'moonray/release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
pull_request:

Expand Down Expand Up @@ -51,7 +50,6 @@ jobs:
strategy:
matrix:
os: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
fail-fast: false
runs-on: ubuntu-20.04
needs: build

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: Python
on:
push:
branches:
- 'main'
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'strict/main'
- 'strict/release-[0-9]+.[0-9]+'
- 'moonray/main'
- 'moonray/release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
pull_request:

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/sbom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: SBOM
on:
push:
branches:
- 'main'
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'strict/main'
- 'strict/release-[0-9]+.[0-9]+'
- 'moonray/main'
- 'moonray/release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
pull_request:

Expand Down
Loading

0 comments on commit 7b684f1

Please sign in to comment.