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
should we change build-image without option --commit to default to call git to get the local commit sha?
moduleCommandclassBuildImage < BaseNAME="build-image"OPTIONS=[app_option(required: true),commit_option].freezeDESCRIPTION="Builds and pushes the image to Control Plane"LONG_DESCRIPTION=<<~DESC - Builds and pushes the image to Control Plane - Automatically assigns image numbers, e.g., `app:1`, `app:2`, etc. - Uses `.controlplane/Dockerfile` or a different Dockerfile specified through `dockerfile` in the `.controlplane/controlplane.yml` file - If a commit is provided through `--commit` or `-c`, it will be set as the runtime env var `GIT_COMMIT` DESC
How about if we do this if the commit is not specified?
# Assumes the git CLI is available. This is not the case in production on Heroku.defself.retrieve_sha_from_git`git rev-parse HEAD 2>/dev/null`.to_s.stripend
and get the commit and take the first 7 chars?
Maybe need to allow choosing the number of chars?
Maybe allow turning this off with --no-commit-in-name?
The text was updated successfully, but these errors were encountered:
I think we shouldn't make the default behavior dependent on git. cpl should work regardless of the used vcs in the project.
I think the better approach is to have the incremental image tag as the default, but also have ways to set the method of calculating the image tag in the configuration file.
Also, I think the current --commit option practically works as --tag CUSTOM_IMAGE_TAG. We may choose to use --commit as an alias to --tag COMMIT_SHA (only include first 7 char). But it adds some unnecessary complexity (for the case of passing both options).
In case it is important to know git commit hash in the deployed project in runtime, we may look for ways to pass custom args while building images.
should we change build-image without option --commit to default to call git to get the local commit sha?
https://github.com/shakacode/heroku-to-control-plane/blob/main/lib/command/build_image.rb
HiChee does:
For Github action, that would be
(https://chat.openai.com/share/7be4d077-9dab-4fab-b03d-b68ab057230b)
How about if we do this if the commit is not specified?
and get the commit and take the first 7 chars?
Maybe need to allow choosing the number of chars?
Maybe allow turning this off with --no-commit-in-name?
The text was updated successfully, but these errors were encountered: