Skip to content

Instantly share code, notes, and snippets.

@jmesnil
Created February 3, 2021 10:36
Show Gist options
  • Save jmesnil/9c6086166d6b7e4fff08c433ba9f3cc0 to your computer and use it in GitHub Desktop.
Save jmesnil/9c6086166d6b7e4fff08c433ba9f3cc0 to your computer and use it in GitHub Desktop.
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: example
spec:
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
name: 'openjdk-11:latest'
source:
type: Git
dockerfile: >-
FROM openjdk-11:latest AS builder
USER root
WORKDIR /build/
COPY . /build/
RUN mvn clean package -Pbootable-jar -Popenshift
FROM registry.redhat.io/ubi8/ubi-minimal
WORKDIR /deployments/
COPY --from=builder /build/target/*-bootable.jar
/deployments/application.jar
RUN chmod 110 /deployments/application.jar
CMD ["java", "-jar", "./application"]
git:
uri: 'https://github.com/wildfly/quickstart.git'
ref: 22.0.0.Final
contextDir: microprofile-config
triggers:
- type: ConfigChange
runPolicy: Serial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment