Skip to content

Commit 8f93889

Browse files
TechassixeniapeNickLarsenNZ
authored
feat: Add boil tool (#1224)
* feat: Add boil tool * chore: Add boil configs and adjust Dockerfiles * chore: Remove old Python config files * ci: Adjust notification condition Only send out notifications if the build failed, a build is re-run and wasn't cancelled. * chore: Remove commented-out code * chore: Remove unwraps * chore: Add cargo alias for boil * chore: Update README to mention boil * chore: Update README * feat: Add --load flag to build command * feat: Add more annotations to the built image * fix: Apply corrections from code review There were a bunch of small errors in the new boil-config.toml files. These are now fixed and should contain the same data as the versions.py files before. Co-authored-by: Xenia <[email protected]> * chore: Remove protobuf-version arg from Hadoop boil config * feat: List images to show, move CLI arguments * chore: Add example to README * feat: Move shared data into common target which targets inherit from * chore: Add rust-toolchain file * chore: Make config arg global * feat: Add --strip-architecture arg * ci: Add workflow to release boil * ci: Also build boil on PR (without releasing it) * ci: Remove reusable workflow * ci: Only build boil for aarch64 on macOS * chore: Remove the term "product" from the Rust source code * feat: Add CLI argument to load build argumnts from file * chore: Add metadata to Cargo.toml files * chore: Add rustfmt config, apply changes * chore: Adjust pre-commit config file * ci: Add cargo-deny job to workflow * chore: Bump tracing-subscriber to 0.3.20 to fix RUSTSEC-2025-0055 * chore: Add metadata to patchable's Cargo.toml file * ci: Still build boil on PR * ci: Install Rust in pre-commit workflow * chore: Use Apache-2.0 license instead of OSL-3.0 license * chore: Mention nightly Rust toolchain updates * chore: Remove OpenShift arg * chore: Remove tree subcommand (for now) * chore: Move glob pattern into const * chore: Add more image validation * chore: Add image config file name constant * chore: Move Docker label into a constant * fix: Actually use --target-containerfile argument * docs: Add doc comments for clap command handler functions * feat: Auto-detect interactive shell for pretty output * chore: Only use a single output format * chore: Remove unused code * chore: Rename --export-image-manifest-uris CLI argument * chore: Apply suggestions Co-authored-by: Nick <[email protected]> * docs: Add some clarifying doc comments * feat: Improve image parsing and validation * chore: Update slab to 0.4.11 to fix RUSTSEC-2025-0047 See https://rustsec.org/advisories/RUSTSEC-2025-0047 --------- Co-authored-by: Xenia <[email protected]> Co-authored-by: Nick <[email protected]>
1 parent 27ce8a3 commit 8f93889

File tree

148 files changed

+3851
-1667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+3851
-1667
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[alias]
22
patchable = ["run", "--bin", "patchable", "--"]
3+
boil = ["run", "--bin", "boil", "--"]
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: Build/Release boil
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- '.github/workflows/boil_build_release.yaml'
8+
- 'rust-toolchain.toml'
9+
- 'Cargo.*'
10+
- '**.rs'
11+
push:
12+
tags:
13+
- "boil-[0-9]+.[0-9]+.[0-9]+**"
14+
15+
env:
16+
RUST_VERSION: 1.87.0
17+
18+
jobs:
19+
# This job is always run to ensure we don't miss any new upstream advisories
20+
cargo-deny:
21+
name: Run cargo-deny
22+
runs-on: ubuntu-latest
23+
# Prevent sudden announcement of a new advisory from failing CI
24+
continue-on-error: ${{ matrix.checks == 'advisories' }}
25+
strategy:
26+
matrix:
27+
checks:
28+
- advisories
29+
- bans licenses sources
30+
steps:
31+
- name: Checkout Repository
32+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
33+
with:
34+
persist-credentials: false
35+
submodules: recursive
36+
37+
- name: Run cargo-deny
38+
uses: EmbarkStudios/cargo-deny-action@f2ba7abc2abebaf185c833c3961145a3c275caad # v2.0.13
39+
with:
40+
command: check ${{ matrix.checks }}
41+
42+
create-release:
43+
name: Create Draft Release
44+
if: github.event_name == 'push'
45+
needs:
46+
- cargo-deny
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Create Draft Release
50+
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
51+
with:
52+
draft: true
53+
54+
build:
55+
name: Build boil
56+
needs:
57+
- cargo-deny
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
targets:
62+
- {target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm}
63+
- {target: x86_64-unknown-linux-gnu, os: ubuntu-latest}
64+
- {target: aarch64-apple-darwin, os: macos-latest}
65+
runs-on: ${{ matrix.targets.os }}
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
69+
with:
70+
persist-credentials: false
71+
72+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
73+
with:
74+
toolchain: ${{ env.RUST_VERSION }}
75+
targets: ${{ matrix.targets.target }}
76+
77+
- name: Build Binary
78+
env:
79+
TARGET: ${{ matrix.targets.target }}
80+
run: cargo build --target "$TARGET" --release --package boil
81+
82+
- name: Rename Binary
83+
env:
84+
TARGET: ${{ matrix.targets.target }}
85+
run: mv "target/$TARGET/release/boil" "boil-$TARGET"
86+
87+
- name: Upload Artifact to Release
88+
if: github.event_name == 'push'
89+
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
90+
with:
91+
draft: false
92+
files: boil-${{ matrix.targets.target }}

.github/workflows/pr_pre-commit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
pull_request:
66

77
env:
8+
# Keep in sync with across other repos like operator-rs and operator-templating
9+
RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26"
810
HADOLINT_VERSION: "v2.12.0"
911
PYTHON_VERSION: "3.12"
1012

@@ -19,4 +21,5 @@ jobs:
1921
- uses: stackabletech/actions/run-pre-commit@497f3e3cbfe9b89b1e570351b97d050eebcad5d0 # 0.8.3
2022
with:
2123
python-version: ${{ env.PYTHON_VERSION }}
24+
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
2225
hadolint: ${{ env.HADOLINT_VERSION }}

.github/workflows/reusable_build_image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
name: Failure Notification
103103
needs: [generate_matrix, build, publish_manifests]
104104
runs-on: ubuntu-latest
105-
if: failure() || github.run_attempt > 1
105+
if: failure() || (github.run_attempt > 1 && !cancelled())
106106
steps:
107107
- name: Send Notification
108108
uses: stackabletech/actions/send-slack-notification@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # v0.8.1

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,27 @@ repos:
6060
entry: .scripts/update_readme_badges.sh
6161
stages: [pre-commit, pre-merge-commit, manual]
6262
pass_filenames: false
63+
64+
- id: cargo-test
65+
name: cargo-test
66+
language: system
67+
entry: cargo test
68+
stages: [pre-commit, pre-merge-commit]
69+
pass_filenames: false
70+
files: \.rs$|Cargo\.(toml|lock)
71+
72+
- id: cargo-rustfmt
73+
name: cargo-rustfmt
74+
language: system
75+
entry: cargo +nightly-2025-05-26 fmt --all -- --check
76+
stages: [pre-commit, pre-merge-commit]
77+
pass_filenames: false
78+
files: \.rs$
79+
80+
- id: cargo-clippy
81+
name: cargo-clippy
82+
language: system
83+
entry: cargo clippy --all-targets -- -D warnings
84+
stages: [pre-commit, pre-merge-commit]
85+
pass_filenames: false
86+
files: \.rs$

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"rust-analyzer.rustfmt.overrideCommand": [
3+
"rustfmt",
4+
// Keep in sync with across other repos like operator-rs and operator-templating
5+
"+nightly-2025-05-26",
6+
"--edition",
7+
"2024",
8+
"--"
9+
],
10+
}

0 commit comments

Comments
 (0)