Skip to content

Commit 2852eb5

Browse files
authored
Merge pull request #138 from concourse/wolfi
Update image to support multi-arch image
2 parents b139c82 + a60ac87 commit 2852eb5

4 files changed

Lines changed: 46 additions & 376 deletions

File tree

Dockerfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
ARG base_image=concourse/resource-types-base-image-static:latest
1+
ARG base_image=cgr.dev/chainguard/wolfi-base
22
ARG builder_image=concourse/golang-builder
33

4-
FROM ${builder_image} AS builder
5-
COPY . $GOPATH/src/github.com/concourse/github-release-resource
4+
ARG BUILDPLATFORM
5+
FROM --platform=${BUILDPLATFORM} ${builder_image} AS builder
6+
7+
ARG TARGETOS
8+
ARG TARGETARCH
9+
ENV GOOS=$TARGETOS
10+
ENV GOARCH=$TARGETARCH
11+
12+
COPY . /src
13+
WORKDIR /src
614
ENV CGO_ENABLED=0
7-
WORKDIR $GOPATH/src/github.com/concourse/github-release-resource
8-
RUN go mod vendor
9-
RUN go build -o /assets/out github.com/concourse/github-release-resource/cmd/out
10-
RUN go build -o /assets/in github.com/concourse/github-release-resource/cmd/in
11-
RUN go build -o /assets/check github.com/concourse/github-release-resource/cmd/check
15+
RUN go mod download
16+
RUN go build -o /assets/out ./cmd/out
17+
RUN go build -o /assets/in ./cmd/in
18+
RUN go build -o /assets/check ./cmd/check
1219
RUN set -e; for pkg in $(go list ./...); do \
1320
go test -o "/tests/$(basename $pkg).test" -c $pkg; \
1421
done
1522

1623
FROM ${base_image} AS resource
17-
USER root
1824
COPY --from=builder /assets /opt/resource
1925

2026
FROM resource AS tests

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ will stop the build.
210210
Run the tests with the following command:
211211

212212
```sh
213-
docker build -t github-release-resource --target tests --build-arg base_image=concourse/resource-types-base-image-static:latest .
213+
docker build -t github-release-resource --target tests .
214214
```
215215

216216
### Contributing

go.mod

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,26 @@ require (
1212
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
1313
github.com/onsi/ginkgo/v2 v2.23.0
1414
github.com/onsi/gomega v1.36.2
15-
github.com/shurcooL/githubv4 v0.0.0-20210922025249-6831e00d857f
16-
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
15+
github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7
16+
golang.org/x/oauth2 v0.30.0
1717
)
1818

1919
require (
2020
github.com/go-logr/logr v1.4.2 // indirect
2121
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
22-
github.com/golang/protobuf v1.5.2 // indirect
2322
github.com/google/go-cmp v0.6.0 // indirect
2423
github.com/google/go-querystring v1.1.0 // indirect
2524
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
2625
github.com/kr/pretty v0.2.1 // indirect
2726
github.com/nxadm/tail v1.4.5 // indirect
2827
github.com/onsi/ginkgo v1.14.2 // indirect
29-
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect
30-
golang.org/x/mod v0.23.0 // indirect
31-
golang.org/x/net v0.38.0 // indirect
32-
golang.org/x/sync v0.12.0 // indirect
33-
golang.org/x/sys v0.31.0 // indirect
34-
golang.org/x/text v0.23.0 // indirect
35-
golang.org/x/tools v0.30.0 // indirect
36-
google.golang.org/appengine v1.6.7 // indirect
37-
google.golang.org/protobuf v1.36.1 // indirect
28+
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
29+
golang.org/x/mod v0.24.0 // indirect
30+
golang.org/x/net v0.40.0 // indirect
31+
golang.org/x/sync v0.14.0 // indirect
32+
golang.org/x/sys v0.33.0 // indirect
33+
golang.org/x/text v0.25.0 // indirect
34+
golang.org/x/tools v0.33.0 // indirect
35+
google.golang.org/protobuf v1.36.6 // indirect
3836
gopkg.in/yaml.v3 v3.0.1 // indirect
3937
)

0 commit comments

Comments
 (0)