-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpack.java
executable file
·40 lines (32 loc) · 1.64 KB
/
pack.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
///usr/bin/env jbang "$0" "$@" ; exit $?
//REPOS mavencentral,jitpack
//DEPS org.slf4j:slf4j-simple:1.7.30
//DEPS ${env.CURRENT_WORKFLOW_DEP:dev.snowdrop:buildpack-client:0.0.13-SNAPSHOT}
import java.io.File;
import java.util.HashMap;
import dev.snowdrop.buildpack.*;
import dev.snowdrop.buildpack.config.*;
import dev.snowdrop.buildpack.docker.*;
public class pack {
public static void main(String... args) {
System.setProperty("org.slf4j.simpleLogger.log.dev.snowdrop.buildpack","debug");
System.setProperty("org.slf4j.simpleLogger.log.dev.snowdrop.buildpack.docker","debug");
System.setProperty("org.slf4j.simpleLogger.log.dev.snowdrop.buildpack.lifecycle","debug");
System.setProperty("org.slf4j.simpleLogger.log.dev.snowdrop.buildpack.lifecycle.phases","debug");
HashMap<String,String> env = new HashMap<>();
int exitCode = BuildConfig.builder()
.withBuilderImage(new ImageReference("docker.io/paketocommunity/builder-ubi-base"))
.withOutputImage(new ImageReference("snowdrop/hello-spring"))
.withNewLogConfig()
.withLogger(new SystemLogger())
.withLogLevel("debug")
.and()
.withNewPlatformConfig()
.withEnvironment(env)
.and()
.addNewFileContentApplication(new File("."))
.build()
.getExitCode();
System.exit(exitCode);
}
}