Skip to content

Commit

Permalink
Merge pull request #412 from cbgbt/twoliter-0.6.0
Browse files Browse the repository at this point in the history
twoliter: prepare for 0.6.0-rc1
  • Loading branch information
cbgbt authored Dec 5, 2024
2 parents 35282cc + 0aba5cf commit aeda99f
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 59 deletions.
45 changes: 0 additions & 45 deletions .github/actions/install-crane/action.yaml

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ jobs:
labels: bottlerocket_ubuntu-latest_16-core
steps:
- uses: actions/checkout@v3
- name: Install crane for testing
uses: ./.github/actions/install-crane
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo install cargo-deny --locked
- run: cargo install cargo-make --locked
- uses: actions/setup-go@v5
with:
go-version: "^1.18"
# Install `patch`, needed to build `krane-bundle`
- run: sudo apt-get install -y patch
- run: make build
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[unreleased]: https://github.com/bottlerocket-os/twoliter/compare/v0.5.2...HEAD

## [0.5.2] - 2024-12-03
## [0.6.0] - 2024-12-04

### Changed

- Use `krane` to fetch the SDK during the build instead of `docker` ([#411])
- Allow arbitrary kits to generate an accurate application inventory ([#410])
- Use `krane` to fetch the SDK during the build instead of `docker` ([#411], [#412])
- Enable verbose `krane` logs when the log level is DEBUG or TRACE ([#411])
- Update `ecr-login` to v0.9.0 ([#411])

[#410]: https://github.com/bottlerocket-os/twoliter/pull/410
[#411]: https://github.com/bottlerocket-os/twoliter/pull/411
[#412]: https://github.com/bottlerocket-os/twoliter/pull/412

[0.5.2]: https://github.com/bottlerocket-os/twoliter/compare/v0.5.1...v0.5.2
[0.6.0]: https://github.com/bottlerocket-os/twoliter/compare/v0.5.1...v0.6.0

## [0.5.1] - 2024-11-11

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pubsys-setup = { version = "0.1", path = "tools/pubsys-setup", artifact = [ "bin
testsys = { version = "0.1", path = "tools/testsys", artifact = [ "bin:testsys" ] }
testsys-config = { version = "0.1", path = "tools/testsys-config" }
testsys-model = { version = "0.0.14", git = "https://github.com/bottlerocket-os/bottlerocket-test-system", tag = "v0.0.14" }
twoliter = { version = "0.5.2-rc1", path = "twoliter", artifact = [ "bin:twoliter" ] }
twoliter = { version = "0.6.0-rc1", path = "twoliter", artifact = [ "bin:twoliter" ] }
unplug = { version = "0.1", path = "tools/unplug", artifact = [ "bin:unplug" ] }
update-metadata = { version = "0.1", path = "tools/update-metadata" }

Expand Down
2 changes: 1 addition & 1 deletion twoliter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "twoliter"
version = "0.5.2-rc1"
version = "0.6.0-rc1"
edition = "2021"
description = "A command line tool for creating custom builds of Bottlerocket"
authors = ["Matthew James Briggs <[email protected]>"]
Expand Down
19 changes: 15 additions & 4 deletions twoliter/embedded/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BUILDSYS_BUILD_DIR = "${BUILDSYS_ROOT_DIR}/build"
BUILDSYS_PACKAGES_DIR = "${BUILDSYS_BUILD_DIR}/rpms"
BUILDSYS_KITS_DIR = "${BUILDSYS_BUILD_DIR}/kits"
BUILDSYS_EXTERNAL_KITS_DIR = "${BUILDSYS_BUILD_DIR}/external-kits"
BUILDSYS_EXTERNAL_SDKS_DIR = "${BUILDSYS_BUILD_DIR}/external-sdk-archives"
BUILDSYS_STATE_DIR = "${BUILDSYS_BUILD_DIR}/state"
BUILDSYS_IMAGES_DIR = "${BUILDSYS_BUILD_DIR}/images"
BUILDSYS_LOGS_DIR = "${BUILDSYS_BUILD_DIR}/logs"
Expand Down Expand Up @@ -315,22 +316,32 @@ dependencies = ["setup-build"]
script_runner = "bash"
script = [
'''
cleanup() {
[ -n "${SDK_ARCHIVE_PATH}" ] && rm -rf "${SDK_ARCHIVE_PATH}"
}
trap 'cleanup' EXIT
SDK_PLATFORM="$(docker version --format '{{.Server.Os}}/{{.Server.Arch}}')"
KRANE="${TWOLITER_TOOLS_DIR}/krane"
mkdir -p "${BUILDSYS_EXTERNAL_SDKS_DIR}"
SDK_ARCHIVE_PATH="$(mktemp -p ${BUILDSYS_EXTERNAL_SDKS_DIR} bottlerocket-sdk-tmp-archive-XXXXXXXX.tar)"
if [ ! -s "${BUILDSYS_EXTERNAL_KITS_DIR}/.sdk-verified" ]; then
echo "Twoliter could not validate '${TLPRIVATE_SDK_IMAGE}', refusing to continue" >&2
exit 1
fi
if ! docker image inspect "${TLPRIVATE_SDK_IMAGE}" >/dev/null 2>&1 ; then
echo "Pulling SDK '${TLPRIVATE_SDK_IMAGE}'"
${KRANE} pull "${TLPRIVATE_SDK_IMAGE}" /dev/stdout --platform "${SDK_PLATFORM}" \
| docker load
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
if ! ${KRANE} pull "${TLPRIVATE_SDK_IMAGE}" "${SDK_ARCHIVE_PATH}" --platform "${SDK_PLATFORM}" ; then
echo "failed to pull '${TLPRIVATE_SDK_IMAGE}'" >&2
exit 1
fi
if [[ ${PIPESTATUS[1]} -ne 0 ]]; then
if ! docker load --input "${SDK_ARCHIVE_PATH}" ; then
echo "failed to load '${TLPRIVATE_SDK_IMAGE}' into docker daemon" >&2
exit 1
fi
Expand Down

0 comments on commit aeda99f

Please sign in to comment.