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

Add Other Skip Configs #160

Open
jamesward opened this issue Apr 9, 2020 · 12 comments
Open

Add Other Skip Configs #160

jamesward opened this issue Apr 9, 2020 · 12 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jamesward
Copy link
Contributor

Today we have build.skip which skips all build steps but it'd be nice to be able to skip specific steps:

    "build": {
        "skipdocker": false,
        "skipjib": false,
        "skippack": false
    }
@jamesward jamesward added enhancement New feature or request good first issue Good for newcomers labels Apr 9, 2020
@ahmetb
Copy link
Contributor

ahmetb commented Apr 9, 2020

But these are all the same step (i.e. "build").
I don't understand how it would work since all these are mutually exclusive.

@jamesward
Copy link
Contributor Author

In the case of a project I was just working on, it was detecting and running the Jib build, but I really want it to skip that one and go to Buildpacks.

@ahmetb
Copy link
Contributor

ahmetb commented Apr 9, 2020

In the case of a project I was just working on, it was detecting and running the Jib build, but I really want it to skip that one and go to Buildpacks.

that's not a "skip" concern, but more of a build method inference concern.

@ahmetb
Copy link
Contributor

ahmetb commented Apr 9, 2020

In other words, if our detection model can't figure out whether it should use Buildpacks or Jib, we should address that instead of adding more fields.

@jamesward
Copy link
Contributor Author

Yeah. So:

    "build": {
        "docker": false
    }
    "build": {
        "jib": false
    }
    "build": {
        "pack": false
    }

@ahmetb
Copy link
Contributor

ahmetb commented Apr 9, 2020

Can we solve this without adding a knob, though? (I'll try my hardest to push for API change and introducing new features/behavior. :) )

Don't all buildpacks have something like Procfile, for example?

@ahmetb
Copy link
Contributor

ahmetb commented Apr 9, 2020

Also can't you just do build: { skip: true } and have a hook with pack build ?

@jamesward
Copy link
Contributor Author

Yeah, I was able to work around this which was nice :)
https://github.com/alexismp/pdf-merger/blob/java11cr-button/app.json

@ahmetb
Copy link
Contributor

ahmetb commented Apr 9, 2020

I'm seeing a Procfile in that repo. Should our pack detection not be picking it up the build method immediately?

@jamesward
Copy link
Contributor Author

Buildpacks don't always require a Procfile so we can't rely on that.

@ahmetb
Copy link
Contributor

ahmetb commented Apr 10, 2020

But when there’s a Procfile, we can take that?

It seems like this only happens with jib vs pack currently. And I am assuming we detect Jib via some file contents?

If this is a rare case (which is currently what I am hearing) and hooks can unblock, perhaps no need to add 5 more knobs just yet.

@jamesward
Copy link
Contributor Author

This particular project has Jib & Procfile and there is a possibility that a project has Dockerfile, Jib, and Buildpacks. The only viable way I see to control the decision is to allow app.json overrides. But This isn't a big priority since there is a decent work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants