Skip to content
Open
Changes from all commits
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
7 changes: 5 additions & 2 deletions .gitlab/devcontainer-to-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ devcontainer_to_ghcr:
before_script:
- |
crane_archive=/tmp/go-containerregistry_Linux_x86_64.tar.gz
crane_bin_dir="$CI_PROJECT_DIR/.ci-bin"
curl -fsSL \
"https://github.com/google/go-containerregistry/releases/download/${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz" \
-o "$crane_archive"
printf '%s %s\n' "$CRANE_LINUX_X86_64_SHA256" "$crane_archive" | sha256sum -c -
tar -xzf "$crane_archive" -C /usr/local/bin crane
mkdir -p "$crane_bin_dir"
tar -xzf "$crane_archive" -C "$crane_bin_dir" crane
export PATH="$crane_bin_dir:$PATH"
Comment on lines +40 to +42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move the crane fix to the source template

This file says it is synced from DataDog/dd-repo-tools and must not be edited here. The next campaign sync can replace this local install fix, restore extraction to /usr/local/bin, and break the job again. Apply the fix to the named source template, then sync the generated file.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crane version
- |
umask 077
Expand Down Expand Up @@ -80,7 +83,7 @@ devcontainer_to_ghcr:
test "$(crane digest "$stable_ref")" = "$published_digest"
echo "Published $stable_ref@$published_digest"
after_script:
- crane auth logout ghcr.io || true
- '"$CI_PROJECT_DIR/.ci-bin/crane" auth logout ghcr.io || true'
- |
if [ -z "${GHCR_TOKEN:-}" ] && [ -s "$DEVCONTAINER_GHCR_TOKEN_FILE" ]; then
dd-octo-sts revoke --token "$(cat "$DEVCONTAINER_GHCR_TOKEN_FILE")" \
Expand Down
Loading