Skip to content

Commit 29fa4d4

Browse files
committed
Stage 2 initial implementation
1 parent a859973 commit 29fa4d4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

templates/jlink/jlink-builder/jlink-builder-template.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ parameters:
1010
name: JDK_VERSION
1111
value: "11"
1212
required: true
13+
- description: Application to run the jlink workflow on
14+
name: APPLICATION
15+
required: true
16+
- description: Git Ref to run the jlink workflow on
17+
name: REF
18+
required: true
19+
- description: Context Dir to use for the jlink workflow
20+
name: CONTEXT_DIR
21+
required: true
1322
objects:
1423
- apiVersion: image.openshift.io/v1
1524
kind: ImageStream
@@ -49,3 +58,31 @@ objects:
4958
to:
5059
kind: ImageStreamTag
5160
name: ubi9-openjdk-${JDK_VERSION}-jlink:latest
61+
- apiVersion: build.openshift.io/v1
62+
kind: BuildConfig
63+
metadata:
64+
name: jlink-s2i-jdk-${JDK_VERSION}
65+
labels:
66+
app: jlink-s2i-jdk-${JDK_VERSION}
67+
spec:
68+
source:
69+
type: Git
70+
git:
71+
uri: ${APPLICATION}
72+
ref: ${REF}
73+
contextDir: ${CONTEXT_DIR}
74+
strategy:
75+
sourceStrategy:
76+
from:
77+
kind: ImageStreamTag
78+
name: ubi9-openjdk-${JDK_VERSION}-jlink:latest # Output Imagestream for Stage 1
79+
pullPolicy: Always
80+
env:
81+
- name: S2I_ENABLE_JLINK
82+
value: true
83+
- name: LOGGING_SCRIPT_DEBUG
84+
value: true
85+
output:
86+
to:
87+
kind: ImageStreamTag
88+
name: ubi9-openjdk-${JDK_VERSION}-jlink:latest

0 commit comments

Comments
 (0)