Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions templates/jlink/jlinked-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ parameters:
name: JDK_VERSION
value: "11"
required: true
- description: A name for the application used to ensure created resources are uniquely named
name: APPNAME
required: true
- description: Application to run the jlink workflow on
name: APP_URI
required: true
Expand All @@ -35,7 +38,7 @@ objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: ubi9-openjdk-${JDK_VERSION}-jlink
name: ${APPNAME}-ubi9-openjdk-${JDK_VERSION}-jlink
spec:
lookupPolicy:
local: false
Expand All @@ -44,9 +47,9 @@ objects:
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: jlink-builder-jdk-${JDK_VERSION}
name: ${APPNAME}-jlink-builder-jdk-${JDK_VERSION}
labels:
app: jlink-builder-jdk-${JDK_VERSION}
app: ${APPNAME}-jlink-builder-jdk-${JDK_VERSION}
spec:
source:
dockerfile: |
Expand All @@ -72,7 +75,7 @@ objects:
output:
to:
kind: ImageStreamTag
name: ubi9-openjdk-${JDK_VERSION}-jlink:latest
name: ${APPNAME}-ubi9-openjdk-${JDK_VERSION}-jlink:latest
triggers:
- type: ConfigChange
- type: ImageChange
Expand All @@ -85,7 +88,7 @@ objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: intermediate
name: ${APPNAME}-intermediate
spec:
lookupPolicy:
local: false
Expand All @@ -94,9 +97,9 @@ objects:
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: jlink-s2i-jdk-${JDK_VERSION}
name: ${APPNAME}-jlink-s2i-jdk-${JDK_VERSION}
labels:
app: jlink-s2i-jdk-${JDK_VERSION}
app: ${APPNAME}-jlink-s2i-jdk-${JDK_VERSION}
spec:
source:
type: Git
Expand All @@ -108,7 +111,7 @@ objects:
sourceStrategy:
from:
kind: ImageStreamTag
name: ubi9-openjdk-${JDK_VERSION}-jlink:latest # Output Imagestream from stage-1
name: ${APPNAME}-ubi9-openjdk-${JDK_VERSION}-jlink:latest # Output Imagestream from stage-1
pullPolicy: Always
env:
- name: S2I_ENABLE_JLINK
Expand All @@ -118,14 +121,14 @@ objects:
output:
to:
kind: ImageStreamTag
name: intermediate:latest
name: ${APPNAME}-intermediate:latest
triggers:
- type: ConfigChange
- type: ImageChange
imageChange:
from:
kind: ImageStreamTag
name: ubi9-openjdk-${JDK_VERSION}-jlink:latest # Output of stage-1 which serves as input to stage-2
name: ${APPNAME}-ubi9-openjdk-${JDK_VERSION}-jlink:latest # Output of stage-1 which serves as input to stage-2
- type: GitHub
github:
secret: ${GITHUB_WEBHOOK_SECRET}
Expand All @@ -135,7 +138,7 @@ objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: ubimicro
name: ${APPNAME}-ubimicro
spec:
lookupPolicy:
local: true
Expand All @@ -151,7 +154,7 @@ objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: lightweight-image
name: ${APPNAME}-lightweight-image
spec:
lookupPolicy:
local: false
Expand All @@ -160,13 +163,13 @@ objects:
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: multistage-buildconfig
name: ${APPNAME}-multistage-buildconfig
spec:
source:
images:
- from:
kind: ImageStreamTag
name: intermediate:latest
name: ${APPNAME}-intermediate:latest
paths:
- sourcePath: /mnt/jrootfs
destinationDir: jrootfs
Expand Down Expand Up @@ -200,14 +203,14 @@ objects:
output:
to:
kind: ImageStreamTag
name: lightweight-image:latest # Tag for the final output image
name: ${APPNAME}-lightweight-image:latest # Tag for the final output image
triggers:
- type: ConfigChange
- type: ImageChange
imageChange:
from:
kind: ImageStreamTag
name: intermediate:latest # output of stage-2
name: ${APPNAME}-intermediate:latest # output of stage-2
- type: ImageChange
imageChange:
from:
Expand Down