From 968e442c8feaaf60d2df70e979940e9a3cf4b0f1 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Fri, 6 Dec 2024 09:09:21 +0000 Subject: [PATCH] workflows/docker: Remove installation directory 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. --- .github/workflows/e2e_docker.yaml | 28 +++++++++++++++------------- .github/workflows/e2e_run_all.yaml | 4 ++-- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/e2e_docker.yaml b/.github/workflows/e2e_docker.yaml index 9ccff221b..b6b4e3fd9 100644 --- a/.github/workflows/e2e_docker.yaml +++ b/.github/workflows/e2e_docker.yaml @@ -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 @@ -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" diff --git a/.github/workflows/e2e_run_all.yaml b/.github/workflows/e2e_run_all.yaml index 5f6523d37..93bbed265 100644 --- a/.github/workflows/e2e_run_all.yaml +++ b/.github/workflows/e2e_run_all.yaml @@ -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: @@ -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 }}