diff --git a/.webhook_bridge/pipeline-build.yaml b/.webhook_bridge/pipeline-build-hash.yaml similarity index 85% rename from .webhook_bridge/pipeline-build.yaml rename to .webhook_bridge/pipeline-build-hash.yaml index f998ecb..2616417 100644 --- a/.webhook_bridge/pipeline-build.yaml +++ b/.webhook_bridge/pipeline-build-hash.yaml @@ -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: diff --git a/.webhook_bridge/webhook_bridge.toml b/.webhook_bridge/webhook_bridge.toml index 90f6bfd..9d92e99 100644 --- a/.webhook_bridge/webhook_bridge.toml +++ b/.webhook_bridge/webhook_bridge.toml @@ -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$" ] diff --git a/docker/poudboot/Dockerfile b/docker/poudboot/Dockerfile index 3c9c682..f5c2462 100644 --- a/docker/poudboot/Dockerfile +++ b/docker/poudboot/Dockerfile @@ -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/ diff --git a/docker/poudboot_development/Dockerfile b/docker/poudboot_development/Dockerfile index 41b1da5..da54256 100644 --- a/docker/poudboot_development/Dockerfile +++ b/docker/poudboot_development/Dockerfile @@ -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