Compare commits
No commits in common. "6f5e21f9f070e1f1bdbd415064929f55447ed965" and "cdbbde0a185a3f79a8fd6cea4fa02f3dbe9c1737" have entirely different histories.
6f5e21f9f0
...
cdbbde0a18
@ -69,31 +69,6 @@ spec:
|
|||||||
value: $(params.PULL_BASE_SHA)
|
value: $(params.PULL_BASE_SHA)
|
||||||
- name: deleteExisting
|
- name: deleteExisting
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: get-git-commit-time
|
|
||||||
taskSpec:
|
|
||||||
metadata: {}
|
|
||||||
stepTemplate:
|
|
||||||
image: alpine:3.20
|
|
||||||
computeResources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 600Mi
|
|
||||||
workingDir: "$(workspaces.repo.path)"
|
|
||||||
results:
|
|
||||||
- name: unix-time
|
|
||||||
description: The time of the git commit in unix timestamp format.
|
|
||||||
steps:
|
|
||||||
- image: alpine/git:v2.34.2
|
|
||||||
name: detect-tag-step
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
set -euo pipefail
|
|
||||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
|
||||||
workspaces:
|
|
||||||
- name: repo
|
|
||||||
workspace: git-source
|
|
||||||
runAfter:
|
|
||||||
- fetch-repository
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
taskRef:
|
taskRef:
|
||||||
resolver: git
|
resolver: git
|
||||||
@ -112,7 +87,7 @@ spec:
|
|||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: BUILDER_IMAGE
|
- name: BUILDER_IMAGE
|
||||||
value: "gcr.io/kaniko-project/executor:v1.23.2"
|
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--destination=$(params.image-name)" # Also write the :latest image
|
- "--destination=$(params.image-name)" # Also write the :latest image
|
||||||
@ -214,4 +189,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: .
|
value: .
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/poudboot/
|
value: docker/poudboot/Dockerfile
|
||||||
|
@ -69,31 +69,6 @@ spec:
|
|||||||
value: $(params.PULL_BASE_SHA)
|
value: $(params.PULL_BASE_SHA)
|
||||||
- name: deleteExisting
|
- name: deleteExisting
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: get-git-commit-time
|
|
||||||
taskSpec:
|
|
||||||
metadata: {}
|
|
||||||
stepTemplate:
|
|
||||||
image: alpine:3.20
|
|
||||||
computeResources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 600Mi
|
|
||||||
workingDir: "$(workspaces.repo.path)"
|
|
||||||
results:
|
|
||||||
- name: unix-time
|
|
||||||
description: The time of the git commit in unix timestamp format.
|
|
||||||
steps:
|
|
||||||
- image: alpine/git:v2.34.2
|
|
||||||
name: detect-tag-step
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
set -euo pipefail
|
|
||||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
|
||||||
workspaces:
|
|
||||||
- name: repo
|
|
||||||
workspace: git-source
|
|
||||||
runAfter:
|
|
||||||
- fetch-repository
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
taskRef:
|
taskRef:
|
||||||
resolver: git
|
resolver: git
|
||||||
@ -112,7 +87,7 @@ spec:
|
|||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: BUILDER_IMAGE
|
- name: BUILDER_IMAGE
|
||||||
value: "gcr.io/kaniko-project/executor:v1.23.2"
|
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--target=$(params.target-name)"
|
- "--target=$(params.target-name)"
|
||||||
@ -168,7 +143,7 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
- name: commit-changes
|
- name: commit-changes
|
||||||
taskRef:
|
taskRef:
|
||||||
resolver: git
|
resolver: git
|
||||||
@ -293,7 +268,7 @@ spec:
|
|||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
@ -323,4 +298,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: docker/poudboot_development/
|
value: docker/poudboot_development/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/poudboot_development/
|
value: docker/poudboot_development/Dockerfile
|
||||||
|
@ -69,31 +69,6 @@ spec:
|
|||||||
value: $(params.PULL_BASE_SHA)
|
value: $(params.PULL_BASE_SHA)
|
||||||
- name: deleteExisting
|
- name: deleteExisting
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: get-git-commit-time
|
|
||||||
taskSpec:
|
|
||||||
metadata: {}
|
|
||||||
stepTemplate:
|
|
||||||
image: alpine:3.20
|
|
||||||
computeResources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 600Mi
|
|
||||||
workingDir: "$(workspaces.repo.path)"
|
|
||||||
results:
|
|
||||||
- name: unix-time
|
|
||||||
description: The time of the git commit in unix timestamp format.
|
|
||||||
steps:
|
|
||||||
- image: alpine/git:v2.34.2
|
|
||||||
name: detect-tag-step
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
set -euo pipefail
|
|
||||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
|
||||||
workspaces:
|
|
||||||
- name: repo
|
|
||||||
workspace: git-source
|
|
||||||
runAfter:
|
|
||||||
- fetch-repository
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
taskRef:
|
taskRef:
|
||||||
resolver: git
|
resolver: git
|
||||||
@ -112,7 +87,7 @@ spec:
|
|||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: BUILDER_IMAGE
|
- name: BUILDER_IMAGE
|
||||||
value: "gcr.io/kaniko-project/executor:v1.23.2"
|
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--target=$(params.target-name)"
|
- "--target=$(params.target-name)"
|
||||||
@ -178,7 +153,7 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
finally:
|
finally:
|
||||||
- name: report-success
|
- name: report-success
|
||||||
when:
|
when:
|
||||||
@ -272,7 +247,7 @@ spec:
|
|||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
@ -302,4 +277,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: docker/poudboot_development/
|
value: docker/poudboot_development/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/poudboot_development/
|
value: docker/poudboot_development/Dockerfile
|
||||||
|
@ -69,31 +69,6 @@ spec:
|
|||||||
value: $(params.PULL_BASE_SHA)
|
value: $(params.PULL_BASE_SHA)
|
||||||
- name: deleteExisting
|
- name: deleteExisting
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: get-git-commit-time
|
|
||||||
taskSpec:
|
|
||||||
metadata: {}
|
|
||||||
stepTemplate:
|
|
||||||
image: alpine:3.20
|
|
||||||
computeResources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 600Mi
|
|
||||||
workingDir: "$(workspaces.repo.path)"
|
|
||||||
results:
|
|
||||||
- name: unix-time
|
|
||||||
description: The time of the git commit in unix timestamp format.
|
|
||||||
steps:
|
|
||||||
- image: alpine/git:v2.34.2
|
|
||||||
name: detect-tag-step
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
set -euo pipefail
|
|
||||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
|
||||||
workspaces:
|
|
||||||
- name: repo
|
|
||||||
workspace: git-source
|
|
||||||
runAfter:
|
|
||||||
- fetch-repository
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
taskRef:
|
taskRef:
|
||||||
resolver: git
|
resolver: git
|
||||||
@ -112,7 +87,7 @@ spec:
|
|||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: BUILDER_IMAGE
|
- name: BUILDER_IMAGE
|
||||||
value: "gcr.io/kaniko-project/executor:v1.23.2"
|
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--target=$(params.target-name)"
|
- "--target=$(params.target-name)"
|
||||||
@ -168,7 +143,7 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
finally:
|
finally:
|
||||||
- name: report-success
|
- name: report-success
|
||||||
when:
|
when:
|
||||||
@ -262,7 +237,7 @@ spec:
|
|||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
@ -292,4 +267,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: docker/poudboot_development/
|
value: docker/poudboot_development/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/poudboot_development/
|
value: docker/poudboot_development/Dockerfile
|
||||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -94,7 +94,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "poudboot"
|
name = "poudboot"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
]
|
]
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
# syntax=docker/dockerfile:1
|
FROM rustlang/rust:nightly-alpine3.20 AS builder
|
||||||
ARG ALPINE_VERSION="3.20"
|
|
||||||
|
|
||||||
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION AS builder
|
|
||||||
|
|
||||||
RUN apk add --no-cache musl-dev
|
RUN apk add --no-cache musl-dev
|
||||||
|
|
||||||
RUN mkdir /root/poudboot
|
RUN mkdir /root/poudboot
|
||||||
WORKDIR /root/poudboot
|
WORKDIR /root/poudboot
|
||||||
COPY --link . .
|
COPY . .
|
||||||
# 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
|
RUN CARGO_TARGET_DIR=/target cargo build --profile release-lto
|
||||||
|
|
||||||
FROM alpine:$ALPINE_VERSION AS runner
|
FROM alpine:3.20 AS runner
|
||||||
|
|
||||||
COPY --link --from=builder /target/release-lto/poudboot /usr/bin/
|
COPY --from=builder /target/release-lto/poudboot /usr/bin/
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
# syntax=docker/dockerfile:1
|
FROM rustlang/rust:nightly-alpine3.20 AS builder
|
||||||
ARG ALPINE_VERSION="3.20"
|
|
||||||
|
|
||||||
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION AS builder
|
|
||||||
|
|
||||||
RUN apk add --no-cache musl-dev
|
RUN apk add --no-cache musl-dev
|
||||||
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||||
RUN rustup component add rustfmt
|
RUN rustup component add rustfmt
|
||||||
RUN rustup component add clippy
|
RUN rustup component add clippy
|
||||||
|
Loading…
Reference in New Issue
Block a user