cloudfoundry / cloudfoundry/bosh-openstack-cpi-release

Dynamically resolve Docker build args (follow bosh pattern)

Open
#355 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
35
Forks
67
Avg merge
12h 51m
Merged PRs (30d)
24

Description

The ci/docker/openstack-cpi-release/Dockerfile currently pins the BOSH CLI version via a hardcoded ENV BOSH_CLI_VERSION variable. Bumping the version requires a Dockerfile commit.

bosh solves this more cleanly:

  1. A dedicated build-docker-args task (ci/dockerfiles/integration/build-docker-args.sh) queries the GitHub API for the latest release URLs of all required tools and writes them to docker-build-args/docker-build-args.yml.
  2. The oci-build-task step consumes this file via BUILD_ARGS_FILE: docker-build-args/docker-build-args.yml.
  3. The Dockerfile receives tool URLs via ARG instead of hardcoded values - version bumps happen automatically without any committed change.

We should adopt the same approach:

  • Replace ENV BOSH_CLI_VERSION with ARG BOSH_CLI_URL in the Dockerfile.
  • Add a build-docker-args task + shell script that resolves the latest BOSH CLI release URL from the GitHub API.
  • Wire it into the create-openstack-cpi-release-docker-image pipeline job before the build-image step.

The same applies to the bosh-google-cpi-release ci/docker/bosh-google-cpi-boshrelease/Dockerfile, which has ENV BOSH_CLI_VERSION=7.10.5 with the same hardcoded-version pattern.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ci/docker/openstack-cpi-release/Dockerfile and the create-openstack-cpi-release-docker-image pipeline job. Compare the linked BOSH ci/dockerfiles/integration/build-docker-args.sh and Dockerfile to understand the expected build-args flow, then account for the analogous bosh-google-cpi-release Dockerfile. Done means both CPI image builds resolve the latest BOSH CLI URL through the pipeline instead of a committed version.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github, shell
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.