CI plugin to convert a java program into a graalvm native image
10K+
CI plugin to convert a java program into a graalvm native image.
The following parameters can be set to configure the plugin.
build/libs/*:build/classesbuild/native/graal-config/Execute from the working directory:
docker run --rm \
-v path/to/jar:/work \
-w=/work \
-e PLUGIN_JAR_NAME=/work/build/native/libs/YamlValidator.jar \
-e PLUGIN_CONFIG_FILE=/work/config/graal.yml \
devatherock/java-to-native:1.0.0
java_to_native:
docker:
- image: devatherock/java-to-native:1.0.0
working_directory: ~/drone-yaml-validator
environment:
PLUGIN_JAR_NAME: build/native/libs/YamlValidator.jar
PLUGIN_CONFIG_FILE: config/graal.yml
steps:
- checkout
- attach_workspace:
at: ~/drone-yaml-validator
- run: sh /scripts/entry-point.sh
- persist_to_workspace:
root: ~/drone-yaml-validator
paths:
- YamlValidator
steps:
- name: java_to_native
ruleset:
branch: master
event: push
image: devatherock/java-to-native:1.0.0
parameters:
jar_name: build/native/libs/YamlValidator.jar
config_file: config/graal.yml
A YAML configuration file can be provided to supply additional arguments to the native-image command and to specify
a list of arguments with which to run the main class or the jar to generate reflection config
native-image:
build:
# Additional arguments to pass to the native image build
additional-args:
- "-H:IncludeResourceBundles=net.sourceforge.argparse4j.internal.ArgumentParserImpl"
# If specified, only these arguments will be passed to the image build
#override-args:
# - "--no-server"
agent:
args:
- ['--debug', 'false', '--path', 'src/test/resources/data/valid']
- ['--debug', 'false', '--path', 'src/test/resources/data/invalid']
- ['--debug', 'false', '--path', 'src/test/resources/data/invalid2']
- ['--debug', 'true', '--path', 'src/test/resources/data/valid']
- ['--debug', 'true', '--path', 'src/test/resources/data/invalid']
- ['--debug', 'true', '--path', 'src/test/resources/data/invalid2']
- []
- ['--help']
Content type
Image
Digest
sha256:fba9c097a…
Size
729.7 MB
Last updated
about 3 years ago
docker pull devatherock/java-to-native