Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Alexander
e7eeeefa53
Add back in docker targets.
All checks were successful
semver Build semver has succeeded
format Build format has succeeded
build Build build has succeeded
clippy Build clippy has succeeded
rust-test Build rust-test has succeeded
2024-10-20 23:12:52 -04:00
Tom Alexander
a17f6502c0
Use linked copy. 2024-10-20 23:03:40 -04:00
5 changed files with 10 additions and 2 deletions

View File

@ -146,6 +146,8 @@ spec:
value: $(params.path-to-dockerfile) value: $(params.path-to-dockerfile)
- name: EXTRA_ARGS - name: EXTRA_ARGS
value: value:
- "--opt"
- "target=$(params.target-name)"
- --import-cache - --import-cache
- "type=registry,ref=$(params.image-name):buildcache" - "type=registry,ref=$(params.image-name):buildcache"
- --export-cache - --export-cache

View File

@ -114,6 +114,8 @@ spec:
value: $(params.path-to-dockerfile) value: $(params.path-to-dockerfile)
- name: EXTRA_ARGS - name: EXTRA_ARGS
value: value:
- "--opt"
- "target=$(params.target-name)"
- --import-cache - --import-cache
- "type=registry,ref=$(params.image-name):buildcache" - "type=registry,ref=$(params.image-name):buildcache"
- --export-cache - --export-cache

View File

@ -114,6 +114,8 @@ spec:
value: $(params.path-to-dockerfile) value: $(params.path-to-dockerfile)
- name: EXTRA_ARGS - name: EXTRA_ARGS
value: value:
- "--opt"
- "target=$(params.target-name)"
- --import-cache - --import-cache
- "type=registry,ref=$(params.image-name):buildcache" - "type=registry,ref=$(params.image-name):buildcache"
- --export-cache - --export-cache

View File

@ -114,6 +114,8 @@ spec:
value: $(params.path-to-dockerfile) value: $(params.path-to-dockerfile)
- name: EXTRA_ARGS - name: EXTRA_ARGS
value: value:
- "--opt"
- "target=$(params.target-name)"
- --import-cache - --import-cache
- "type=registry,ref=$(params.image-name):buildcache" - "type=registry,ref=$(params.image-name):buildcache"
- --export-cache - --export-cache

View File

@ -7,12 +7,12 @@ RUN apk add --no-cache musl-dev pkgconfig libressl-dev
RUN mkdir /source RUN mkdir /source
WORKDIR /source WORKDIR /source
COPY . . COPY --link . .
# TODO: Add static build, which currently errors due to proc_macro. RUSTFLAGS="-C target-feature=+crt-static" # TODO: Add static build, which currently errors due to proc_macro. RUSTFLAGS="-C target-feature=+crt-static"
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked CARGO_TARGET_DIR=/target cargo build --profile release-lto --bin webhook_bridge RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked CARGO_TARGET_DIR=/target cargo build --profile release-lto --bin webhook_bridge
FROM alpine:$ALPINE_VERSION AS runner FROM alpine:$ALPINE_VERSION AS runner
COPY --from=builder /target/release-lto/webhook_bridge /usr/bin/ COPY --link --from=builder /target/release-lto/webhook_bridge /usr/bin/
ENTRYPOINT ["/usr/bin/webhook_bridge"] ENTRYPOINT ["/usr/bin/webhook_bridge"]