buildpacks / pack-orb Goto Github PK
View Code? Open in Web Editor NEWA CircleCI Orb for using Cloud Native Buildpacks in CircleCI
Home Page: https://circleci.com/orbs/registry/orb/buildpacks/pack
License: Apache License 2.0
A CircleCI Orb for using Cloud Native Buildpacks in CircleCI
Home Page: https://circleci.com/orbs/registry/orb/buildpacks/pack
License: Apache License 2.0
We started using this orb recently with some good results. However the pack-build
command seems to be randomly failing.
For a given configuration looking like that:
version: '2.1'
orbs:
buildpacks: buildpacks/[email protected]
workflows:
main:
jobs:
- buildpacks/build:
builder: 'heroku/buildpacks:20'
buildpacks: heroku/nodejs;tomh4/python-poetry;heroku/python
image-name: foo
image-file: foo.tgz
working-directory: /home/circleci/project
env-vars: POETRY_VERSION=1.1.12;POETRY_EXPORT_DEV_REQUIREMENTS=1;DISABLE_POETRY_CREATE_RUNTIME_FILE=1
Most of the times everything goes well but it happens that the pack-build
command fails with the following output
20: Pulling from heroku/buildpacks
17ec1767: Pulling fs layer
9c8c3c2f: Pulling fs layer
348e766f: Pulling fs layer
568cbf74: Pulling fs layer
90bafe4a: Pulling fs layer
d7eb3657: Pulling fs layer
5a93e214: Pulling fs layer
efdf9bc9: Pulling fs layer
0bede629: Pulling fs layer
64ba3988: Pulling fs layer
82f12387: Pulling fs layer
568cbf74: Waiting fs layer
918b0518: Pulling fs layer
85bc9dfa: Pulling fs layer
55b83bcd: Pulling fs layer
db7d6f85: Pulling fs layer
deff42eb: Pulling fs layer
55ac2274: Pulling fs layer
dafe4b03: Pulling fs layer
d1b9aa75: Pulling fs layer
fba38b67: Pulling fs layer
78c5ff0a: Pulling fs layer
57d1aa8b: Pulling fs layer
1a26897a: Pulling fs layer
1be9e73e: Pulling fs layer
219d827e: Pulling fs layer
9964778f: Pulling fs layer
65d2946f: Pulling fs layer
3958670f: Pulling fs layer
aa0839f1: Pulling fs layer
Digest: sha256:68502f93e41ffb23bded6f7119e3e2577cdf711f35acaf8c5dc823a11128ab8e
Status: Downloaded newer image for heroku/buildpacks:20
20: Pulling from heroku/pack
17ec1767: Already exists
9c8c3c2f: Already exists
348e766f: Already exists
6ddb3fa7: Pulling fs layer
Digest: sha256:69356f3937101029610c6931e194161b17b5445616a0162e65c86a28526c8334
Status: Downloaded newer image for heroku/pack:20
sha256:be2a4043243db931d991422a0a263cbffb5623579c4f77f3d22fe0a880dcacde: Pulling from tomh4/python-poetry-buildpack/tomh4_python-poetry
Digest: sha256:be2a4043243db931d991422a0a263cbffb5623579c4f77f3d22fe0a880dcacde
Status: Downloaded newer image for ghcr.io/tomh4/python-poetry-buildpack/tomh4_python-poetry@sha256:be2a4043243db931d991422a0a263cbffb5623579c4f77f3d22fe0a880dcacde
===> DETECTING
ERROR: No buildpack groups passed detection.
ERROR: Please check that you are running against the correct path.
ERROR: failed to detect: no buildpacks participating
ERROR: failed to build: executing lifecycle: failed with status code: 100
Exited with code exit status 1
CircleCI received exit code 1
Most of the time, running the failed job again is enough to get the command to pass. A few times we had to run the failed job again a couple of times to get it to pass.
I could not figure out why this is happening. It looks like the code is either not there or that the command is somehow not run from the right directory. Do you have any advice to give us?
Let me know if you need more information.
[exporter] *** Images (0df58292c141):
[exporter] index.docker.io/cnbs/circleci-sample:latest
[exporter] ERROR: failed to write export report: open report.toml: permission denied
ERROR: failed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 246
In the orb examples, there is no working-directory
provided:
Lines 192 to 195 in e380792
However, there is no default for that parameter so it is required on usage:
# Error calling job: 'buildpacks/build'
# Missing required argument(s): working-directory
#
# -------
# Warning: This configuration was auto-generated to show you the message above.
# Don't rerun this job. Rerunning will have no effect.
false
It appears that the actual command implementation does have a backup of ""
for this value which could be moved to the default
definition of the parameter:
Line 116 in e380792
Per - https://buildpacks.slack.com/archives/CD61YAG69/p1604351010063000
We would like to use the pack orb for both building images & for creating our custom builder. Right now the former is supported, but the latter isn't so we are having to copy and paste similar functionality (downloading & installing the pack cli, setting up docker config, etc) into our own circleci config to support the pack create-builder
command. It would be great if this were supported in this orb!
So while trying out this orb, there seems to be some missing jobs and or other information. So I am trying to use build job but this does not actual exist in the source code, so that would be helpful.
One issue that I am having is I am trying to pass parameters in from the CircleCI default values, I keep getting the variable instead of the string that comes from the circleci variables:
in my orb, up a parameter that defaults to the CIRCLE_PROJECT_REPONAME and when I pass that into the image-name fields I get an error about unable to parse, and it displays the variable name and not the variable value, as such it makes that hard to adopt into my orb and wrap it with our defaults.
If they are not being used, can they be removed or do they provide some benefit on import even if none of their commands/jobs are called?
The log output while downloading appears to be mangled due to cursor position limitations on non-tty console output.
Possible solution: pass --no-color
option to pack
.
Log output:
Hi!
I recently encountered this transient CI failure whilst using the pack/install-pack
command:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:02:11 --:--:-- 0
curl: (28) Failed to connect to github.com port 443: Connection timed out
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Exited with code exit status 2
To improve CI reliability it may be worth adding --retry
to the curl usages in this orb, and potentially also a suitable --connect-timeout
. (The same changes should probably also be made to https://github.com/buildpacks/github-actions)
I'll open a PR.
... it would be great if the job could be a bit more verbose by default. It would be great if the job could output:
pack
commandpack
command returned by the create_command
function in the pack-build
job.Originally posted by @iplog in #49 (comment)
The orb should allow a user to pass an env var that gets set during pack build
with the the --env
option.
Most env vars can be set using project.toml
, but this option is necessary for secrets.
The default version is 0.11.2
, when it should probably be 0.13.1
https://buildpacks.slack.com/archives/CD61YAG69/p1618506243015800
Since it's recommended to have a "static" image name argument to pack build
and to use --tag
with the latest pack cli for tagging the image with special tags so that the cache can be properly reused, it would be great if the orb could support this. Right now, if you have to specify a fully tagged name as argument to pack build
, it won't reuse the available cache because the names don't match. To reuse the cache, the orb should support tags for the command where the fully tagged image name(s) can be provided.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.