Skip to content

Commit

Permalink
workflows/docker: Remove installation directory
Browse files Browse the repository at this point in the history
As discussed in #2171 the CAA_IMAGE envs are not working in the e2e code
and combined with the installation directory, it seems seems to add confusion
when we need different CAA images for decoupling of different architectures,
so switch docker to use the same approach as libvirt for consistency.
  • Loading branch information
stevenhorsman committed Jan 22, 2025
1 parent bb3c7f3 commit 968e442
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/e2e_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ on:
required: true
type: string
caa_image:
required: true
type: string
caa_image_tag:
required: false
default: "latest"
description: The cloud-api-adaptor OCI image (including tag) to test
type: string
install_directory_artifact:
description: The archive name of the install directory
Expand Down Expand Up @@ -83,18 +79,24 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Get the install directory
if: ${{ inputs.install_directory_artifact != '' }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.install_directory_artifact }}
path: src/cloud-api-adaptor/install
- name: Install kustomize
run: |
command -v kustomize >/dev/null || \
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | \
sudo bash -s /usr/local/bin
- name: Update kustomization configuration
run: |
cd "install/overlays/docker"
kustomize edit set image "cloud-api-adaptor=${{ inputs.caa_image }}"
# Print for debugging
echo "::group::docker kustomization"
cat kustomization.yaml
echo "::endgroup::"
- name: Config docker
run: |
cat <<- EOF > docker.properties
CAA_IMAGE="${{ inputs.caa_image }}"
CAA_IMAGE_TAG="${{ inputs.caa_image_tag }}"
DOCKER_PODVM_IMAGE="${{ inputs.podvm_image }}"
DOCKER_HOST="unix:///var/run/docker.sock"
DOCKER_NETWORK_NAME="kind"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e_run_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
# IMPORTANT: If you are enabling e2e tests for a given provider,
# then please update the PROVIDERS list (space-separated names, e.g.,
# "aws libvirt").
# TODO - when the packer approach is removed this can go as well
prep_install:
runs-on: ubuntu-24.04
outputs:
Expand Down Expand Up @@ -303,8 +304,7 @@ jobs:
- amd64
uses: ./.github/workflows/e2e_docker.yaml
with:
caa_image: ${{ inputs.registry }}/cloud-api-adaptor
caa_image_tag: ${{ inputs.caa_image_tag }}
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-amd64-dev
podvm_image: ${{ needs.podvm_mkosi_amd64.outputs.docker_oci_image }}
install_directory_artifact: install_directory
git_ref: ${{ inputs.git_ref }}
Expand Down

0 comments on commit 968e442

Please sign in to comment.