File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,30 +63,20 @@ jobs:
6363 - name : Grant execute permission for gradlew
6464 run : cd client && chmod +x gradlew
6565 - name : Build
66- run : cd client && ./gradlew build
66+ run : cd client && ./gradlew clean build
6767 - name : Test
6868 run : cd client && ./gradlew test
69- - name : Package
70- run : cd client && ./gradlew bootJar
71- - name : Build toscactl-linux-amd64
72- run : cd client && make build_linux VERSION=${{ needs.precheck.outputs.version }} COMMIT=$(git rev-parse HEAD)
73- - name : List build directory
69+ - name : Package Application
7470 run : |
75- ls -la client/build/
76- ls -la client/build/libs/
77- - name : Archive JAR
78- uses : actions/upload-artifact@v4
79- with :
80- name : app-${{ needs.precheck.outputs.full_version }}
81- path : |
82- client/build/libs/*.jar
83- client/build/*.jar
71+ cd client
72+ jpackage --input docker/ --name toscactl --main-jar app.jar --main-class org.springframework.boot.loader.JarLauncher --java-options "--enable-preview" --type app-image --verbose
73+ zip -r toscactl.zip toscactl
8474 - name : Release Asset Upload
8575 uses : svenstaro/upload-release-action@v2
8676 if : github.event_name == 'release' || github.event_name == 'prerelease'
8777 with :
8878 repo_token : ${{ secrets.GITHUB_TOKEN }}
89- file : client/build/*.jar
79+ file : client/toscactl.zip
9080 tag : ${{ needs.precheck.outputs.branchTag }}
9181 overwrite : true
9282 file_glob : true
Original file line number Diff line number Diff line change @@ -7,16 +7,12 @@ VERSION=v0.1
77COMMIT =` git rev-parse --short=4 HEAD `
88BUILD_TIME =` date +" %m/%d/%Y %H:%M:%S" `
99
10- build : get build_jar build_linux
10+ build : get build_jar package
1111
1212build_jar : build_prepare
1313 cd $(ROOT_DIR )
1414 ./gradlew build
1515
16- build_linux : build_prepare
17- cd $(ROOT_DIR ) && ./gradlew bootJar
18- cp $(ROOT_DIR ) /build/libs/* .jar $(BUILD_DIR ) /toscactl-linux-amd64.jar
19-
2016test :
2117 cd $(ROOT_DIR )
2218 ./gradlew test
3026 ./gradlew dependencies
3127
3228build_prepare :
33- mkdir -p " $( BUILD_DIR) "
29+ mkdir -p " $( BUILD_DIR) "
30+
31+ package :
32+ cd $(ROOT_DIR ) /client
33+ jpackage --input docker/ --name toscactl --main-jar app.jar --main-class org.springframework.boot.loader.JarLauncher --java-options " --enable-preview" --type app-image
34+ zip -r toscactl.zip toscactl
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ buildscript {
77plugins {
88 id ' jacoco'
99 id ' maven-publish'
10- id ' java'
11- id ' org.springframework.boot' version ' 2.7.1'
12- id ' io.spring.dependency-management' version ' 1.0.11.RELEASE'
10+ id ' java'
11+ id ' org.springframework.boot' version ' 2.7.1'
12+ id ' io.spring.dependency-management' version ' 1.0.11.RELEASE'
1313}
1414
1515group = ' edptoscaqs'
@@ -23,14 +23,14 @@ repositories {
2323ext[' log4j2.version' ] = ' 2.17.0'
2424
2525ext {
26- set(' snippetsDir' , file(" build/generated-snippets" ))
26+ set(' snippetsDir' , file(" build/generated-snippets" ))
2727}
2828
2929dependencies {
30- implementation ' org.springframework.boot:spring-boot-starter-data-jpa'
31- implementation ' org.springframework.boot:spring-boot-starter-data-rest'
32- implementation ' org.springframework.boot:spring-boot-starter-security'
33- implementation ' org.springframework.boot:spring-boot-starter-web'
30+ implementation ' org.springframework.boot:spring-boot-starter-data-jpa'
31+ implementation ' org.springframework.boot:spring-boot-starter-data-rest'
32+ implementation ' org.springframework.boot:spring-boot-starter-security'
33+ implementation ' org.springframework.boot:spring-boot-starter-web'
3434 implementation ' javax.validation:validation-api:2.0.1.Final'
3535 implementation ' org.apache.commons:commons-text:1.10.0'
3636 implementation ' org.hibernate.validator:hibernate-validator:7.0.1.Final'
You can’t perform that action at this time.
0 commit comments