Skip to content

Dynamically resolve Docker build args (follow bosh pattern) #355

Description

@neddp

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions