Skip to content

Commit

Permalink
5
Browse files Browse the repository at this point in the history
  • Loading branch information
iQQBot committed Apr 23, 2024
1 parent a9fb5f3 commit 600b256
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dev/preview/previewctl/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ scripts:
description:
script: |
IMAGE_REPO_BASE=eu.gcr.io/gitpod-core-dev/build
if [[ -n "$INPUT_IMAGE_REPO_BASE" ]]; then
IMAGE_REPO_BASE=$INPUT_IMAGE_REPO_BASE
fi
echo $IMAGE_REPO_BASE
if [[ -z "$INPUT_PREVIEWCTL_HASH" ]]; then
# If a specific hash isn't provided we'll use the latest image off main
# If a specific hash isn't provided we'll use the latest image of main
PREVIEWCTL_VERSION=$(\
gcloud container images list-tags eu.gcr.io/gitpod-core-dev/build/previewctl \
gcloud container images list-tags $IMAGE_REPO_BASE/previewctl \
--filter="tags:main-gha.*" \
--limit=1 \
--format=json \
| jq --raw-output '.[0].tags[0]' \
)
PREVIEWCTL_IMAGE="eu.gcr.io/gitpod-core-dev/build/previewctl:$PREVIEWCTL_VERSION"
PREVIEWCTL_IMAGE="$IMAGE_REPO_BASE/previewctl:$PREVIEWCTL_VERSION"
else
PREVIEWCTL_IMAGE="eu.gcr.io/gitpod-core-dev/build/previewctl:hash-$INPUT_PREVIEWCTL_HASH"
if [[ -n "$INPUT_IMAGE_REPO_BASE" ]]; then
IMAGE_REPO_BASE=$INPUT_IMAGE_REPO_BASE
fi
PREVIEWCTL_IMAGE="$IMAGE_REPO_BASE/previewctl:hash-$INPUT_PREVIEWCTL_HASH"
fi
echo $PREVIEWCTL_IMAGE
echo "Downloading previewctl for $PREVIEWCTL_IMAGE"
oci-tool fetch file -o $HOME/bin/previewctl --platform=linux-amd64 "$PREVIEWCTL_IMAGE" app/previewctl
chmod +x $HOME/bin/previewctl

0 comments on commit 600b256

Please sign in to comment.