Update alpine base.
All checks were successful
rust-test Build rust-test has succeeded
clippy Build clippy has succeeded
format Build format has succeeded

This commit is contained in:
Tom Alexander 2024-09-29 21:15:29 -04:00
parent 0b890f7747
commit d1d48a3a88
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 6 additions and 38 deletions

View File

@ -21,38 +21,6 @@ spec:
description: The path to the Dockerfile
type: string
tasks:
- name: detect-tag
taskSpec:
metadata: {}
stepTemplate:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 600Mi
workingDir: "$(workspaces.repo.path)"
results:
- name: tag
description: The tag to use for the docker container.
steps:
- image: alpine/git:v2.34.2
name: detect-tag-step
script: |
#!/usr/bin/env sh
set -euo pipefail
git fetch --tags
current_tag=$(git tag --points-at HEAD --list 'v*.*.*')
if [ -z "$current_tag" ]; then
echo "No tag at current commit"
exit 1
else
echo -n "${current_tag}" | tee $(results.tag.path)
fi
workspaces:
- name: repo
workspace: git-source
runAfter:
- fetch-repository
- name: report-pending
taskRef:
resolver: git
@ -112,7 +80,7 @@ spec:
value: task/kaniko/0.6//kaniko.yaml
params:
- name: IMAGE
value: "$(params.image-name):$(tasks.detect-tag.results.tag)"
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
- name: CONTEXT
value: $(params.path-to-image-context)
- name: DOCKERFILE
@ -136,7 +104,7 @@ spec:
- name: dockerconfig
workspace: docker-credentials
runAfter:
- detect-tag
- fetch-repository
finally:
- name: report-success
when:

View File

@ -20,6 +20,6 @@ version = "0.0.1"
[[push]]
name = "build"
source = "pipeline-build.yaml"
source = "pipeline-build-hash.yaml"
clone_uri = "git@code.fizz.buzz:talexander/poudboot.git"
branches = [ "^main$", "^master$" ]

View File

@ -1,4 +1,4 @@
FROM rustlang/rust:nightly-alpine3.19 AS builder
FROM rustlang/rust:nightly-alpine3.20 AS builder
RUN apk add --no-cache musl-dev
@ -8,6 +8,6 @@ COPY . .
# TODO: Add static build, which currently errors due to proc_macro. RUSTFLAGS="-C target-feature=+crt-static"
RUN CARGO_TARGET_DIR=/target cargo build --profile release-lto
FROM alpine:3.19 AS runner
FROM alpine:3.20 AS runner
COPY --from=builder /target/release-lto/poudboot /usr/bin/

View File

@ -1,4 +1,4 @@
FROM rustlang/rust:nightly-alpine3.19 AS builder
FROM rustlang/rust:nightly-alpine3.20 AS builder
RUN apk add --no-cache musl-dev
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache