Commit Graph

20 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
3985fdcca4 feat: allow --volume flags to be passed to pack at buildtime
Closes #7119
2025-03-09 07:23:21 -04:00
Jose Diaz-Gonzalez
a433508fb1 chore: deprecate the builder-specific pre-build-* triggers in favor of a global pre-build trigger
The pre-build trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
b19b409dd6 chore: deprecate the builder-specific post-build-* triggers in favor of a global post-build trigger
The pre-build trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
c2db3ddaba fix: add missing relabel command to docker-image-labeler for CNB builder
Closes #6138
2023-08-26 14:33:51 -04:00
Jose Diaz-Gonzalez
f8ccf52079 refactor: only use detected port mapping if override is not specified
Previously, we would always set the port mapping during a dockerfile build, making it difficult for users to override mappings. We also only _sometimes_ updated the detected port mapping, further confusing issues when users were migrating from Dockerfile to Buildpacks for builds.

Now, we always detect the port mapping during the build process, and only use that detected port mapping if an override is not specified. This greatly simplifies the experience around port mapping, as now a user can create an app, set a port mapping, and that first deploy will respect the port mapping without an additional deploy.

The builder always has the best context for what the app should be listening on, and thus we can always specify a "default" port mapping at this stage. Users can override this map as desired later.

This change also results in the removal of a ton of internal code that is now centralized in the ports plugin.

Closes #4067
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
4bc3de5540 feat: write auto-detected port mappings during a deploy
During an app build, we now auto-detect ports based on the source code. This is usually http:80:5000, with Dockerfile-based deploys having their ports extracted from the docker image or Dockerfile. Additionally, we add an https:443 mapping for any detected http:80 mapping when there is an ssl certificate, and all http port mappings are transformed to https mappings for Dockerfile-based deploys.

While the ports aren't currently consumed, a future refactor will provide the ability to fallback to the new detected ports when there is no user-specified port mapping.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
b983afe9fa feat: add builder-type and image-stage labels to all images
This allows users to further introspect where an image came from, and therefore what - if any - custom logic to perform.
2022-07-05 15:09:59 -04:00
Jose Diaz-Gonzalez
5b7464f525 refactor: use new name for pack format 2022-01-15 08:39:53 -05:00
Jose Diaz-Gonzalez
6f55b89149 refactor: simplify env var passing by using a new config:export format
Also add a test for env vars during build time for pack-built applications.
2022-01-15 08:34:02 -05:00
TheDoctor
7f213beefa Mirror env behaviour from herokuish builder, adapt to pack
Docker accepts its flags as --env=FOO but pack requires --env FOO, which is why ENV_ARGS_VALUES is iterated into ENV_ARGS, then pack run through eval
2022-01-15 06:54:03 -05:00
TheDoctor
bc1aba6c7a Use exported environment vars during pack build
Config was exported, but the result never used.
2022-01-15 06:54:03 -05:00
Jose Diaz-Gonzalez
4022ebd31c refactor: allow missing project.toml
We should treat the project.toml as an optional file, as is the Procfile. Additionally, moving the file into place early will ensure there is no chance of selecting the wrong file.
2021-07-10 14:57:59 -04:00
Jose Diaz-Gonzalez
79cd7e4cab feat: do not fail build when missing project.toml 2021-07-10 14:57:57 -04:00
Jose Diaz-Gonzalez
d68473bfc2 refactor: cleanup Dockerfile and project.toml lookups 2021-07-10 14:57:57 -04:00
Jose Diaz-Gonzalez
9082c51074 feat: add ability to specify a custom project.toml path 2021-07-10 14:57:56 -04:00
Jose Diaz-Gonzalez
c969a1a742 fix: use correct variable 2021-05-30 15:31:19 -04:00
Jose Diaz-Gonzalez
3d745b7c12 chore: use one fewer variable 2021-05-30 15:30:02 -04:00
Niklas Tasler
e38905765b respect custom stack when using cloud native builder 2021-05-30 17:54:39 +02:00
Jose Diaz-Gonzalez
1ec71cd509 refactor: switch detected builder so first one wins
Also rename internal cnb references to pack (where possible).
2021-02-28 16:19:41 -05:00
Jose Diaz-Gonzalez
6462dd891c chore: rename builder-cnb to builder-pack 2021-02-28 16:19:41 -05:00