Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge]: Update image for CI test with latest version of plugin dependencies #492

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN curl -L -o maven.tar.gz https://dlcdn.apache.org/maven/maven-3/3.8.8/binarie
RUN ./maven/bin/mvn --version && \
./maven/bin/mvn clean package

FROM registry.ci.openshift.org/origin/4.16:jenkins
FROM quay.io/prdhamdh/jenkins:plugin-dep
RUN rm /opt/openshift/plugins/openshift-sync.jpi
COPY --from=builder /java/src/github.com/openshift/jenkins-sync-plugin/target/openshift-sync.hpi /opt/openshift/plugins
RUN mv /opt/openshift/plugins/openshift-sync.hpi /opt/openshift/plugins/openshift-sync.jpi
42 changes: 14 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<properties>
<revision>1.1.0</revision>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.426.2</jenkins.version>
<jenkins.version>2.440.3</jenkins.version>
<log.level>INFO</log.level>
</properties>

Expand Down Expand Up @@ -114,11 +114,11 @@

<dependencyManagement>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.jenkins.tools.bom/bom-2.426.x -->
<!-- https://mvnrepository.com/artifact/io.jenkins.tools.bom/bom-2.440.x -->
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.426.x</artifactId>
<version>2705.vf5c48c31285b_</version>
<artifactId>bom-2.440.x</artifactId>
<version>3435.v238d66a_043fb_</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand All @@ -127,35 +127,21 @@
<artifactId>joda-time</artifactId>
<version>2.12.5</version>
</dependency>
<!-- Downgrade asm-api version from 9.7-33.x to 9.6-3.x to resolve compatibility issues with asm-util -->
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-multibranch</artifactId>
<version>773.vc4fe1378f1d5</version>
<groupId>io.jenkins.plugins</groupId>
<artifactId>asm-api</artifactId>
<version>9.6-3.v2e1fa_b_338cd7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>865.v43e78cc44e0d</version>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.pipeline-stage-view</groupId>
<artifactId>pipeline-rest-api</artifactId>
<version>2.34</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git</artifactId>
<version>5.2.1</version>
</dependency>
<dependency>
<groupId>io.jenkins.blueocean</groupId>
<artifactId>blueocean-rest</artifactId>
<version>1.27.9</version>
</dependency>
<dependency>
<groupId>org.csanchez.jenkins.plugins</groupId>
<artifactId>kubernetes</artifactId>
<version>4174.v4230d0ccd951</version>
<groupId>io.jenkins.plugins.mina-sshd-api</groupId>
<artifactId>mina-sshd-api-common</artifactId>
<version>2.14.0-131.v04e9b_6b_e0362</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty;

import hudson.model.Descriptor.FormException;
import hudson.plugins.git.BranchSpec;
import hudson.plugins.git.GitSCM;
import hudson.plugins.git.SubmoduleConfig;
Expand Down Expand Up @@ -108,7 +109,12 @@ public static FlowDefinition mapBuildConfigToFlow(BuildConfig bc) throws IOExcep
return null;
}
} else {
return new CpsFlowDefinition(jenkinsfile, true);
try {
return new CpsFlowDefinition(jenkinsfile, true);
} catch (FormException e) {
// TODO Auto-generated catch block
throw new RuntimeException(e);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;

import hudson.model.Fingerprint;
import hudson.model.Descriptor.FormException;
import hudson.security.ACL;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import io.fabric8.kubernetes.api.model.ObjectMeta;
Expand Down Expand Up @@ -485,8 +486,13 @@ private static Credentials newUsernamePasswordCredentials(String secretName, Str
return null;

}
return new UsernamePasswordCredentialsImpl(GLOBAL, secretName, secretName,
new String(DECODER.decode(usernameData), UTF_8), new String(DECODER.decode(passwordData), UTF_8));
try {
return new UsernamePasswordCredentialsImpl(GLOBAL, secretName, secretName,
new String(DECODER.decode(usernameData), UTF_8), new String(DECODER.decode(passwordData), UTF_8));
} catch (FormException e) {
// TODO Auto-generated catch block
throw new RuntimeException(e);
}
}

/**
Expand Down