File tree 10 files changed +27
-62
lines changed
10 files changed +27
-62
lines changed Original file line number Diff line number Diff line change 10
10
jobs :
11
11
buildAndPush :
12
12
runs-on : ubuntu-22.04
13
- strategy :
14
- matrix :
15
- platform : ["linux/amd64", "linux/arm64"]
16
13
steps :
17
14
- uses : earthly/actions-setup@v1
18
15
with :
35
32
echo "TAG=${TAG}" >> $GITHUB_ENV
36
33
- name : Run build
37
34
run : earthly +build --tag ${{ env.TAG }} --build_type=native-ci
38
- # - name: Build native image
39
- # run: ./gradlew --no-daemon -i -Pversion=${{ env.TAG }} clean build nativeCompile
40
- # working-directory: ./applications/cli
Original file line number Diff line number Diff line change 8
8
jobs :
9
9
buildAndPush :
10
10
runs-on : self-hosted
11
- # strategy:
12
- # matrix:
13
- # platform: ["linux/amd64", "linux/arm64"]
14
11
env :
15
12
DOCKERHUB_USERNAME : ${{ secrets.DEV_DOCKERHUB_USERNAME }}
16
13
DOCKERHUB_TOKEN : ${{ secrets.DEV_DOCKERHUB_TOKEN }}
Original file line number Diff line number Diff line change 55
55
RUN cd /app && zip -r yaci-devkit-${tag }.zip .
56
56
SAVE ARTIFACT yaci-devkit-${tag}.zip AS LOCAL build/yaci-devkit-${tag }.zip
57
57
58
- cli-zip :
59
- LOCALLY
60
- ARG EARTHLY_TARGET_NAME
61
- ARG EARTHLY_GIT_SHORT_HASH
62
- ARG TARGETOS
63
- ARG TARGETARCH
64
- BUILD ./applications/cli+zip --APP_VERSION = ${tag } --COMMIT_ID = ${EARTHLY_GIT_SHORT_HASH }
65
-
66
58
test-nodes-setup :
67
59
LOCALLY
68
60
RUN cd build/ && unzip yaci-devkit-${tag }.zip
Original file line number Diff line number Diff line change 1
1
VERSION 0.8
2
2
3
- cli-jar :
3
+ cli-java :
4
4
ARG EARTHLY_TARGET_NAME
5
5
ARG EARTHLY_GIT_SHORT_HASH
6
6
ARG APP_VERSION
@@ -103,9 +103,12 @@ docker-build:
103
103
ELSE IF [ "$BUILD_TYPE" = "native-ci" ]
104
104
COPY (+cli-native-ci/yaci-cli* --APP_VERSION = ${APP_VERSION }) /app/
105
105
ELSE
106
- COPY (+cli-jar /yaci-cli.jar --APP_VERSION = ${APP_VERSION }) /app/yaci-cli.jar
106
+ COPY (+cli-java /yaci-cli.jar --APP_VERSION = ${APP_VERSION }) /app/yaci-cli.jar
107
107
END
108
108
109
+ COPY docker/yaci-cli.sh /app/
110
+ RUN chmod +x /app/yaci-cli.sh
111
+
109
112
RUN mkdir -p /app/config
110
113
COPY docker/application.properties /app/config/
111
114
@@ -121,25 +124,6 @@ docker-build:
121
124
EXPOSE 1337
122
125
EXPOSE 1442
123
126
124
- IF [ "$BUILD_TYPE" = "native" ]
125
- ENTRYPOINT ["/app/yaci-cli" ]
126
- ELSE
127
- ENTRYPOINT ["java" , "-jar" ,"/app/yaci-cli.jar" ]
128
- END
127
+ ENTRYPOINT ["sh" , "/app/yaci-cli.sh" ]
129
128
130
129
SAVE IMAGE --push ${REGISTRY_ORG }/yaci-cli:${APP_VERSION }
131
-
132
- zip :
133
- LOCALLY
134
- ARG TARGETOS
135
- ARG TARGETARCH
136
- ARG APP_VERSION
137
-
138
- COPY (+cli-native-ci/yaci-cli --APP_VERSION = ${APP_VERSION }) build/yaci-cli
139
- FROM alpine:3.19.1
140
- WORKDIR /app
141
- RUN apk add --no-cache zip
142
- RUN mkdir -p /app/yaci-cli-${APP_VERSION }-${TARGETOS }-${TARGETARCH }
143
- COPY build/yaci-cli /app/yaci-cli-${APP_VERSION }-${TARGETOS }-${TARGETARCH }/
144
- RUN cd /app && zip -r yaci-cli-${APP_VERSION }-${TARGETOS }-${TARGETARCH }.zip .
145
- SAVE ARTIFACT yaci-cli-${APP_VERSION}-${TARGETOS}-${TARGETARCH}.zip AS LOCAL build/yaci-cli-${APP_VERSION }-${TARGETOS }-${TARGETARCH }.zip
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Check if yaci_cli_mode is set in the environment, if not set it to "java"
4
+ if [ -z " $yaci_cli_mode " ]; then
5
+ yaci_cli_mode=" java"
6
+ fi
7
+
8
+ # Check the value of yaci_cli_mode and run the appropriate command
9
+ if [ " $yaci_cli_mode " == " java" ]; then
10
+ java -jar /app/yaci-cli.jar
11
+ elif [ " $yaci_cli_mode " == " native" ]; then
12
+ /app/yaci-cli
13
+ else
14
+ echo " Invalid mode. Please use 'java' or 'native'."
15
+ exit 1
16
+ fi
Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ cd "$(dirname "$0")"
5
5
SCRIPT_DIR=" ../scripts"
6
6
CONFIG_DIR=" ../config"
7
7
8
- YACI_CLI_SCRIPT=" yaci-cli.sh"
9
- # Uncomment to run the Java version of yaci-cli
10
- # YACI_CLI_SCRIPT="yaci-cli-java.sh"
11
-
12
8
# This is the wrapper script for starting and stopping services and running yaci-cli.sh
13
9
14
10
# Function to display help message
@@ -45,7 +41,7 @@ case $1 in
45
41
echo " start.sh executed successfully. Running yaci-cli.sh..."
46
42
first_arg=" $1 "
47
43
shift
48
- sh $SCRIPT_DIR /$YACI_CLI_SCRIPT " $@ "
44
+ sh $SCRIPT_DIR /yaci-cli.sh " $@ "
49
45
else
50
46
echo " start.sh failed. Not executing yaci-cli.sh."
51
47
fi
@@ -56,7 +52,7 @@ case $1 in
56
52
;;
57
53
ssh)
58
54
echo " ssh to Devkit container..."
59
- sh $SCRIPT_DIR // ssh.sh
55
+ sh $SCRIPT_DIR /ssh.sh
60
56
;;
61
57
info)
62
58
echo " Info of Devkit"
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ ogmios_enabled=true
3
3
kupo_enabled=false
4
4
5
5
node=node1
6
+ yaci_cli_mode=native
6
7
7
8
#######################################################
8
9
# Ports
Original file line number Diff line number Diff line change 1
- tag=0.9.0-dev3
1
+ tag=0.9.0-dev4
2
2
revision=
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 12
12
CMD=" docker compose"
13
13
fi
14
14
15
- $CMD --env-file $ENV_FILE --env-file $VERSION_FILE exec yaci-cli /app/yaci-cli $*
15
+ $CMD --env-file $ENV_FILE --env-file $VERSION_FILE exec yaci-cli /app/yaci-cli.sh $*
You can’t perform that action at this time.
0 commit comments