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

justfile: Truncate tag names, everywhere necessary #66

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "justfile: Truncate container tag string if too long"
This reverts commit 0874727.

Turns out this commit missed a lot of occurrences where tag can be too
long, let's find a more generic truncate function to solve the issue.

Signed-off-by: Quentin Monnet <qmo@qmon.net>
qmonnet authored and daniel-noland committed Nov 9, 2024
commit 2dc2dfb10a1a6cf92f0cb6eb629b38e0c29d3559
4 changes: 1 addition & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -366,8 +366,6 @@ build-container: sterile-build
declare build_time_epoch
build_time_epoch="$(date --utc '+%s' --date="{{ _build_time }}")"
declare -r build_time_epoch
tag="${build_date}.{{ _slug }}.{{ target }}.{{ profile }}.{{ _commit }}"
tag="${tag::128}"
sudo -E docker build \
--label "git.commit={{ _commit }}" \
--label "git.branch={{ _branch }}" \
@@ -376,7 +374,7 @@ build-container: sterile-build
--label "build.date=${build_date}" \
--label "build.timestamp={{ _build_time }}" \
--label "build.time_epoch=${build_time_epoch}" \
--tag "{{ _container_repo }}:${tag}" \
--tag "{{ _container_repo }}:${build_date}.{{ _slug }}.{{ target }}.{{ profile }}.{{ _commit }}" \
--build-arg ARTIFACT="artifact/{{ target }}/{{ profile }}/scratch" \
.