Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/file-based-strategy
Browse files Browse the repository at this point in the history
Fixed conflict in tests/kola/server/data/ by using the script symlink
instead of the directory symlink.
  • Loading branch information
jokajak committed Oct 9, 2023
2 parents db90bcb + 10fc39c commit c960656
Show file tree
Hide file tree
Showing 62 changed files with 2,123 additions and 1,123 deletions.
2 changes: 1 addition & 1 deletion .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ cosaPod(buildroot: true) {
checkout scm

unstash name: 'build'
fcosBuild(overlays: ["install"])
cosaBuild(overlays: ["install"])
}
79 changes: 64 additions & 15 deletions .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
# Template generated by https://github.com/coreos/repo-templates; do not edit downstream
---

# Release process

This project uses [cargo-release][cargo-release] in order to prepare new releases, tag and sign the relevant git commit, and publish the resulting artifacts to [crates.io][crates-io].
Expand All @@ -14,9 +18,10 @@ This guide requires:
* [GPG setup][GPG setup] and personal key for signing
* `cargo` (suggested: latest stable toolchain from [rustup][rustup])
* `cargo-release` (suggested: `cargo install -f cargo-release`)
* A verified account on crates.io
* `cargo vendor-filterer` (suggested: `cargo install -f cargo-vendor-filterer`)
* Write access to this GitHub project
* Membership in the [Fedora CoreOS Crates Owners group](https://github.com/orgs/coreos/teams/fedora-coreos-crates-owners/members)
* A verified account on crates.io
* Membership in the [Fedora CoreOS Crates Owners group](https://github.com/orgs/coreos/teams/fedora-coreos-crates-owners/members), which will give you upload access to crates.io

## Release checklist

Expand All @@ -25,21 +30,37 @@ Push access to the upstream repository is required in order to publish the new t

:warning:: if `origin` is not the name of the locally configured remote that points to the upstream git repository (i.e. `[email protected]:coreos/zincati.git`), be sure to assign the correct remote name to the `UPSTREAM_REMOTE` variable.

- make sure the project is clean and prepare the environment:
- [ ] `cargo test`
- [ ] `cargo clean`
- [ ] `git clean -fd`
- prepare environment:
- [ ] `RELEASE_VER=x.y.z`
- [ ] `UPSTREAM_REMOTE=origin`
- [ ] `git checkout -b pre-release-${RELEASE_VER}`

- check `Cargo.toml` for unintended increases of lower version bounds:
- [ ] `git diff $(git describe --abbrev=0) Cargo.toml`

- update all dependencies:
- [ ] `cargo update`
- [ ] `git add Cargo.lock && git commit -m "cargo: update dependencies"`

- land the changes:
- [ ] PR the changes, get them reviewed, approved and merged

- make sure the project is clean:
- [ ] Make sure `cargo-release` and `cargo-vendor-filterer` are up to date: `cargo install cargo-release cargo-vendor-filterer`
- [ ] `git checkout main && git pull ${UPSTREAM_REMOTE} main`
- [ ] `cargo vendor-filterer target/vendor`
- [ ] `cargo test --all-features --config 'source.crates-io.replace-with="vv"' --config 'source.vv.directory="target/vendor"'`
- [ ] `cargo clean`
- [ ] `git clean -fd`

- create release commits on a dedicated branch and tag it (the commits and tag will be signed with the GPG signing key you configured):
- create release commit on a dedicated branch and tag it (the commit and tag will be signed with the GPG signing key you configured):
- [ ] `git checkout -b release-${RELEASE_VER}`
- [ ] `cargo release` (and confirm the version when prompted)
- [ ] `cargo release --execute ${RELEASE_VER}` (and confirm the version when prompted)

- open and merge a PR for this release:
- [ ] `git push ${UPSTREAM_REMOTE} release-${RELEASE_VER}`
- [ ] open a web browser and create a PR for the branch above
- [ ] make sure the resulting PR contains exactly two commits
- [ ] make sure the resulting PR contains exactly one commit
- [ ] in the PR body, write a short changelog with relevant changes since last release
- [ ] get the PR reviewed, approved and merged

Expand All @@ -50,12 +71,11 @@ Push access to the upstream repository is required in order to publish the new t
- [ ] `cargo publish`

- assemble vendor archive:
- [ ] `cargo vendor target/vendor`
- [ ] `tar -czf target/zincati-${RELEASE_VER}-vendor.tar.gz -C target vendor`
- [ ] `cargo vendor-filterer --format=tar.gz --prefix=vendor target/zincati-${RELEASE_VER}-vendor.tar.gz`

- publish the release:
- publish this release on GitHub:
- [ ] find the new tag in the [GitHub tag list](https://github.com/coreos/zincati/tags), click the triple dots menu, and create a release for it
- [ ] write a short changelog (i.e. re-use the PR content)
- [ ] copy in the changelog from the release PR
- [ ] upload `target/zincati-${RELEASE_VER}-vendor.tar.gz`
- [ ] record digests of local artifacts:
- `sha256sum target/package/zincati-${RELEASE_VER}.crate`
Expand All @@ -66,8 +86,37 @@ Push access to the upstream repository is required in order to publish the new t
- [ ] `cargo clean`
- [ ] `git checkout main`
- [ ] `git pull ${UPSTREAM_REMOTE} main`
- [ ] `git push ${UPSTREAM_REMOTE} :release-${RELEASE_VER}`
- [ ] `git branch -d release-${RELEASE_VER}`
- [ ] `git push ${UPSTREAM_REMOTE} :pre-release-${RELEASE_VER} :release-${RELEASE_VER}`
- [ ] `git branch -d pre-release-${RELEASE_VER} release-${RELEASE_VER}`

- Fedora packaging:
- [ ] update the `rust-zincati` spec file in [Fedora](https://src.fedoraproject.org/rpms/rust-zincati)
- bump the `Version`
- switch the `Release` back to `1%{?dist}`
- remove any patches obsoleted by the new release
- update changelog
- [ ] run `spectool -g -S rust-zincati.spec`
- [ ] run `kinit [email protected]`
- [ ] run `fedpkg new-sources $(spectool -S rust-zincati.spec | sed 's:.*/::')`
- [ ] PR the changes in [Fedora](https://src.fedoraproject.org/rpms/rust-zincati)
- [ ] once the PR merges to rawhide, merge rawhide into the other relevant branches (e.g. f38) then push those, for example:
```bash
git checkout rawhide
git pull --ff-only
git checkout f38
git merge --ff-only rawhide
git push origin f38
```
- [ ] on each of those branches run `fedpkg build`
- [ ] once the builds have finished, submit them to [bodhi](https://bodhi.fedoraproject.org/updates/new), filling in:
- `rust-zincati` for `Packages`
- selecting the build(s) that just completed, except for the rawhide one (which gets submitted automatically)
- writing brief release notes like "New upstream release; see release notes at `link to GitHub release`"
- leave `Update name` blank
- `Type`, `Severity` and `Suggestion` can be left as `unspecified` unless it is a security release. In that case select `security` with the appropriate severity.
- `Stable karma` and `Unstable` karma can be set to `2` and `-1`, respectively.
- [ ] [submit a fast-track](https://github.com/coreos/fedora-coreos-config/actions/workflows/add-override.yml) for FCOS testing-devel
- [ ] [submit a fast-track](https://github.com/coreos/fedora-coreos-config/actions/workflows/add-override.yml) for FCOS next-devel if it is [open](https://github.com/coreos/fedora-coreos-pipeline/blob/main/next-devel/README.md)

[cargo-release]: https://github.com/sunng87/cargo-release
[rustup]: https://rustup.rs/
Expand Down
17 changes: 10 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- area/dependencies
- package-ecosystem: cargo
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
labels:
- area/dependencies
2 changes: 1 addition & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build and test
run: make
113 changes: 69 additions & 44 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,116 @@
---
name: Rust
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

# don't waste job slots on superseded code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
# Minimum supported Rust version (MSRV)
ACTION_MSRV_TOOLCHAIN: 1.53.0
# Pinned toolchain for linting
ACTION_LINTS_TOOLCHAIN: 1.53.0
ACTIONS_LINTS_TOOLCHAIN: 1.71.0

jobs:
tests-stable:
name: "Tests, stable toolchain"
name: Tests, stable toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: "stable"
default: true
toolchain: stable
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: cargo build
run: cargo build
run: cargo build --all-targets
- name: cargo test
run: cargo test
run: cargo test --all-targets
- name: cargo test (failpoints)
run: cargo test --features failpoints
run: cargo test --all-targets --features failpoints
tests-release-stable:
name: Tests (release), stable toolchain
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: cargo build (release)
run: cargo build --release
- name: cargo package
run: cargo package
tests-minimum-toolchain:
name: "Tests, minimum supported toolchain (MSRV)"
run: cargo build --all-targets --release
- name: cargo test (release)
run: cargo test --all-targets --release
tests-release-msrv:
name: Tests (release), minimum supported toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v3
- name: Detect crate MSRV
run: |
msrv=$(cargo metadata --format-version 1 --no-deps | \
jq -r '.packages[0].rust_version')
echo "Crate MSRV: $msrv"
echo "MSRV=$msrv" >> $GITHUB_ENV
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env['ACTION_MSRV_TOOLCHAIN'] }}
default: true
toolchain: ${{ env.MSRV }}
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: cargo build (release)
run: cargo build --all-targets --release
- name: cargo test (release)
run: cargo test --release
run: cargo test --all-targets --release
linting:
name: "Lints, pinned toolchain"
name: Lints, pinned toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }}
default: true
toolchain: ${{ env.ACTIONS_LINTS_TOOLCHAIN }}
components: rustfmt, clippy
- name: cargo clippy (warnings)
run: cargo clippy -- -D warnings
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: cargo fmt (check)
run: cargo fmt -- --check -l
- name: cargo clippy (warnings)
run: cargo clippy --all-targets -- -D warnings
tests-other-channels:
name: "Tests, unstable toolchain"
name: Tests, unstable toolchain
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
channel:
- "beta"
- "nightly"
channel: [beta, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.channel }}
default: true
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: cargo build
run: cargo build
run: cargo build --all-targets
- name: cargo test
run: cargo test
run: cargo test --all-targets
Loading

0 comments on commit c960656

Please sign in to comment.