Skip to content

Commit 06825f7

Browse files
authored
Merge pull request #79 from containers/v0.3.0-fixes
CI Fixes
2 parents e343fa5 + f69b79b commit 06825f7

File tree

5 files changed

+51
-8
lines changed

5 files changed

+51
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,60 @@ jobs:
1313
format:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
1719
- name: Rust Toolchain
1820
uses: dtolnay/rust-toolchain@stable
1921
with:
2022
components: rustfmt
23+
2124
- run: cargo fmt --verbose --check
2225

2326
clippy:
2427
runs-on: ubuntu-latest
2528
steps:
26-
- uses: actions/checkout@v4
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
2732
- name: Rust Toolchain
2833
uses: dtolnay/rust-toolchain@stable
2934
with:
3035
components: clippy
36+
3137
- run: cargo clippy -- -Dwarnings
3238

3339
test:
3440
runs-on: ubuntu-latest
3541
steps:
36-
- uses: actions/checkout@v4
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
3745
- name: Rust Toolchain
3846
uses: dtolnay/rust-toolchain@stable
47+
3948
- run: cargo test --verbose
4049

50+
build:
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
runner: [ubuntu-latest, windows-latest, macos-latest]
55+
runs-on: ${{ matrix.runner }}
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v4
59+
60+
- name: Rust Toolchain
61+
uses: dtolnay/rust-toolchain@stable
62+
63+
- run: cargo build --verbose
64+
4165
build-container:
66+
needs: build
4267
runs-on: ubuntu-latest
68+
env:
69+
MANIFEST: podlet-multiarch
4370
container:
4471
image: quay.io/containers/buildah:latest
4572
options: --security-opt seccomp=unconfined --security-opt apparmor=unconfined --device /dev/fuse:rw
@@ -49,8 +76,16 @@ jobs:
4976

5077
- run: buildah version
5178

79+
- name: Create manifest
80+
run: |
81+
buildah manifest create \
82+
--annotation "org.opencontainers.image.source=https://github.com/containers/podlet" \
83+
--annotation '"org.opencontainers.image.description=Generate Podman Quadlet files from a Podman command, compose file, or existing object"' \
84+
--annotation "org.opencontainers.image.licenses=MPL-2.0" \
85+
"${MANIFEST}"
86+
5287
- name: Build ARM image
53-
run: buildah build --platform linux/arm64/v8 -t podlet .
88+
run: buildah build --manifest "${MANIFEST}" --platform linux/arm64/v8 -t podlet .
5489

5590
- name: Build x86 image
56-
run: buildah build --platform linux/amd64 -t podlet .
91+
run: buildah build --manifest "${MANIFEST}" --platform linux/amd64 -t podlet .

.github/workflows/release-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
buildah manifest create \
3030
--annotation "org.opencontainers.image.source=https://github.com/containers/podlet" \
31-
--annotation "org.opencontainers.image.description=Generate Podman Quadlet files from a Podman command, compose file, or existing object" \
31+
--annotation '"org.opencontainers.image.description=Generate Podman Quadlet files from a Podman command, compose file, or existing object"' \
3232
--annotation "org.opencontainers.image.licenses=MPL-2.0" \
3333
"${MANIFEST}"
3434

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.3.0] - 2024-05-20
8+
## [0.3.0] - 2024-05-21
99

1010
Big release for Podlet!
1111

@@ -54,6 +54,7 @@ Note that the existing option for generating Kubernetes Pod YAML from a Compose
5454
- *(container)* Enforce `--blkio-weight` range `10..=1000`.
5555
- *(container)* `--blkio-weight-device` can be specified multiple times.
5656
- *(container)* Don't add empty `PodmanArgs=` when downgrading Podman version.
57+
- Correct use of `eyre::bail!()` on non-Unix platforms.
5758

5859
### Documentation
5960
- *(clippy)* Fix Clippy lint warning for `Idmap`.
@@ -101,6 +102,10 @@ Note that the existing option for generating Kubernetes Pod YAML from a Compose
101102
- *(ci)* Use Buildah container to build Podlet container.
102103
- *(deps)* Update dependencies.
103104
- *(release)* Update cargo-dist.
105+
- *(release-container)* Fix manifest annotation quoting.
106+
- *(ci)* Use consistent formatting.
107+
- *(ci)* Add image to manifest when building container.
108+
- *(ci)* Add `build` job.
104109

105110
## [0.2.4] - 2024-01-30
106111

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ below is a list of all the jobs with explanations and the commands that they run
136136
- Unit tests are defined in the source.
137137
- All tests should pass.
138138
- `cargo test`
139+
- build:
140+
- Ensures Podlet can build on all target platforms.
141+
- `cargo build`
139142
- build-container:
140143
- Ensures that the [Podlet container](./Containerfile) can build for both x86 and ARM platforms.
141144
- First, [install Buildah](https://github.com/containers/buildah/blob/main/install.md).

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl Cli {
211211
}
212212

213213
#[cfg(not(unix))]
214-
eyre::bail!("Cannot get Podman unit directory on non-unix system");
214+
color_eyre::eyre::bail!("Cannot get Podman unit directory on non-Unix system");
215215
} else if let Some(Some(path)) = &self.file {
216216
if path.is_dir() {
217217
path.clone()

0 commit comments

Comments
 (0)