Skip to content

Commit 9a5ecc5

Browse files
authored
Merge pull request #8 from devatherock/merge-docs-to-readme
docs: Merged contents of DOCS.md into README.md
2 parents 2bca4b3 + 2692ae6 commit 9a5ecc5

3 files changed

Lines changed: 49 additions & 48 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44
### Changed
55
- Updated dockerhub readme in CI pipeline
6+
- [#7](https://github.com/devatherock/java-to-native/issues/7): Merged contents of `DOCS.md` into `README.md`
67

78
## [1.0.0] - 2022-05-17
89
### Changed

DOCS.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

README.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@
44
[![Docker Image Size](https://img.shields.io/docker/image-size/devatherock/java-to-native.svg?sort=date)](https://hub.docker.com/r/devatherock/java-to-native/)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
# java-to-native
7-
CI plugin to convert a java program into a [graalvm native image](https://www.graalvm.org/docs/reference-manual/native-image/).
8-
For a listing of available options and usage samples, please take a look at the [docs](DOCS.md).
7+
CI plugin to convert a java program into a [graalvm native image](https://www.graalvm.org/docs/reference-manual/native-image/).
8+
9+
## Plugin config
10+
The following parameters can be set to configure the plugin.
11+
12+
* **debug** - Flag to enable debug logs. Optional, by default, debug logs are disabled
13+
* **jar_name** - Executable jar file to convert into native binary
14+
* **config_file** - Path to a yaml configuration file
15+
* **classpath** - Path containing class files and jars to use as class path. Defaults to `build/libs/*:build/classes`
16+
* **reflection_path** - Path to the reflection configuration if it already exists. If not specified, it will be generated at `build/native/graal-config/`
917

1018
## Usage
19+
### Docker
1120

1221
Execute from the working directory:
1322

@@ -17,10 +26,45 @@ docker run --rm \
1726
-w=/work \
1827
-e PLUGIN_JAR_NAME=/work/build/native/libs/YamlValidator.jar \
1928
-e PLUGIN_CONFIG_FILE=/work/config/graal.yml \
20-
devatherock/java-to-native:0.1.3
29+
devatherock/java-to-native:1.0.0
30+
```
31+
32+
### Circle CI
33+
34+
```yaml
35+
java_to_native:
36+
docker:
37+
- image: devatherock/java-to-native:1.0.0
38+
working_directory: ~/drone-yaml-validator
39+
environment:
40+
PLUGIN_JAR_NAME: build/native/libs/YamlValidator.jar
41+
PLUGIN_CONFIG_FILE: config/graal.yml
42+
steps:
43+
- checkout
44+
- attach_workspace:
45+
at: ~/drone-yaml-validator
46+
- run: sh /scripts/entry-point.sh
47+
- persist_to_workspace:
48+
root: ~/drone-yaml-validator
49+
paths:
50+
- YamlValidator
51+
```
52+
53+
### vela
54+
55+
```yaml
56+
steps:
57+
- name: java_to_native
58+
ruleset:
59+
branch: master
60+
event: push
61+
image: devatherock/java-to-native:1.0.0
62+
parameters:
63+
jar_name: build/native/libs/YamlValidator.jar
64+
config_file: config/graal.yml
2165
```
2266
23-
## Configuration
67+
## native-image config
2468
A YAML configuration file can be provided to supply additional arguments to the `native-image` command and to specify
2569
a list of arguments with which to run the main class or the jar to generate reflection config
2670

0 commit comments

Comments
 (0)