Skip to content

Commit

Permalink
Simplify the framework target
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Aug 8, 2023
1 parent 8205bb0 commit 5dbedd2
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -323,31 +323,24 @@ framework:

SAVE ARTIFACT --keep-own /framework/ framework

# 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)

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

FROM scratch

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

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

base-image:
ARG MODEL
ARG FLAVOR
Expand Down

0 comments on commit 5dbedd2

Please sign in to comment.