Skip to content

fix: use CNB_TARGET_* environment variables#151

Merged
leafty merged 9 commits into
mainfrom
leafty/fix-target-platform
Dec 5, 2025
Merged

fix: use CNB_TARGET_* environment variables#151
leafty merged 9 commits into
mainfrom
leafty/fix-target-platform

Conversation

@leafty
Copy link
Copy Markdown
Member

@leafty leafty commented Dec 2, 2025

Closes #148.

Removes os and arch detection in build scripts and instead use the CNB_TARGET_OS and the CNB_TARGET_ARCH environment variables.

Also, print a warning if the detected architecture (from uname) is different from the target architecture: at the moment, cross-platform builds with pack will very likely create an image with incompatible binaries (as many buildpacks use uname and not target platform metadata).

@leafty leafty marked this pull request as ready for review December 3, 2025 08:12
Comment thread buildpacks/renku-variables/bin/build
Comment thread buildpacks/vscodium/bin/build
SalimKayal
SalimKayal previously approved these changes Dec 4, 2025
@leafty leafty merged commit a152e94 into main Dec 5, 2025
3 checks passed
@leafty leafty deleted the leafty/fix-target-platform branch December 5, 2025 10:38
SalimKayal pushed a commit that referenced this pull request Jan 13, 2026
Closes #148.

Removes os and arch detection in `build` scripts and instead use the
`CNB_TARGET_OS` and the `CNB_TARGET_ARCH` environment variables.

Also, print a warning if the detected architecture (from `uname`) is
different from the target architecture: at the moment, cross-platform
builds with pack will very likely create an image with incompatible
binaries (as many buildpacks use `uname` and not target platform
metadata).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use CNB_TARGET_* variables

2 participants