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

Bump io.jenkins.tools.bom:bom-2.440.x from 3387.v0f2773fa_3200 to 3413.v0d896b_76a_30d #1661

Merged
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 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>3387.v0f2773fa_3200</version>
<version>3413.v0d896b_76a_30d</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.cloudbees.plugins.credentials.common.StandardCredentials;
import com.cloudbees.plugins.credentials.domains.Domain;
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
import hudson.model.Descriptor.FormException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -347,7 +348,7 @@ public void checkoutWithNoCredentialsSpecified() throws Exception {
r.waitForMessage("No credentials specified", b);
}

private StandardCredentials createCredential(CredentialsScope scope, String id) {
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password");
private StandardCredentials createCredential(CredentialsScope scope, String id) throws FormException {
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password-longer-than-14");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void testUserRemoteConfigCheck() throws Throwable {
SystemCredentialsProvider.getInstance()
.getCredentials()
.add(new UsernamePasswordCredentialsImpl(
CredentialsScope.GLOBAL, "mycreds", null, "jenkins", "s3cr3t"));
CredentialsScope.GLOBAL, "mycreds", null, "jenkins", "s3cr3t-at-least-14-chars"));
SystemCredentialsProvider.getInstance().save();
FreeStyleProject p = r.createProject(FreeStyleProject.class, "mbp");
UserRemoteConfig.DescriptorImpl descriptor =
Expand Down
28 changes: 23 additions & 5 deletions src/test/java/hudson/plugins/git/GitSCMTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,25 @@
import hudson.FilePath;
import hudson.Functions;
import hudson.Launcher;
import hudson.model.*;
import hudson.model.AbstractBuild;
import hudson.model.Action;
import hudson.model.Cause;
import hudson.model.Descriptor;
import hudson.model.Descriptor.FormException;
import hudson.model.EnvironmentContributingAction;
import hudson.model.EnvironmentContributor;
import hudson.model.Fingerprint;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.ParameterValue;
import hudson.model.ParametersAction;
import hudson.model.ParametersDefinitionProperty;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.StringParameterDefinition;
import hudson.model.StringParameterValue;
import hudson.model.TaskListener;
import hudson.model.User;
import hudson.plugins.git.GitSCM.DescriptorImpl;
import hudson.plugins.git.browser.GithubWeb;
import hudson.plugins.git.extensions.GitSCMExtension;
Expand Down Expand Up @@ -158,9 +176,9 @@ public void waitForJenkinsIdle() throws Exception {
}
}

private StandardCredentials getInvalidCredential() {
private StandardCredentials getInvalidCredential() throws FormException {
String username = "bad-user";
String password = "bad-password";
String password = "bad-password-but-long-enough";
CredentialsScope scope = CredentialsScope.GLOBAL;
String id = "username-" + username + "-password-" + password;
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, username, password);
Expand Down Expand Up @@ -2945,7 +2963,7 @@ private boolean isWindows() {
return java.io.File.pathSeparatorChar==';';
}

private StandardCredentials createCredential(CredentialsScope scope, String id) {
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password");
private StandardCredentials createCredential(CredentialsScope scope, String id) throws FormException {
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password-needs-to-be-14");
}
}
2 changes: 1 addition & 1 deletion src/test/java/hudson/plugins/git/GitStepTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void roundtrip() throws Exception {
@Test
public void roundtrip_withcredentials() throws Exception {
assumeTrue("Test class max time " + MAX_SECONDS_FOR_THESE_TESTS + " exceeded", isTimeAvailable());
IdCredentials c = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, null, null, "user", "pass");
IdCredentials c = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, null, null, "user", "password-needs-to-be-14");
CredentialsProvider.lookupStores(r.jenkins).iterator().next()
.addCredentials(Domain.global(), c);
GitStep step = new GitStep("[email protected]:jenkinsci/workflow-plugin.git");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class UserRemoteConfigTest {
@Issue("JENKINS-38048")
@Test
public void credentialsDropdown() throws Exception {
SystemCredentialsProvider.getInstance().getCredentials().add(new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "mycreds", null, "jenkins", "s3cr3t"));
SystemCredentialsProvider.getInstance().getCredentials().add(new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "mycreds", null, "jenkins", "s3cr3t-that-needs-to-be-long"));
SystemCredentialsProvider.getInstance().save();
FreeStyleProject p1 = r.createFreeStyleProject("p1");
FreeStyleProject p2 = r.createFreeStyleProject("p2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public void retrieveTags_folderScopedCredentials() throws Exception {
assert folderStore != null;
String fCredentialsId = "fcreds";
StandardCredentials fCredentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL,
fCredentialsId, "fcreds", "user", "password");
fCredentialsId, "fcreds", "user", "password-longer-than-14");
folderStore.addCredentials(Domain.global(), fCredentials);
folderStore.save();
WorkflowJob p = f.createProject(WorkflowJob.class, "wjob");
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/jenkins/plugins/git/GitToolChooserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
import hudson.FilePath;
import hudson.model.*;
import hudson.model.Descriptor.FormException;
import hudson.model.labels.LabelAtom;
import hudson.plugins.git.GitTool;
import hudson.slaves.DumbSlave;
Expand Down Expand Up @@ -809,8 +810,8 @@ private void failAProject(GitSampleRepoRule sampleRepo) throws Exception {
r.waitForMessage("Couldn't find any revision to build", b);
}

private StandardCredentials createCredential(CredentialsScope scope, String id) {
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password");
private StandardCredentials createCredential(CredentialsScope scope, String id) throws FormException {
return new UsernamePasswordCredentialsImpl(scope, id, "desc: " + id, "username", "password-longer-than-14");
}

/** inline ${@link hudson.Functions#isWindows()} to prevent a transient remote classloader issue */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import hudson.EnvVars;
import hudson.FilePath;

import hudson.model.Descriptor.FormException;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Item;
Expand Down Expand Up @@ -113,12 +114,12 @@ private boolean isTimeAvailable() {
"randomName",
};
private static String[] passwords = {
"&Ampersand&",
"&Ampersand-long-enough&",
"He said \"Hello\", then left.",
"default=@#(*^!",
"default=@#(*^!-long-enough",
"has_a_trailing_quote=@#(*^!'",
"here's-a-quote",
"special%%_342@**",
"here's-a-quote-long-enough",
"special%%_342@**-long-enough",
"%interior-single-quote%_786'@**",
};
private static GitTool[] gitTools = {
Expand All @@ -142,7 +143,7 @@ public GitUsernamePasswordBindingTest(String username, String password, GitTool
}

@Before
public void basicSetup() throws IOException {
public void basicSetup() throws FormException, IOException {
//File init
rootDir = tempFolder.getRoot();
rootFilePath = new FilePath(rootDir.getAbsoluteFile());
Expand Down
Loading