Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two fixes for pipeline-builder #1549

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Two fixes for pipeline-builder #1549

merged 2 commits into from
Apr 1, 2024

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Apr 1, 2024

  1. Minor fix in update-pipeline.sh. It tries to add the build script even if that might not exist. This causes the job to fail for composite buildpacks.

  2. Update create and package buildpack scripts such that they work and run out of the generated buildpack directory. This helps with a pack limitation that does not let you publish images when the package.toml file lives outside of the buildpack directory.

2.) fixes the following error:

pack -v buildpack package docker.io/dmikusa/rust -c ../package.toml --publish
Warning: A new '--target' flag is available to set the platform for the buildpack package, using 'linux' as default
Downloading buildpack from URI: file:///Users/dmikusa/Code/OSS/paketo-community/rust
Downloading buildpack dependency for platform linux
Downloading buildpack from image: docker.io/paketocommunity/rustup:1.11.0
ERROR: packaging dependencies (uri=docker://docker.io/paketocommunity/rustup:1.11.0,image=): extracting from registry docker://docker.io/paketocommunity/rustup:1.11.0: extracting buildpacks from docker.io/paketocommunity/rustup:1.11.0: could not find label io.buildpacks.buildpackage.metadata

@dmikusa dmikusa requested a review from a team as a code owner April 1, 2024 13:06
@dmikusa dmikusa added type:bug A general bug semver:patch A change requiring a patch version bump labels Apr 1, 2024
@dmikusa dmikusa force-pushed the fixes branch 2 times, most recently from 84b5c11 to 48356c2 Compare April 1, 2024 13:09
1. Minor fix in update-pipeline.sh. It tries to add the build script even if that might not exist. This causes the job to fail for composite buildpacks.

2. Update create and package buildpack scripts such that they work and run out of the generated buildpack directory. This helps with a pack limitation that does not let you publish images when the `package.toml` file lives outside of the buildpack directory.

2.) fixes the following error:

```
pack -v buildpack package docker.io/dmikusa/rust -c ../package.toml --publish
Warning: A new '--target' flag is available to set the platform for the buildpack package, using 'linux' as default
Downloading buildpack from URI: file:///Users/dmikusa/Code/OSS/paketo-community/rust
Downloading buildpack dependency for platform linux
Downloading buildpack from image: docker.io/paketocommunity/rustup:1.11.0
ERROR: packaging dependencies (uri=docker://docker.io/paketocommunity/rustup:1.11.0,image=): extracting from registry docker://docker.io/paketocommunity/rustup:1.11.0: extracting buildpacks from docker.io/paketocommunity/rustup:1.11.0: could not find label io.buildpacks.buildpackage.metadata
```

Signed-off-by: Daniel Mikusa <[email protected]>
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail
set -xeuo pipefail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we keep that in final version (-x) ?

Copy link
Member

@anthonydahanne anthonydahanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good; please review if you want to keep the -x in both scripts

@dmikusa
Copy link
Contributor Author

dmikusa commented Apr 1, 2024

🤦 I totally meant to remove that

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa merged commit 1a0dcfa into main Apr 1, 2024
5 checks passed
@dmikusa dmikusa deleted the fixes branch April 1, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants