-
Notifications
You must be signed in to change notification settings - Fork 292
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
Unable to use buildpacksio/pack:latest image in GitLab #1554
Comments
@dfreilich do you have any insights here? |
That makes sense, to some degree, based on how What configuration are you trying to give in the |
hi @dfreilich, I was trying below job in Gitlab:default: variables: cnb-build-image:
stages:
I also tried entrypoint: ["/bin/sh", "-c"] as mentioned in gitlab, but it didn't worked as well. obviously not shell would have caused this As per Gitlab documentation: The image you choose to run your build in via image directive must have a working shell in its operating system PATH. Supported shells are sh, bash, and pwsh (since 13.9) for Linux, and PowerShell for Windows. GitLab Runner cannot execute a command using the underlying OS system calls (such as exec). Please let me know your test outcome. |
@anoopvlcy I think the problem you are encountering is due to the pack image not having a shell. Can you try providing |
As an alternative, you may get this to work by enabling Auto DevOps; the guide can be found here: https://buildpacks.io/docs/tools/gitlab/ and here: https://docs.gitlab.com/ee/topics/autodevops/stages.html#auto-build-using-cloud-native-buildpacks |
I tried this already. Gitlab requires a shell to execute |
I have seen auto devops before... We are not planning to use Auto DevOps for our use case. |
Makes sense. I think it could make sense for us to release a pack image with a shell (built with the |
@dfreilich In |
@dfreilich - I see a couple of paths here and wonder which you prefer or what i'm missing:
|
If we are making changes to the pack image, this issue is possibly related: #1579 |
hi there, I'd like to work on solving this! |
Hi, is there any update for this issue? I'm having the same problem - buildpacks can't be used in gitlab ci. |
@buildpacks/platform-maintainers any thoughts on this one? |
Thanks for the pings 😄 . Let's rework the delivery-docker.yml workflow, once #1745 is merged in, to publish two images using a matrix, one based on the |
Sounds good - I'd also suggest using the tags |
Any update on this? I am just facing the same problem. |
@icruces thanks for the ping - I've pulled this issue into the next milestone. Hopefully it could get the attention it deserves as more cycles are freed up (once we ship pack 0.30.0). If anyone is interested in contributing this as suggested in #1554 (comment) that could help it move faster. |
Summary
When we use _buildpacksio/pack:latest as Gitlab CI image, the build is failing with below error.
ERROR: Job failed (system failure): Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown (exec.go:73:0s)
Reproduction
Create Gitlab CI template and run pipeline
however when we use older version of "buildpacksio/pack" image (say 0.12.0) its working as expected
Steps
.test-base:
image:
name: "buildpacksio/pack:latest"
entrypoint: [""]
Return above mentioned error.
Current behavior
Returns error
ERROR: Job failed (system failure): Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown (exec.go:73:0s)
Expected behavior
Should not return error and should be able to run shell scripts
Environment
The text was updated successfully, but these errors were encountered: