Skip to content

Commit

Permalink
Simplify and update E2E drone pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Oct 1, 2024
1 parent 0553a1a commit 4d3ccc9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,11 @@ steps:
- pull_request

- name: build-e2e-image
image: rancher/dapper:v0.6.0
image: docker:25.0.5
commands:
- DOCKER_BUILDKIT=1 docker build --target test-e2e -t test-e2e -f Dockerfile.test .
- SKIP_VALIDATE=true SKIP_AIRGAP=true GOCOVER=1 dapper ci
- apk add make git bash
- GOCOVER=1 make local
- cp dist/artifacts/* /tmp/artifacts/
volumes:
- name: cache
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN if [ -n "${TRIVY_ARCH}" ]; then \
fi

# Install goimports
RUN GOPROXY=direct go install golang.org/x/tools/cmd/goimports@gopls/v0.11.0
RUN GOPROXY=direct go install golang.org/x/tools/cmd/goimports@gopls/v0.16.0

# Cleanup
RUN rm -rf /go/src /go/pkg
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG=golang:1.22.6-alpine3.19
ARG GOLANG=golang:1.22.6-alpine3.20
FROM ${GOLANG} as infra

ARG http_proxy=$http_proxy
Expand All @@ -9,18 +9,16 @@ ENV https_proxy=$https_proxy
ENV no_proxy=$no_proxy

RUN apk -U --no-cache add bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers \
zlib-dev tar zip squashfs-tools npm coreutils python3 py3-pip openssl-dev libffi-dev libseccomp libseccomp-dev \
zlib-dev tar zip squashfs-tools npm coreutils openssl-dev libffi-dev libseccomp libseccomp-dev \
libseccomp-static make libuv-static sqlite-dev sqlite-static libselinux libselinux-dev zlib-dev zlib-static \
zstd pigz alpine-sdk binutils-gold btrfs-progs-dev btrfs-progs-static gawk yq pipx \
&& \
if [ "$(go env GOARCH)" = "amd64" ]; then \
apk -U --no-cache add mingw-w64-gcc; \
fi

RUN PIPX_BIN_DIR=/usr/local/bin pipx install awscli

# this works for both go 1.17 and 1.18
RUN GOPROXY=direct go install golang.org/x/tools/cmd/goimports@gopls/v0.11.0
# Install goimports
RUN GOPROXY=direct go install golang.org/x/tools/cmd/goimports@gopls/v0.16.0
RUN rm -rf /go/src /go/pkg

RUN if [ "$(go env GOARCH)" = "amd64" ]; then \
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ ENTRYPOINT ["/bin/test-mods"]

FROM test-base as test-k3s

RUN apk -U --no-cache add git gcc musl-dev docker curl coreutils python3 openssl py3-pip procps findutils yq pipx

RUN PIPX_BIN_DIR=/usr/local/bin pipx install awscli
RUN apk -U --no-cache add git gcc musl-dev docker curl coreutils openssl procps findutils yq

ENV SONOBUOY_VERSION 0.57.2

Expand Down Expand Up @@ -44,7 +42,7 @@ RUN vagrant box add bento/ubuntu-24.04 --provider libvirt --force
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; \
chmod +x ./kubectl; \
mv ./kubectl /usr/local/bin/kubectl
RUN GO_VERSION=go1.21.5; \
RUN GO_VERSION=go1.22.2; \
curl -O -L "https://golang.org/dl/${GO_VERSION}.linux-amd64.tar.gz"; \
rm -rf /usr/local/go; \
tar -C /usr/local -xzf ${GO_VERSION}.linux-amd64.tar.gz;
Expand Down

0 comments on commit 4d3ccc9

Please sign in to comment.