Skip to content

Commit

Permalink
Bring back 1.23 support in the CI pipeline (#475)
Browse files Browse the repository at this point in the history
End-of-life was incorrectly assumed (by me) even though the maintenance
support window is still open until February 28, 2023.
  • Loading branch information
Timo Reimann authored Jan 13, 2023
1 parent e594d58 commit d3e8957
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
run: |
BRANCH=$(echo -n ${BRANCH} | tr -c '[:alnum:]._-' '-')
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${DOCKER_USER}'", "password": "'${DOCKER_PASS}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
images=("${BRANCH}-latest" "${BRANCH}-runtime" "${BRANCH}-tools" "${BRANCH}-tests-1.26" "${BRANCH}-tests-1.25" "${BRANCH}-tests-1.24" "${BRANCH}-builder")
images=("${BRANCH}-latest" "${BRANCH}-runtime" "${BRANCH}-tools" "${BRANCH}-tests-1.26" "${BRANCH}-tests-1.25" "${BRANCH}-tests-1.24" "${BRANCH}-tests-1.23" "${BRANCH}-builder")
for i in ${images[*]}; do curl --fail -sS -X DELETE -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/digitalocean/k8s-e2e-test-runner/tags/$i/; done
curl --fail -sS -X DELETE -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/digitalocean/do-csi-plugin-dev/tags/${BRANCH}/
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
needs: push-images
strategy:
matrix:
kube-release: ['1.26', '1.25', '1.24']
kube-release: ['1.26', '1.25', '1.24', '1.23']

steps:
- name: checkout
Expand Down
27 changes: 25 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ runner-build:
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.25 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.24 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tests-1.23 || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools || true
@docker pull $(CANONICAL_RUNNER_IMAGE):tools || true
@docker pull $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime || true
Expand All @@ -162,7 +164,7 @@ runner-build:
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.26 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.26 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.26 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.25 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.25 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.25 -f test/e2e/Dockerfile test/e2e
Expand All @@ -172,13 +174,27 @@ runner-build:
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.26 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.26 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.26 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.25 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.25 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 -f test/e2e/Dockerfile test/e2e

@echo "building target tests-1.23"
@docker build --target tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
--cache-from $(CANONICAL_RUNNER_IMAGE):builder \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.26 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.26 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.25 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.25 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 -f test/e2e/Dockerfile test/e2e

@echo "building target tools"
@docker build --target tools \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)builder \
Expand All @@ -189,6 +205,8 @@ runner-build:
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.25 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools \
--cache-from $(CANONICAL_RUNNER_IMAGE):tools \
-t $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools -f test/e2e/Dockerfile test/e2e
Expand All @@ -203,6 +221,8 @@ runner-build:
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.25 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools \
--cache-from $(CANONICAL_RUNNER_IMAGE):tools \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime \
Expand All @@ -219,6 +239,8 @@ runner-build:
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.25 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.24 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23 \
--cache-from $(CANONICAL_RUNNER_IMAGE):tests-1.23 \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools \
--cache-from $(CANONICAL_RUNNER_IMAGE):tools \
--cache-from $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime \
Expand All @@ -232,6 +254,7 @@ runner-push: runner-build
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.26
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.25
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.24
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tests-1.23
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)tools
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)runtime
@docker push $(RUNNER_IMAGE):$(RUNNER_IMAGE_TAG_PREFIX)latest
Expand Down
12 changes: 12 additions & 0 deletions test/e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ RUN echo "${KUBE_VERSION_1_24_E2E_BIN_SHA256_CHECKSUM}" e2e.test | sha256sum --c
RUN cp e2e.test /e2e.1.24.test
RUN cp ginkgo /ginkgo-1.24

### Kubernetes 1.23
FROM builder AS tests-1.23
ARG KUBE_VERSION_1_23=1.23.7
ARG KUBE_VERSION_1_23_E2E_BIN_SHA256_CHECKSUM=e1a9a632b7715d4bfbac3322da5d32072eaf544b31a81a6c3df205d0dc0e96b7

RUN curl --fail --location https://dl.k8s.io/v${KUBE_VERSION_1_23}/kubernetes-test-linux-amd64.tar.gz | tar xvzf - --strip-components 3 kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo
RUN echo "${KUBE_VERSION_1_23_E2E_BIN_SHA256_CHECKSUM}" e2e.test | sha256sum --check
RUN cp e2e.test /e2e.1.23.test
RUN cp ginkgo /ginkgo-1.23

FROM golang:1.19 AS tools
# See comment at the bottom on why we need tini.
ARG TINI_VERSION=0.18.0
Expand Down Expand Up @@ -78,6 +88,8 @@ COPY --from=tests-1.25 /e2e.1.25.test /
COPY --from=tests-1.25 /ginkgo-1.25 /usr/local/bin
COPY --from=tests-1.24 /e2e.1.24.test /
COPY --from=tests-1.24 /ginkgo-1.24 /usr/local/bin
COPY --from=tests-1.23 /e2e.1.23.test /
COPY --from=tests-1.23 /ginkgo-1.23 /usr/local/bin
COPY --from=tools /tini /sbin/
COPY --from=tools /doctl /usr/local/bin/
COPY --from=tools /kubectl /usr/local/bin/
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var (
errTokenMissing = errors.New("token must be specified in DIGITALOCEAN_ACCESS_TOKEN environment variable")

// De-facto global variables that require initialization at runtime.
supportedKubernetesVersions = []string{"1.26", "1.25", "1.24"}
supportedKubernetesVersions = []string{"1.26", "1.25", "1.24", "1.23"}
sourceFileDir string
testdriverDirectoryAbsolutePath string
deployScriptPath string
Expand Down

0 comments on commit d3e8957

Please sign in to comment.