mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
52 lines
1.3 KiB
Plaintext
52 lines
1.3 KiB
Plaintext
VERSION 0.8
|
|
|
|
IMPORT github.com/formancehq/earthly:tags/v0.15.0 AS core
|
|
IMPORT ../../../.. AS stack
|
|
IMPORT ../../.. AS components
|
|
|
|
FROM core+base-image
|
|
|
|
sources:
|
|
FROM core+builder-image
|
|
WORKDIR /src
|
|
WORKDIR /src/components/operator/tools/utils
|
|
COPY --dir cmd .
|
|
COPY go.* main.go .
|
|
SAVE ARTIFACT /src
|
|
|
|
compile:
|
|
FROM core+builder-image
|
|
COPY (+sources/*) /src
|
|
WORKDIR /src/components/operator/tools/utils
|
|
DO --pass-args core+GO_COMPILE
|
|
|
|
build-image:
|
|
FROM core+final-image
|
|
ENTRYPOINT ["/usr/bin/operator-utils"]
|
|
COPY --pass-args (+compile/main) /usr/bin/operator-utils
|
|
ARG REPOSITORY=ghcr.io
|
|
ARG tag=latest
|
|
DO --pass-args core+SAVE_IMAGE --COMPONENT=operator-utils --TAG=$tag
|
|
|
|
lint:
|
|
FROM core+builder-image
|
|
COPY (+sources/*) /src
|
|
COPY --pass-args +tidy/go.* .
|
|
WORKDIR /src/components/operator/tools/utils
|
|
DO --pass-args stack+GO_LINT
|
|
SAVE ARTIFACT cmd AS LOCAL cmd
|
|
|
|
pre-commit:
|
|
WAIT
|
|
BUILD --pass-args +tidy
|
|
END
|
|
BUILD --pass-args +lint
|
|
|
|
tidy:
|
|
FROM core+builder-image
|
|
COPY --pass-args (+sources/src) /src
|
|
WORKDIR /src/components/operator/tools/utils
|
|
DO --pass-args stack+GO_TIDY
|
|
|
|
release:
|
|
BUILD --pass-args stack+goreleaser --path=components/operator/tools/utils |