cloudfoundry / eirini-release

Helm release for Project Eirini
Apache License 2.0
36 stars 34 forks source link

Deploying an app with multiple buildpacks is not supported by eirini-staging #149

Closed stoyanr closed 4 years ago

stoyanr commented 4 years ago

Description

Deploying an app with multiple buildpacks as described in How Buildpacks Work in CFAR is not really supported by eirini-staging.

Steps to reproduce

Deploy an app with multiple buildpacks specified in its manifest. In my case, I have an app with one standard buildpack (java_buildpack) and one custom buldpack:

- buildpacks:
  - uas_dataflow_server_buildpack
  - java_buildpack

What was expected to happen

The sequence of interactions as specified in No Buildpack Detection. In this case , the supply script of the first buildpack should be invoked, and then the application should start with the second buildpack.

What actually happened

Depending on whether or not the first buildpack has a detect script that returns 0, one of the following outcomes:

Suggested fix (optional)

The bug is in https://github.com/cloudfoundry-incubator/eirini-staging/blob/ae1327186284f350673df0d5e3b4f21045fd71fa/builder/config.go#L48-L55 . The skipDetect flag is never set if len(buildpacks) > 0. To fix this issue, this flag should be set if len(buildpacks) > 0 and the skipDetect flags of all buildpacks are true.

Additional information (optional)

Discussed with @georgethebeatle . I intend to open a PR for the fix.

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/170919348

The labels on this github issue will be updated when the story is started.

julz commented 4 years ago

thanks @stoyanr, we'll be very happy to accept a PR to fix this - do let us know if we can help with anything!