Tests/E2E: include heper image builds in e2e tests
This commit is contained in:
parent
24f92b9c3f
commit
7e775f009f
@ -4,7 +4,7 @@ COPY . .
|
||||
RUN make build && bin/k3d version
|
||||
|
||||
FROM docker:19.03-dind as dind
|
||||
RUN apk add bash curl sudo jq
|
||||
RUN apk add bash curl sudo jq git make
|
||||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && \
|
||||
chmod +x ./kubectl && \
|
||||
mv ./kubectl /usr/local/bin/kubectl
|
||||
|
7
Makefile
7
Makefile
@ -111,6 +111,13 @@ build-docker-%:
|
||||
@echo "Building Docker image k3d:$(K3D_IMAGE_TAG)-$*"
|
||||
docker build . -t k3d:$(K3D_IMAGE_TAG)-$* --target $*
|
||||
|
||||
# build helper images
|
||||
build-helper-images:
|
||||
@echo "Building docker image rancher/k3d-proxy:$(GIT_TAG)"
|
||||
docker build proxy/ -f proxy/Dockerfile -t rancher/k3d-proxy:$(GIT_TAG)
|
||||
@echo "Building docker image rancher/k3d-tools:$(GIT_TAG)"
|
||||
docker build --no-cache tools/ -f tools/Dockerfile -t rancher/k3d-tools:$(GIT_TAG) --build-arg GIT_TAG=$(GIT_TAG)
|
||||
|
||||
##############################
|
||||
########## Cleaning ##########
|
||||
##############################
|
||||
|
@ -14,7 +14,7 @@ RUNNER_START_TIMEOUT=${E2E_RUNNER_START_TIMEOUT:-10}
|
||||
# Start the runner container
|
||||
TIMESTAMP=$(date "+%y%m%d%H%M%S")
|
||||
k3de2e=$(docker run -d \
|
||||
-v "$(pwd)/tests:/tests" \
|
||||
-v "$(pwd):/src" \
|
||||
--privileged \
|
||||
-e EXE="$K3D_EXE" \
|
||||
-e CI="true" \
|
||||
@ -43,5 +43,8 @@ until docker inspect "$k3de2e" | jq ".[0].State.Running" && docker logs "$k3de2e
|
||||
(( TIMEOUT++ ))
|
||||
done
|
||||
|
||||
# build helper container images
|
||||
docker exec --workdir /src "$k3de2e" make build-helper-images
|
||||
|
||||
# execute tests
|
||||
docker exec "$k3de2e" /tests/runner.sh
|
||||
docker exec "$k3de2e" /src/tests/runner.sh
|
||||
|
@ -1,6 +1,8 @@
|
||||
FROM golang:1.14 as builder
|
||||
ARG GIT_TAG
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
ENV GIT_TAG=${GIT_TAG}
|
||||
ENV GO111MODULE=on
|
||||
ENV CGO_ENABLED=0
|
||||
RUN make build
|
||||
|
@ -1,7 +1,7 @@
|
||||
SHELL := /bin/bash
|
||||
|
||||
# get git tag
|
||||
GIT_TAG := $(shell git describe --tags)
|
||||
GIT_TAG ?= $(shell git describe --tags)
|
||||
ifeq ($(GIT_TAG),)
|
||||
GIT_TAG := $(shell git describe --always)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user