Refactor Command Structs and create Earthly build
This commit is contained in:
parent
c20b917728
commit
ebd861cd7e
13 changed files with 789 additions and 612 deletions
41
Earthfile
Normal file
41
Earthfile
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
VERSION 0.7
|
||||
|
||||
FROM registry.fedoraproject.org/fedora-toolbox
|
||||
|
||||
ARG --global IMAGE
|
||||
|
||||
cosign:
|
||||
FROM gcr.io/projectsigstore/cosign
|
||||
|
||||
SAVE ARTIFACT /ko-app/cosign cosign
|
||||
|
||||
install:
|
||||
FROM rust
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
SAVE ARTIFACT target/release/ublue
|
||||
|
||||
build:
|
||||
BUILD +install
|
||||
|
||||
RUN dnf install --refresh -y podman buildah skopeo
|
||||
|
||||
COPY +cosign/cosign /usr/bin/cosign
|
||||
COPY +install/ublue /usr/bin/ublue
|
||||
|
||||
ARG TAG
|
||||
IF [ "$TAG" != "" ]
|
||||
SAVE IMAGE --push $CI_REGISTRY_IMAGE:$TAG
|
||||
|
||||
ARG LATEST=false
|
||||
|
||||
IF [ "$LATEST" = "true" ]
|
||||
SAVE IMAGE --push $CI_REGISTRY_IMAGE:latest
|
||||
END
|
||||
END
|
||||
|
||||
all:
|
||||
BUILD --platform=linux/amd64 +build
|
||||
Loading…
Add table
Add a link
Reference in a new issue