File tree Expand file tree Collapse file tree 3 files changed +66
-9
lines changed Expand file tree Collapse file tree 3 files changed +66
-9
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ kind : pipeline
3
+ name : linux-arm-docker
4
+
5
+ platform :
6
+ os : linux
7
+ arch : arm
8
+
9
+ - name : dryrun
10
+ pull : always
11
+ image : plugins/docker:linux-arm
12
+ settings :
13
+ dockerfile : Dockerfile.arm
14
+ dry_run : true
15
+ repo : stefanprodan/podinfo-arm
16
+ tags : linux-arm
17
+ username :
18
+ from_secret : DOCKER_USERNAME
19
+ password :
20
+ from_secret : DOCKER_PASSWORD
21
+ when :
22
+ event :
23
+ - push
24
+ - pull_request
Original file line number Diff line number Diff line change
1
+ FROM golang:1.11 as builder
2
+
3
+ RUN mkdir -p /go/src/github.com/stefanprodan/k8s-podinfo/
4
+
5
+ WORKDIR /go/src/github.com/stefanprodan/k8s-podinfo
6
+
7
+ COPY . .
8
+
9
+ RUN GIT_COMMIT=$(git rev-list -1 HEAD) && CGO_ENABLED=0 GOOS=linux \
10
+ go build -ldflags "-s -w -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
11
+ -a -installsuffix cgo -o podinfo ./cmd/podinfo
12
+
13
+ RUN GIT_COMMIT=$(git rev-list -1 HEAD) && CGO_ENABLED=0 GOOS=linux \
14
+ go build -ldflags "-s -w -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
15
+ -a -installsuffix cgo -o podcli ./cmd/podcli
16
+
17
+ FROM alpine:3.8
18
+
19
+ RUN addgroup -S app \
20
+ && adduser -S -g app app \
21
+ && apk --no-cache add \
22
+ curl openssl netcat-openbsd
23
+
24
+ WORKDIR /home/app
25
+
26
+ COPY --from=builder /go/src/github.com/stefanprodan/k8s-podinfo/podinfo .
27
+ COPY --from=builder /go/src/github.com/stefanprodan/k8s-podinfo/podcli /usr/local/bin/podcli
28
+ COPY ./ui ./ui
29
+ RUN chown -R app:app ./
30
+
31
+ USER app
32
+
33
+ CMD ["./podinfo"]
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ COPY . .
8
8
9
9
RUN go test $(go list ./... | grep -v integration | grep -v /vendor/ | grep -v /template/) -cover
10
10
11
- RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*" ) && \
12
- GIT_COMMIT=$(git rev-list -1 HEAD) && \
13
- CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
14
- -X github.com/stefanprodan/k8s- podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
15
- -a -installsuffix cgo -o podinfo ./cmd/podinfo
16
-
17
- RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
18
- -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
19
- -a -installsuffix cgo -o podcli ./cmd/podcli
11
+ RUN GIT_COMMIT=$(git rev-list -1 HEAD ) && \
12
+ CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
13
+ -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
14
+ -a -installsuffix cgo -o podinfo ./cmd/podinfo
15
+
16
+ RUN GIT_COMMIT=$(git rev-list -1 HEAD) && \
17
+ CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
18
+ -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
19
+ -a -installsuffix cgo -o podcli ./cmd/podcli
20
20
21
21
FROM alpine:3.8
22
22
You can’t perform that action at this time.
0 commit comments