Giter VIP home page Giter VIP logo

pack-orb's People

Contributors

aidandelaney avatar buildpack-bot avatar dfreilich avatar eddiewebb avatar edmorley avatar ekcasey avatar elbandito avatar genevieve avatar importhuman avatar jabrown85 avatar jjbustamante avatar jkutner avatar jromero avatar karuppiah7890 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pack-orb's Issues

Detection step for buildpack groups randomly failing

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.

failed to write export report: open report.toml: permission denied

Error logs:

[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

Working directory is a required param without a default, but the command could provide a default

In the orb examples, there is no working-directory provided:

pack-orb/orb.yml

Lines 192 to 195 in e380792

- buildpacks/build:
image-name: myimage
image-file: myimage.tgz
builder: heroku/buildpacks:18

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:

WORKING_DIRECTORY=$(if [ -n "<< parameters.working-directory >>" ]; then echo -n "--path << parameters.working-directory >>"; else echo -n ""; fi)

Support pack create-builder

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!

Issues in the documentation

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.

Orb yaml not valid

In the main branch

$ circleci orb validate orb.yml
Error: Error calling job: 'build'
Arguments referenced without declared parameters: pack-version

This is because of the usage of pack-version here instead of version defined here

Add `--retry` to curl usages

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

(https://app.circleci.com/pipelines/github/heroku/pack-images/1707/workflows/2e556988-a8b5-404e-990c-35591f1016bf/jobs/34140)

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.

Add troubleshooting output

... it would be great if the job could be a bit more verbose by default. It would be great if the job could output:

  • the current path before it runs the pack command
  • the final pack command returned by the create_command function in the pack-build job.

Originally posted by @iplog in #49 (comment)

Allow passing env vars to pack

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.

Support tag argument to pack build

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.