Skip to content

Commit

Permalink
fixup?: 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 authored and wainersm committed Jan 13, 2025
1 parent a78b1a5 commit 57c858d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
30 changes: 16 additions & 14 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 Expand Up @@ -123,4 +125,4 @@ jobs:
kind get kubeconfig -n "$CLUSTER_NAME" > "$KUBECONFIG"
./hack/ci-e2e-debug-fail.sh
# Avoid running with `set -e` as command fails should be allowed
shell: bash {0}
shell: bash {0}
6 changes: 3 additions & 3 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 @@ -290,7 +291,7 @@ jobs:
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
needs: [podvm_mkosi_amd64, image, prep_install]
needs: [podvm_mkosi_amd64, caa_image_amd64]
strategy:
fail-fast: false
matrix:
Expand All @@ -302,8 +303,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 57c858d

Please sign in to comment.