|
2 | 2 |
|
3 | 3 | # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
|
4 | 4 | #
|
5 |
| -# Generated on 2021-05-20T11:44:59Z by kres 2cb907a-dirty. |
| 5 | +# Generated on 2021-05-21T14:46:38Z by kres c09e0bc-dirty. |
6 | 6 |
|
7 | 7 | ARG JS_TOOLCHAIN
|
8 | 8 | ARG TOOLCHAIN
|
|
24 | 24 |
|
25 | 25 | WORKDIR /src
|
26 | 26 | COPY .markdownlint.json .
|
| 27 | +COPY ./CHANGELOG.md ./CHANGELOG.md |
27 | 28 | COPY ./README.md ./README.md
|
28 |
| -RUN markdownlint --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules /node_modules/sentences-per-line/index.js . |
| 29 | +RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules /node_modules/sentences-per-line/index.js . |
29 | 30 |
|
30 | 31 | # collects proto specs
|
31 | 32 | FROM scratch AS proto-specs
|
@@ -175,20 +176,68 @@ FROM base AS unit-tests-run
|
175 | 176 | ARG TESTPKGS
|
176 | 177 | RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg --mount=type=cache,target=/tmp go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 ${TESTPKGS}
|
177 | 178 |
|
178 |
| -# builds theila |
179 |
| -FROM base AS theila-build |
| 179 | +# builds theila-darwin-amd64 |
| 180 | +FROM base AS theila-darwin-amd64-build |
180 | 181 | COPY --from=generate / /
|
181 | 182 | WORKDIR /src/cmd/theila
|
182 |
| -RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go build -ldflags "-s -w" -o /theila |
| 183 | +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o /theila-darwin-amd64 |
| 184 | + |
| 185 | +# builds theila-darwin-arm64 |
| 186 | +FROM base AS theila-darwin-arm64-build |
| 187 | +COPY --from=generate / / |
| 188 | +WORKDIR /src/cmd/theila |
| 189 | +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=arm64 GOOS=darwin go build -ldflags "-s -w" -o /theila-darwin-arm64 |
| 190 | + |
| 191 | +# builds theila-linux-amd64 |
| 192 | +FROM base AS theila-linux-amd64-build |
| 193 | +COPY --from=generate / / |
| 194 | +WORKDIR /src/cmd/theila |
| 195 | +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o /theila-linux-amd64 |
| 196 | + |
| 197 | +# builds theila-linux-arm64 |
| 198 | +FROM base AS theila-linux-arm64-build |
| 199 | +COPY --from=generate / / |
| 200 | +WORKDIR /src/cmd/theila |
| 201 | +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o /theila-linux-arm64 |
| 202 | + |
| 203 | +# builds theila-linux-armv7 |
| 204 | +FROM base AS theila-linux-armv7-build |
| 205 | +COPY --from=generate / / |
| 206 | +WORKDIR /src/cmd/theila |
| 207 | +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=linux GOARCH=arm GOARM=7 go build -ldflags "-s -w" -o /theila-linux-armv7 |
| 208 | + |
| 209 | +# builds theila-windows-amd64.exe |
| 210 | +FROM base AS theila-windows-amd64.exe-build |
| 211 | +COPY --from=generate / / |
| 212 | +WORKDIR /src/cmd/theila |
| 213 | +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o /theila-windows-amd64.exe |
183 | 214 |
|
184 | 215 | FROM scratch AS unit-tests
|
185 | 216 | COPY --from=unit-tests-run /src/coverage.txt /coverage.txt
|
186 | 217 |
|
187 |
| -FROM scratch AS theila |
188 |
| -COPY --from=theila-build /theila /theila |
| 218 | +FROM scratch AS theila-darwin-amd64 |
| 219 | +COPY --from=theila-darwin-amd64-build /theila-darwin-amd64 /theila-darwin-amd64 |
| 220 | + |
| 221 | +FROM scratch AS theila-darwin-arm64 |
| 222 | +COPY --from=theila-darwin-arm64-build /theila-darwin-arm64 /theila-darwin-arm64 |
| 223 | + |
| 224 | +FROM scratch AS theila-linux-amd64 |
| 225 | +COPY --from=theila-linux-amd64-build /theila-linux-amd64 /theila-linux-amd64 |
| 226 | + |
| 227 | +FROM scratch AS theila-linux-arm64 |
| 228 | +COPY --from=theila-linux-arm64-build /theila-linux-arm64 /theila-linux-arm64 |
| 229 | + |
| 230 | +FROM scratch AS theila-linux-armv7 |
| 231 | +COPY --from=theila-linux-armv7-build /theila-linux-armv7 /theila-linux-armv7 |
| 232 | + |
| 233 | +FROM scratch AS theila-windows-amd64.exe |
| 234 | +COPY --from=theila-windows-amd64.exe-build /theila-windows-amd64.exe /theila-windows-amd64.exe |
| 235 | + |
| 236 | +FROM theila-linux-${TARGETARCH} AS theila |
189 | 237 |
|
190 | 238 | FROM scratch AS image-theila
|
191 |
| -COPY --from=theila / / |
| 239 | +ARG TARGETARCH |
| 240 | +COPY --from=theila theila-linux-${TARGETARCH} /theila |
192 | 241 | COPY --from=image-fhs / /
|
193 | 242 | COPY --from=image-ca-certificates / /
|
194 | 243 | LABEL org.opencontainers.image.source https://github.com/talos-systems/theila
|
|
0 commit comments