-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use picocli. Static link Linux binaries.
- Loading branch information
Showing
11 changed files
with
159 additions
and
31 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 |
---|---|---|
|
@@ -12,3 +12,4 @@ out/ | |
.settings | ||
.classpath | ||
.factorypath | ||
**/build-info.properties |
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 @@ | ||
0.1 |
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 @@ | ||
1.6 |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM debian:bullseye | ||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install --assume-yes --no-install-recommends build-essential zlib1g-dev wget ca-certificates && rm -rf /var/lib/apt/lists/* | ||
RUN mkdir /libs | ||
RUN mkdir /downloads | ||
|
||
# Musl | ||
RUN cd /downloads && wget https://musl.libc.org/releases/musl-1.2.2.tar.gz && tar xvzf musl-1.2.2.tar.gz && rm musl-1.2.2.tar.gz | ||
RUN cd /downloads/musl-1.2.2 && ./configure --disable-shared --prefix=/libs && make && make install | ||
|
||
# zlib | ||
ENV PATH="/libs/bin:${PATH}" | ||
RUN cd /downloads && wget https://zlib.net/zlib-1.2.11.tar.gz && tar xvzf zlib-1.2.11.tar.gz && rm zlib-1.2.11.tar.gz | ||
RUN cd /downloads/zlib-1.2.11 && CC=musl-gcc ./configure --static --prefix=/libs && make && make install | ||
|
||
# libstdc++ | ||
RUN cp /usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.a /libs/lib/ | ||
|
||
|
||
# | ||
# tar xvzf musl-1.2.2.tar.gz | ||
# cd musl-1.2.2 | ||
|
||
# ./configure --disable-shared --prefix=/libs | ||
# make | ||
# make install | ||
|
||
# cd .. | ||
# wget https://zlib.net/zlib-1.2.11.tar.gz | ||
# tar xvzf zlib-1.2.11.tar.gz | ||
# cd zlib-1.2.11 | ||
|
||
# export PATH=/libs/bin:$PATH | ||
# export CC=musl-gcc | ||
# ./configure --static --prefix=/libs | ||
|
||
# cp /usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.a /libs/lib/ | ||
|
||
# apt install wget | ||
# wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.2.0/graalvm-ce-java11-linux-amd64-21.2.0.tar.gz | ||
# tar xvzf |
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
15 changes: 15 additions & 0 deletions
15
src/main/java/io/seqera/tower/agent/utils/VersionProvider.java
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,15 @@ | ||
package io.seqera.tower.agent.utils; | ||
|
||
import picocli.CommandLine; | ||
|
||
import java.util.Properties; | ||
|
||
public class VersionProvider implements CommandLine.IVersionProvider { | ||
|
||
@Override | ||
public String[] getVersion() throws Exception { | ||
Properties properties = new Properties(); | ||
properties.load(this.getClass().getResourceAsStream("/META-INF/build-info.properties")); | ||
return new String[]{String.format("@|yellow Tower Agent version %s (build %s)|@", properties.get("version"), properties.get("commitId"))}; | ||
} | ||
} |
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,5 @@ | ||
#!/bin/bash | ||
|
||
|
||
bash -c "./gradlew run -q --args=\"${*@Q}\"" | ||
|