diff --git a/Makefile b/Makefile index ecf4cb29..1b25ce3f 100644 --- a/Makefile +++ b/Makefile @@ -210,8 +210,6 @@ docker-buildx: docker buildx create --platform ${PLATFORMS} --name container-builder --use;\ fi docker buildx build --platform ${PLATFORMS} \ - --build-arg RUNNER_VERSION=${RUNNER_VERSION} \ - --build-arg DOCKER_VERSION=${DOCKER_VERSION} \ --build-arg VERSION=${VERSION} \ --build-arg COMMIT_SHA=${COMMIT_SHA} \ -t "${DOCKER_IMAGE_NAME}:${VERSION}" \ diff --git a/test/actions.github.com/anonymous-proxy-setup.test.sh b/test/actions.github.com/anonymous-proxy-setup.test.sh index ea2f0ba4..f4412ea7 100755 --- a/test/actions.github.com/anonymous-proxy-setup.test.sh +++ b/test/actions.github.com/anonymous-proxy-setup.test.sh @@ -51,7 +51,7 @@ function install_scale_set() { --set proxy.https.url="http://host.minikube.internal:3128" \ --set "proxy.noProxy[0]=10.96.0.1:443" \ "${ROOT_DIR}/charts/gha-runner-scale-set" \ - --version="${VERSION}" \ + --version="${IMAGE_VERSION}" \ --debug if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then diff --git a/test/actions.github.com/auth-proxy-setup.test.sh b/test/actions.github.com/auth-proxy-setup.test.sh index 843d7541..ff290f54 100755 --- a/test/actions.github.com/auth-proxy-setup.test.sh +++ b/test/actions.github.com/auth-proxy-setup.test.sh @@ -66,7 +66,7 @@ function install_scale_set() { --set proxy.https.credentialSecretRef="proxy-auth" \ --set "proxy.noProxy[0]=10.96.0.1:443" \ "${ROOT_DIR}/charts/gha-runner-scale-set" \ - --version="${VERSION}" \ + --version="${IMAGE_VERSION}" \ --debug if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then diff --git a/test/actions.github.com/default-setup.test.sh b/test/actions.github.com/default-setup.test.sh index 33548740..69ccfd38 100755 --- a/test/actions.github.com/default-setup.test.sh +++ b/test/actions.github.com/default-setup.test.sh @@ -24,7 +24,7 @@ function install_arc() { --create-namespace \ --set image.repository="${IMAGE_NAME}" \ --set image.tag="${IMAGE_TAG}" \ - ${ROOT_DIR}/charts/gha-runner-scale-set-controller \ + "${ROOT_DIR}/charts/gha-runner-scale-set-controller" \ --debug if ! NAME="${ARC_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_arc; then @@ -40,8 +40,8 @@ function install_scale_set() { --create-namespace \ --set githubConfigUrl="https://github.com/${TARGET_ORG}/${TARGET_REPO}" \ --set githubConfigSecret.github_token="${GITHUB_TOKEN}" \ - ${ROOT_DIR}/charts/gha-runner-scale-set \ - --version="${VERSION}" \ + "${ROOT_DIR}/charts/gha-runner-scale-set" \ + --version="${IMAGE_VERSION}" \ --debug if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then diff --git a/test/actions.github.com/dind-mode-setup.test.sh b/test/actions.github.com/dind-mode-setup.test.sh index e61a7470..f047a05e 100755 --- a/test/actions.github.com/dind-mode-setup.test.sh +++ b/test/actions.github.com/dind-mode-setup.test.sh @@ -41,8 +41,8 @@ function install_scale_set() { --set githubConfigUrl="https://github.com/${TARGET_ORG}/${TARGET_REPO}" \ --set githubConfigSecret.github_token="${GITHUB_TOKEN}" \ --set containerMode.type="dind" \ - ${ROOT_DIR}/charts/gha-runner-scale-set \ - --version="${VERSION}" \ + "${ROOT_DIR}/charts/gha-runner-scale-set" \ + --version="${IMAGE_VERSION}" \ --debug if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then diff --git a/test/actions.github.com/helper.sh b/test/actions.github.com/helper.sh index 2439587c..a7ffafbd 100644 --- a/test/actions.github.com/helper.sh +++ b/test/actions.github.com/helper.sh @@ -9,26 +9,25 @@ ROOT_DIR="$(realpath "${DIR}/../..")" export TARGET_ORG="${TARGET_ORG:-actions-runner-controller}" export TARGET_REPO="${TARGET_REPO:-arc_e2e_test_dummy}" export IMAGE_NAME="${IMAGE_NAME:-arc-test-image}" -export VERSION="${VERSION:-$(yq .version < "${ROOT_DIR}/charts/gha-runner-scale-set-controller/Chart.yaml")}" -export IMAGE_VERSION="${IMAGE_VERSION:-${VERSION}}" +export IMAGE_VERSION="${VERSION:-$(yq .version < "${ROOT_DIR}/charts/gha-runner-scale-set-controller/Chart.yaml")}" +export IMAGE_TAG="${IMAGE_NAME}:${IMAGE_VERSION}" + +export PLATFORMS="linux/amd64" +export COMMIT_SHA="$(git rev-parse HEAD)" function build_image() { - echo "Building ARC image ${IMAGE_NAME}:${IMAGE_VERSION}" + echo "Building ARC image ${IMAGE_TAG}" cd "${ROOT_DIR}" || exit 1 - export DOCKER_CLI_EXPERIMENTAL=enabled - export DOCKER_BUILDKIT=1 docker buildx build --platform "${PLATFORMS}" \ - --build-arg RUNNER_VERSION="${RUNNER_VERSION}" \ - --build-arg DOCKER_VERSION="${DOCKER_VERSION}" \ - --build-arg VERSION="${VERSION}" \ + --build-arg VERSION="${IMAGE_VERSION}" \ --build-arg COMMIT_SHA="${COMMIT_SHA}" \ - -t "${IMAGE_NAME}:${IMAGE_VERSION}" \ + -t "${IMAGE_TAG}" \ -f Dockerfile \ . --load - echo "Created image ${IMAGE_NAME}:${IMAGE_VERSION}" + echo "Created image ${IMAGE_TAG}" cd - || exit 1 } @@ -40,7 +39,7 @@ function create_cluster() { minikube start echo "Loading image into minikube cluster" - minikube image load "${IMAGE_NAME}:${IMAGE_VERSION}" + minikube image load "${IMAGE_TAG}" } function delete_cluster() { diff --git a/test/actions.github.com/kubernetes-mode-setup.test.sh b/test/actions.github.com/kubernetes-mode-setup.test.sh index f98501ad..43764f04 100755 --- a/test/actions.github.com/kubernetes-mode-setup.test.sh +++ b/test/actions.github.com/kubernetes-mode-setup.test.sh @@ -50,7 +50,7 @@ function install_scale_set() { --set containerMode.kubernetesModeWorkVolumeClaim.storageClassName="openebs-hostpath" \ --set containerMode.kubernetesModeWorkVolumeClaim.resources.requests.storage="1Gi" \ "${ROOT_DIR}/charts/gha-runner-scale-set" \ - --version="${VERSION}" \ + --version="${IMAGE_VERSION}" \ --debug if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then diff --git a/test/actions.github.com/single-namespace-setup.test.sh b/test/actions.github.com/single-namespace-setup.test.sh index 2064fd8e..c49e3a51 100755 --- a/test/actions.github.com/single-namespace-setup.test.sh +++ b/test/actions.github.com/single-namespace-setup.test.sh @@ -25,7 +25,7 @@ function install_arc() { --set image.repository="${IMAGE_NAME}" \ --set image.tag="${IMAGE_TAG}" \ --set flags.watchSingleNamespace="${ARC_NAMESPACE}" - ${ROOT_DIR}/charts/gha-runner-scale-set-controller \ + "${ROOT_DIR}/charts/gha-runner-scale-set-controller" \ --debug if ! NAME="${ARC_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_arc; then @@ -41,8 +41,8 @@ function install_scale_set() { --create-namespace \ --set githubConfigUrl="https://github.com/${TARGET_ORG}/${TARGET_REPO}" \ --set githubConfigSecret.github_token="${GITHUB_TOKEN}" \ - ${ROOT_DIR}/charts/gha-runner-scale-set \ - --version="${VERSION}" \ + "${ROOT_DIR}/charts/gha-runner-scale-set" \ + --version="${IMAGE_VERSION}" \ --debug if ! NAME="${SCALE_SET_NAME}" NAMESPACE="${ARC_NAMESPACE}" wait_for_scale_set; then