-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JKNS-458: Add Konflux-compatible Dockerfile
Adding a Dockerfile for testing the Jenkins client plugin that does not rely on the OpenShift CI registry for base images. This will pay dividends when we eventually build the Jenkins images and plugins on Konflux, as this Dockerfile only uses productized images published on registry.redhat.io. This also adds a .dockerignore to ensure generated or test content is not present when developers build this image themselves locally. Signed-off-by: Adam Kaplan <adam.kaplan@redhat.com>
- Loading branch information
1 parent
20f505a
commit 2cea2ad
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.idea | ||
target | ||
PR-Testing/jpi/ | ||
openshift-client.iml | ||
.classpath | ||
.project | ||
.settings | ||
.DS_Store | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ openshift-client.iml | |
.project | ||
.settings | ||
.DS_Store | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This Dockerfile creates a test image that builds the openshift-client plugin and installs it into | ||
# the latest Jenkins image, replacing the official relased version of the OCP client plugin. | ||
# The image is intended to be used by the CI system to test changes. | ||
|
||
FROM registry.redhat.io/ubi8/openjdk-17:1.20 AS builder | ||
WORKDIR /java/src/github.com/openshift/jenkins-client-plugin | ||
# openjdk-17 image defaults the USER to jboss. Use --chown flag to set the owner of the copied | ||
# files to jboss. Otherwise the files will be owned by root and the maven build will fail. | ||
COPY --chown=jboss:jboss . . | ||
RUN mvn --version && \ | ||
mvn clean package | ||
|
||
# Use the latest Jenkins image as the base for the "runtime" image. | ||
# The tag should be updated to reflect the appropriate OCP version being tested - often this | ||
# will lag the current version of OCP under development. | ||
FROM registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.14.0 | ||
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 |