make GitLabConnection describable and add jcasc test#1063
Conversation
|
Thank you @jetersen will take a look later tonight and merge |
| @Restricted(NoExternalUse.class) | ||
| private String getApiToken(String apiTokenId, Item item) { | ||
| ItemGroup context = null != item ? item.getParent() : Jenkins.getInstance(); | ||
| ItemGroup<?> context = null != item ? item.getParent() : Jenkins.get(); |
| @Initializer(after = InitMilestone.PLUGINS_STARTED) | ||
| public static void migrate() throws IOException { | ||
| GitLabConnectionConfig descriptor = (GitLabConnectionConfig) Jenkins.getInstance().getDescriptor(GitLabConnectionConfig.class); | ||
| GitLabConnectionConfig descriptor = (GitLabConnectionConfig) Jenkins.get().getDescriptor(GitLabConnectionConfig.class); |
| public FormValidation doCheckName(@QueryParameter String id, @QueryParameter String value) { | ||
| if (StringUtils.isEmptyOrNull(value)) { | ||
| return FormValidation.error(Messages.name_required()); | ||
| } else if (connectionMap.containsKey(value) && !connectionMap.get(value).toString().equals(id)) { |
There was a problem hiding this comment.
This check is very hard to do, even prior to my changes this will only work after initial save.
Not even sure why a transient map is used for lookups.
| @@ -1,46 +1,17 @@ | |||
| <?jelly escape-by-default='true'?> | |||
| <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:c="/lib/credentials" xmlns:st="jelly:stapler"> | |||
| <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | |||
|
Build failure seems unrelated. That's a new one... |
|
This could be a problem with the infra |
|
Windows machine in the second run took almost 40 minutes to run the tests and obviously failed due to disk issues. |
|
flaky windows tests as ever... |
|
@markyjackson-taulia any chance disabling some of the windows tests that require disks? |
@jetersen Let me take a look at doing that |
|
Ya failed disk tests again, I give up... trying to get jenkins tests to pass. |
|
This should properly close after the run. |
all the mocked tests will never work without rewrite
|
Oh dear @markyjackson-taulia this plugin pom was terrible old, and causing the Linux agent to crash due requesting too much memory. This is fixed by updating parent pom and Jenkins test harness... Last I heard mocked jobs is a big nono 🗡️ So ccd96b6 fixed the temporary folder cleanup... |
|
Thanks for merging. Much appreciated @markyjackson-taulia |
|
@markyjackson-taulia could you release this please? |
|
Will do it over the weekend |
|
@markyjackson-taulia reminder |
Made GitLabConnection describable per Jenkins/JCasC standards and added JCasC tests also confirmed in UI that everything is working as expected.
fixes #1062