-
Notifications
You must be signed in to change notification settings - Fork 145
/
Dockerfile
19 lines (17 loc) · 989 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This Dockerfile is intended for use by openshift/ci-operator config files defined
# in openshift/release for v4.x prow based PR CI jobs
FROM quay.io/openshift/origin-jenkins-agent-maven:4.11.0 AS builder
WORKDIR /java/src/github.com/openshift/jenkins-client-plugin
COPY . .
USER 0
# We need a newer maven version as the RHEL package is still on 3.6.2
RUN curl -L -o maven.tar.gz https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz && \
mkdir maven && \
tar -xvzf maven.tar.gz -C maven --strip-component 1
# Use the downloaded version of maven to build the package
RUN ./maven/bin/mvn --version && \
./maven/bin/mvn clean package
FROM registry.ci.openshift.org/origin/4.16:jenkins
RUN rm /opt/openshift/plugins/openshift-client.jpi
COPY --from=builder /java/src/github.com/openshift/jenkins-client-plugin/target/openshift-client.hpi /opt/openshift/plugins
RUN mv /opt/openshift/plugins/openshift-client.hpi /opt/openshift/plugins/openshift-client.jpi