Skip to content

Commit

Permalink
Fix framework-image
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
  • Loading branch information
jimmykarily committed Aug 8, 2023
1 parent 817f4ee commit 8205bb0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -323,20 +323,30 @@ framework:

SAVE ARTIFACT --keep-own /framework/ framework

build-framework-image:
# This target must stay "dummy" because it has to be "FROM scratch" thus it cannot
# call "cat" or "echo".
framework-image:
FROM scratch
ARG FLAVOR
ARG VERSION

COPY (+framework/framework --VERSION=$VERSION --FLAVOR=$FLAVOR) /

SAVE IMAGE --push $IMAGE_REPOSITORY_ORG/framework:${VERSION}_${FLAVOR}

build-framework-image:
FROM alpine
ARG FLAVOR

COPY +version/VERSION ./
ARG VERSION=$(cat VERSION)

COPY (+framework/framework --VERSION=$VERSION --FLAVOR=$FLAVOR) /
BUILD +framework-image --VERSION=$VERSION --FLAVOR=$FLAVOR

ARG _IMG="$IMAGE_REPOSITORY_ORG/framework:${VERSION}_${FLAVOR}"
RUN echo $_IMG > FRAMEWORK_IMAGE

SAVE ARTIFACT FRAMEWORK_IMAGE AS LOCAL build/FRAMEWORK_IMAGE
SAVE IMAGE --push $IMAGE_REPOSITORY_ORG/framework:${VERSION}_${FLAVOR}

base-image:
ARG MODEL
Expand Down

0 comments on commit 8205bb0

Please sign in to comment.