From 57b2f3947a6b38ee9f81829d11a39751d0a98813 Mon Sep 17 00:00:00 2001 From: Chris Selzo Date: Mon, 22 Jul 2024 14:17:37 -0700 Subject: [PATCH] Change cf installation to use github source Using "cli.run.pivotal.io/stable?release=linux64-binary&source=github" as the source lead to errors like "chmod: cannot access 'cf': Permission denied". ref: https://bosh.ci.cloudfoundry.org/teams/main/pipelines/bosh-bootloader/jobs/bump-bbl-deployment-image/builds/29 Co-authored-by: Nader Ziada --- ci/dockerfiles/deployment/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ci/dockerfiles/deployment/Dockerfile b/ci/dockerfiles/deployment/Dockerfile index 11134691e..615fa1649 100644 --- a/ci/dockerfiles/deployment/Dockerfile +++ b/ci/dockerfiles/deployment/Dockerfile @@ -67,9 +67,14 @@ RUN wget https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0. mv spiff_linux_amd64 /usr/local/bin/spiff && \ chmod +x /usr/local/bin/spiff -RUN curl -L "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github" | tar -zx && \ - chmod +x cf && \ - mv cf /usr/local/bin/cf +# Install cf +RUN curl -s https://api.github.com/repos/cloudfoundry/cli/releases/latest | \ + jq -r '.assets[] | .browser_download_url | select(contains("linux_x86-64"))' | \ + xargs wget && \ + tar -xvf cf*.tgz && \ + rm cf*.tgz && \ + mv cf* /usr/local/bin && \ + chmod +x /usr/local/bin/cf* # Install Credhub RUN curl -s https://api.github.com/repos/cloudfoundry/credhub-cli/releases/latest | \