Skip to content

Commit

Permalink
Merge pull request #52 from wallarm/pipeline/fix-1663082704
Browse files Browse the repository at this point in the history
pipeline: Fix build issues after go upgrade
  • Loading branch information
Andrey MrEcco Burindin authored Sep 13, 2022
2 parents 6cc9cd7 + eb01a29 commit 8aa2fc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
go build \
-ldflags="-X main.build=${{ env.X_TAG }} -extldflags=-static -s -w" \
-o /tmp/api-firewall-${{ matrix.artifact }}/api-firewall \
./cmd/api-firewall && \
-buildvcs=false ./cmd/api-firewall && \
/tmp/api-firewall-${{ matrix.artifact }}/api-firewall -v && \
readelf -h /tmp/api-firewall-${{ matrix.artifact }}/api-firewall && \
cp LICENSE /tmp/api-firewall-${{ matrix.artifact }}/ && \
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
go build \
-ldflags="-X main.build=${{ env.X_TAG }} -extldflags=-static -s -w" \
-o /tmp/api-firewall-${{ matrix.artifact }}/api-firewall \
./cmd/api-firewall && \
-buildvcs=false ./cmd/api-firewall && \
/tmp/api-firewall-${{ matrix.artifact }}/api-firewall -v && \
readelf -h /tmp/api-firewall-${{ matrix.artifact }}/api-firewall && \
cp LICENSE /tmp/api-firewall-${{ matrix.artifact }}/ && \
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
needs:
- draft-release
env:
X_GO_VERSION: "1.19.1-r0"
X_GO_VERSION: "1.18.6-r0"
strategy:
matrix:
include:
Expand Down Expand Up @@ -340,7 +340,7 @@ jobs:
go build \
-ldflags="-X main.build=${{ env.X_TAG }} -extldflags=-static -s -w" \
-o /tmp/api-firewall-${{ matrix.artifact }}/api-firewall \
./cmd/api-firewall && \
-buildvcs=false ./cmd/api-firewall && \
/tmp/api-firewall-${{ matrix.artifact }}/api-firewall -v && \
readelf -h /tmp/api-firewall-${{ matrix.artifact }}/api-firewall && \
cp LICENSE /tmp/api-firewall-${{ matrix.artifact }}/ && \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
FROM golang:1.19-alpine3.16 AS build
FROM golang:1.18-alpine3.16 AS build

ARG APIFIREWALL_VERSION
ENV APIFIREWALL_VERSION=${APIFIREWALL_VERSION}

RUN apk add --no-cache \
git \
gcc \
make
git \
make \
musl-dev

WORKDIR /build
COPY . .

RUN go mod download -x && \
go build \
-ldflags="-X main.build=${APIFIREWALL_VERSION} -s -w" \
-buildvcs=false \
-o ./api-firewall \
./cmd/api-firewall

Expand Down

0 comments on commit 8aa2fc4

Please sign in to comment.