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

Task/jenkins 42120 git creation credential changes #895

Merged
merged 40 commits into from
Mar 16, 2017
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1c2e937
JENKINS-41397# validate git credential
Jan 25, 2017
0b207f7
Field specific error message
Jan 27, 2017
f029779
Merge remote-tracking branch 'origin/master' into task/JENKINS-41397
Jan 31, 2017
b0fb5dc
bug fixes
Jan 31, 2017
8dc82e1
credential validation is now 400 errors.
Jan 31, 2017
19d8621
Merge remote-tracking branch 'origin/master' into task/JENKINS-41397
Feb 14, 2017
718b731
Merge remote-tracking branch 'origin/master' into task/JENKINS-41397
Feb 14, 2017
6c11a94
[JENKINS-42120] fix a bug where some content from the FlowSteps (inac…
Mar 2, 2017
82821ab
[JENKINS-42120] rework Git creation flow to use modal for creating ne…
Mar 2, 2017
23d5978
Merge branch 'master' into task/JENKINS-42120-git-creation-credential…
Mar 6, 2017
954a68e
[JENKINS-42120] remove "System SSH" as an option
Mar 6, 2017
236b875
[JENKINS-42120] width of username / password inputs
Mar 6, 2017
8e9304b
[JENKINS-42120] remove obsolete code for credential type in "Connect"…
Mar 6, 2017
485d986
Merge branch 'task/JENKINS-41397' into task/JENKINS-42120-git-creatio…
Mar 6, 2017
830a0fb
[JENKINS-42120] add a step to Git creation flow that can display unha…
Mar 6, 2017
867f127
[JENKINS-42120] reworking Git creation to support different validatio…
Mar 6, 2017
9e9f778
[JENKINS-42120] fix bug where credentialId was not sent correctly; ad…
Mar 6, 2017
e852705
Merge remote-tracking branch 'origin/master' into task/JENKINS-41397
Mar 7, 2017
43bbde0
Use StandardCredentials in case of git.
Mar 7, 2017
699e1e8
List all credentials that user has access to.
Mar 7, 2017
eac6262
Merge branch 'task/JENKINS-41397' into task/JENKINS-42120-git-creatio…
Mar 8, 2017
3b49071
[JENKINS-42120] fix a ridiculous bug where credentials were being cre…
Mar 8, 2017
ada0ffd
[JENKINS-42120] add an API to remove all steps after the specified step
Mar 9, 2017
e0aad62
[JENKINS-42120] transform Git TransportException "authentication is r…
Mar 9, 2017
dae30b2
[JENKINS-42120] improve the error handling for Git creation, respondi…
Mar 9, 2017
f608ec8
[JENKINS-42120] delint
Mar 9, 2017
594b8a2
[JENKINS-42120] fix broken test
Mar 9, 2017
a8ceb12
Frogot to remove StandardCredentials.
vivek Mar 10, 2017
c8a986c
Merge branch 'task/JENKINS-41397' into task/JENKINS-42120-git-creatio…
Mar 10, 2017
393a791
[JENKINS-42120] use beta JDL with dropdown fixes and enhancements; re…
Mar 13, 2017
8614e64
[JENKINS-42120] fix a bug where selecting a credential would not allo…
Mar 13, 2017
9b95dde
[JENKINS-42120] adjust backend to transform the SSH "connection is no…
Mar 13, 2017
c7250b2
[JENKINS-42120] italicize the special "none" credential
Mar 14, 2017
3da646d
[JENKINS-42120] change Git creation UI to expose "System Default" opt…
Mar 15, 2017
fe568b1
[JENKINS-42120] use JDL that includes useful Dropdown fixes but inclu…
Mar 15, 2017
dfdb8fc
Merge branch 'master' into task/JENKINS-42120-git-creation-credential…
Mar 16, 2017
66ff520
release core-js 0.0.89
Mar 16, 2017
e606c7f
bump core-js version to 0.0.90-SNAPSHOT
Mar 16, 2017
b59388c
[JENKINS-42120] use latest JDL (and core-js, since we have to)
Mar 16, 2017
988d4d0
Merge branch 'master' into task/JENKINS-42120-git-creation-credential…
Mar 16, 2017
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
Prev Previous commit
Next Next commit
Field specific error message
  • Loading branch information
Vivek Pandey authored and Vivek Pandey committed Jan 27, 2017
commit 0b207f7508c2d767d11e88a6bbe3a8d9022e453e
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ static void validateCredentials(@Nonnull SCMSourceOwner owner, @Nonnull String u
if (credentials == null) {
throw new ServiceException.BadRequestExpception(new ErrorMessage(400, "Failed to create Git pipeline")
.add(new ErrorMessage.Error("scmConfig.credentialId",
ErrorMessage.Error.ErrorCodes.INVALID.toString(),
"Invalid credentialId: " + credentialId)));
ErrorMessage.Error.ErrorCodes.NOT_FOUND.toString(),
String.format("credentialId: %s not found", credentialId))));
}
}
Git git = new Git(TaskListener.NULL, new EnvVars());
Expand All @@ -50,9 +50,15 @@ static void validateCredentials(@Nonnull SCMSourceOwner owner, @Nonnull String u
} catch (IOException | InterruptedException e) {
throw new ServiceException.UnexpectedErrorException("Failed to create pipeline due to unexpected error: "+e.getMessage(), e);
} catch (GitException e){
throw new ServiceException.BadRequestExpception(e.getMessage(), e);
throw new ServiceException.BadRequestExpception(new ErrorMessage(400, "Failed to create Git pipeline")
.add(new ErrorMessage.Error("scmConfig.uri",
ErrorMessage.Error.ErrorCodes.INVALID.toString(),
"Invalid uri: " + uri)), e);
} catch (IllegalStateException e){
throw new ServiceException.ForbiddenException(e.getMessage(), e);
throw new ServiceException.ForbiddenException(new ErrorMessage(403, "Failed to create Git pipeline")
.add(new ErrorMessage.Error("scmConfig.credentialId",
ErrorMessage.Error.ErrorCodes.INVALID.toString(),
"Invalid credentialId: " + credentialId)), e);
}
}

Expand Down