-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
71 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,68 @@ | ||
VERSION 0.8 | ||
|
||
ARG --global ALL_BUILD_TARGETS="cli viewer" | ||
ARG --global ALL_BUILD_TARGETS="devkit viewer" | ||
ARG --global DOCKER_IMAGE_PREFIX="yaci" | ||
ARG --global TAG="0.0.1-preview" | ||
ARG --global tag="dev" | ||
|
||
build: | ||
LOCALLY | ||
FOR image_target IN $ALL_BUILD_TARGETS | ||
BUILD +$image_target | ||
END | ||
BUILD +zip | ||
|
||
build-all-platforms: | ||
LOCALLY | ||
FOR image_target IN $ALL_BUILD_TARGETS | ||
BUILD --platform=linux/amd64 --platform=linux/arm64 +$image_target | ||
END | ||
BUILD +zip | ||
|
||
cli: | ||
devkit: | ||
ARG EARTHLY_TARGET_NAME | ||
ARG EARTHLY_GIT_SHORT_HASH | ||
FROM DOCKERFILE --build-arg APP_VERSION=${TAG} --build-arg COMMIT_ID=${EARTHLY_GIT_SHORT_HASH} applications/${EARTHLY_TARGET_NAME}/. | ||
SAVE IMAGE bloxbean/${DOCKER_IMAGE_PREFIX}-devkit:${TAG} | ||
FROM DOCKERFILE --build-arg APP_VERSION=${tag} --build-arg COMMIT_ID=${EARTHLY_GIT_SHORT_HASH} applications/cli/. | ||
SAVE IMAGE ${DOCKER_IMAGE_PREFIX}-${EARTHLY_TARGET_NAME}:${tag} | ||
|
||
viewer: | ||
ARG EARTHLY_TARGET_NAME | ||
FROM DOCKERFILE applications/${EARTHLY_TARGET_NAME}/. | ||
SAVE IMAGE bloxbean/${DOCKER_IMAGE_PREFIX}-${EARTHLY_TARGET_NAME}:${TAG} | ||
SAVE IMAGE ${DOCKER_IMAGE_PREFIX}-${EARTHLY_TARGET_NAME}:${tag} | ||
zip: | ||
LOCALLY | ||
RUN rm -rf build | ||
FROM alpine:3.19.1 | ||
WORKDIR /app | ||
ARG EARTHLY_TARGET_NAME | ||
ARG EARTHLY_GIT_SHORT_HASH | ||
RUN apk add --no-cache zip | ||
RUN mkdir -p /app/yaci-devkit-${tag} | ||
RUN echo > /app/yaci-devkit-${tag}/version | ||
RUN echo "tag=${tag}" >> /app/yaci-devkit-${tag}/version | ||
RUN echo "revision=${EARTHLY_GIT_SHORT_HASH}" >> /app/yaci-devkit-${tag}/version | ||
COPY docker-compose.yml \ | ||
env \ | ||
ssh.sh \ | ||
start.sh \ | ||
stop.sh \ | ||
yaci-cli.sh \ | ||
cardano-cli.sh \ | ||
info.sh \ | ||
LICENSE \ | ||
README.md \ | ||
/app/yaci-devkit-${tag}/ | ||
|
||
RUN cd /app && zip -r yaci-devkit-${tag}.zip . | ||
SAVE ARTIFACT yaci-devkit-${tag}.zip AS LOCAL build/yaci-devkit-${tag}.zip | ||
|
||
docker-publish: | ||
WAIT | ||
BUILD +build-all-platforms | ||
END | ||
LOCALLY | ||
LET IMAGE_NAME = "" | ||
FOR image_target IN $ALL_BUILD_TARGETS | ||
SET IMAGE_NAME = ${DOCKER_IMAGE_PREFIX}-${image_target} | ||
RUN docker tag ${IMAGE_NAME}:${tag} bloxbean/${IMAGE_NAME}:${tag} | ||
RUN docker push bloxbean/${IMAGE_NAME}:${tag} | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ then | |
CMD="docker compose" | ||
fi | ||
|
||
$CMD --env-file env kill | ||
$CMD --env-file env --env-file version kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tag=0.0.1-preview | ||
revision= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters