You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Spring Boot plugins for Gradle and Maven allows configuring the Buildpacks task via properties in the build.gradle or pom.xml files. Some of the properties can be specified via convenient CLI options, which are especially useful when automating certain workflows such as in a CI environment or when automating a local development workflow on Kubernetes.
Feature Suggestion
It would be extremely useful if it was possible to pass environment variables to Buildpacks via CLI options. For example:
The Paketo Buildpacks offer incredible flexibility and settings for production that can be toggled on/off via environment variables. It would be useful to have the possibility to pass environment variables in a CI pipeline to configure features that are not needed by default in a local environment.
One of the features offered by Paketo Buildpacks is support for live reload, which needs to be activated via an environment variable. It works well paired with Spring Boot DevTools and a tool like Skaffold or Tilt, but it would be great if the extra environment variable could be configured via CLI only in the Skaffold/Tilt configuration rather than in the build.gradle/pom.xml file.
Alternatives Considered
The alternative I considered would be to introduce some profiles/feature flags in the pom.xml/build.gradle and add the configuration needed only in CI or only for local development behind those. However, this has a huge impact on the developer experience and maintenance cost. Furthermore, for the CI use case, it means that it's not possible to centralise the configuration in a common pipeline since changes are needed in each project's build.gradle or pom.xml file (unless perhaps more complex settings are introduced, such as init.gradle scripts or settings.xml extra options, but those would not be viable alternatives for all the use cases).
Contributions
If you think this feature makes sense for Spring Boot, I volunteer my time to help implement it.
The text was updated successfully, but these errors were encountered:
@Option does not support maps and we would want to change the type of the environment property to accommodate this feature. It may be possible to introduce a new @InternalListProperty<String> for the environment variables contributed from the command line and to map these into the existing environment property. Some experimentation in this and similar areas that explores what may be possible would be most welcome.
Context
The Spring Boot plugins for Gradle and Maven allows configuring the Buildpacks task via properties in the
build.gradle
orpom.xml
files. Some of the properties can be specified via convenient CLI options, which are especially useful when automating certain workflows such as in a CI environment or when automating a local development workflow on Kubernetes.Feature Suggestion
It would be extremely useful if it was possible to pass environment variables to Buildpacks via CLI options. For example:
./gradlew bootBuildImage --environment BP_LIVE_RELOAD_ENABLED="true"
When multiple environment variables:
Why
Two main reasons why I'm suggesting this feature:
build.gradle
/pom.xml
file.Alternatives Considered
The alternative I considered would be to introduce some profiles/feature flags in the
pom.xml
/build.gradle
and add the configuration needed only in CI or only for local development behind those. However, this has a huge impact on the developer experience and maintenance cost. Furthermore, for the CI use case, it means that it's not possible to centralise the configuration in a common pipeline since changes are needed in each project'sbuild.gradle
orpom.xml
file (unless perhaps more complex settings are introduced, such asinit.gradle
scripts orsettings.xml
extra options, but those would not be viable alternatives for all the use cases).Contributions
If you think this feature makes sense for Spring Boot, I volunteer my time to help implement it.
The text was updated successfully, but these errors were encountered: