Fix cf-cli download URL to use direct GitHub release URL#1931
Fix cf-cli download URL to use direct GitHub release URL#1931rileyseaburg wants to merge 2 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the Cloud Foundry CLI installation in CircleCI by replacing the failing packages.cloudfoundry.org URL with a direct GitHub release URL. The change addresses 503 errors encountered during CI builds by switching to a more reliable download source.
- Changed cf-cli download URL from cloudfoundry.org redirect to direct GitHub release URL
- Removed verbose curl flag (-v) for cleaner output
- Applied the fix to both build and cron_tasks jobs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.circleci/config.yml
Outdated
| name: Install-cf-cli | ||
| command: | | ||
| curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&source=github' | ||
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86-64.deb' |
There was a problem hiding this comment.
The filename in the download URL appears to have an incorrect architecture format. The URL uses 'x86-64' but Debian packages for Cloud Foundry CLI typically use 'x86_64' with an underscore. Please verify this is the correct URL by checking the actual GitHub releases page at https://github.com/cloudfoundry/cli/releases/tag/v8.17.0 to ensure the filename matches exactly.
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86-64.deb' | |
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86_64.deb' |
| name: Install-cf-cli | ||
| command: | | ||
| curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&source=github' | ||
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86-64.deb' |
There was a problem hiding this comment.
The filename in the download URL appears to have an incorrect architecture format. The URL uses 'x86-64' but Debian packages for Cloud Foundry CLI typically use 'x86_64' with an underscore. Please verify this is the correct URL by checking the actual GitHub releases page at https://github.com/cloudfoundry/cli/releases/tag/v8.17.0 to ensure the filename matches exactly.
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86-64.deb' | |
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86_64.deb' |
| name: Install-cf-cli | ||
| command: | | ||
| curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&source=github' | ||
| curl -L -o cf-cli_amd64.deb 'https://github.com/cloudfoundry/cli/releases/download/v8.17.0/cf8-cli-installer_8.17.0_x86-64.deb' |
There was a problem hiding this comment.
Hardcoding a specific version (v8.17.0) means this configuration will not automatically receive updates when new versions are released. Consider documenting why this specific version is required, or implement a mechanism to keep the version up to date. This could prevent the application from benefiting from bug fixes and security updates in newer cf-cli releases.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Riley Seaburg <riley@rileyseaburg.com>
|
The URL is correct. According to the GitHub releases API, the actual filename is (with dash), not . Regarding the hardcoded version: This is intentional for stability. CF CLI version changes can break deployments, so pinning to a known-working version is standard practice. When a new cf-cli version is needed, we can update this URL as part of a regular PR. |
Summary
Fix the CircleCI cf-cli installation to use the direct GitHub release URL instead of the redirecting packages.cloudfoundry.org URL, which was causing 503 errors.
Changes