From f38533cd7a3fb931edac3a95c8b0c0e0b979861c Mon Sep 17 00:00:00 2001 From: chapeau Date: Sun, 22 Oct 2023 22:13:14 +0200 Subject: [PATCH] Use goproxy --- .woodpecker/deploy.yml | 4 ++++ .woodpecker/test.yml | 5 +++++ Dockerfile | 1 + 3 files changed, 10 insertions(+) diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index 36f5034..514316d 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -9,6 +9,8 @@ steps: platforms: - linux/amd64 # - linux/arm64 + environment: + - GOPROXY=http://goproxy.home:3000,direct when: - event: pull_request - event: push @@ -29,6 +31,8 @@ steps: platforms: - linux/amd64 # - linux/arm64 + environment: + - GOPROXY=http://goproxy.home:3000,direct when: - event: push branch: main diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index be910ab..5b490ba 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -2,12 +2,17 @@ steps: go-test: image: golang commands: + - echo $GOPROXY - make -C polyculeconnect test + environment: + - GOPROXY=http://goproxy.home:3000 go-build: image: golang commands: - make -C polyculeconnect build + environment: + - GOPROXY=http://goproxy.home:3000 when: event: [push, tag] diff --git a/Dockerfile b/Dockerfile index cb9aa2a..fea0762 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM --platform=$TARGETPLATFORM golang:1.20 AS builder ARG TARGETPLATFORM ARG BUILDPLATFORM WORKDIR /go/src/git.faercol.me/polyculeconnect +ENV GOPROXY=http://goproxy.home:3000 COPY polyculeconnect ./ RUN make build