Skip to content
This repository was archived by the owner on Aug 3, 2019. It is now read-only.

Conversation

jetersen
Copy link
Contributor

@jetersen jetersen commented Jun 6, 2019

You really ought to target higher Jenkins Core on newer projects.
I prepared the plugin for incremental and cleaned up pom, added sensible checkstyle.

I have added test dependency to JCasC, you can now use hpi:run to see JCasC in action http://localhost:8080/jenkins/configuration-as-code

I can see JCasC catches GitLab servers just fine.

image

@baymac baymac changed the title Modernize and add JCasC [JENKINS-57886] Modernize and add JCasC Jun 6, 2019
@baymac
Copy link
Owner

baymac commented Jun 6, 2019

@Casz Try to rebase this branch with develop periodically so that we avoid merge conflicts.

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

Already rebased once 😓 no worries 🤣

@jetersen jetersen marked this pull request as ready for review June 6, 2019 22:07
@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

CI is currently running here: https://travis-ci.com/casz/gitlab-branch-source-plugin-1

Once merged and you enable travis-ci for the repo we should be golden 😅

@baymac
Copy link
Owner

baymac commented Jun 6, 2019

I am unable to compile it, how can I test it then? 🤔

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

Comment out the broken test GitLabAuthSourceTest

@baymac
Copy link
Owner

baymac commented Jun 6, 2019

I am getting this scary error: https://gist.github.com/baymac/8e36ffdfc9a7bd30a18f546f756dee15

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

@baymac mvn clean verify you ought to clean your target folder once in a while, especially when I go around updating plugin pom and Jenkins core.

@baymac
Copy link
Owner

baymac commented Jun 6, 2019

mvn clean verify gives the same error. Something like:

[ERROR] error reading /home/parichay/.m2/repository/org/jenkins-ci/main/jenkins-core/2.138.4/jenkins-core-2.138.4.jar; zip file is empty
...

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

You can always clean your local maven repo when it goes foobar 😓
rm -rf /home/parichay/.m2/repository/org/jenkins-ci/main/*

@baymac
Copy link
Owner

baymac commented Jun 6, 2019

Did that. Now getting a different less scary error: https://gist.github.com/baymac/934417304e1f03ae09e363be1ffb6171

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

SpotBugs is properly correct on that matter, it wants the field to be static which makes total sense the object should only be instantiated once. No need to have an instance of GitLab Token length for each 😓

Copy link
Collaborator

@markjacksonfishing markjacksonfishing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@baymac
Copy link
Owner

baymac commented Jun 6, 2019

Still getting this error:

[INFO] Inconsistent synchronization of io.jenkins.plugins.gitlabserver.servers.GitLabServers.servers; 
locked 80% of time [io.jenkins.plugins.gitlabserver.servers.GitLabServers, io.jenkins.plugins.gitlabserver.servers.GitLabServers, 
io.jenkins.plugins.gitlabserver.servers.GitLabServers, 
io.jenkins.plugins.gitlabserver.servers.GitLabServers, 
io.jenkins.plugins.gitlabserver.servers.GitLabServers] Unsynchronized access at GitLabServers.java:[line
 54]Synchronized access at GitLabServers.java:[line 117]Synchronized access at GitLabServers.java:
[line 90]Synchronized access at GitLabServers.java:[line 90]Synchronized access at GitLabServers.java:
[line 91] IS2_INCONSISTENT_SYNC
[INFO] 

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

@baymac should be fixed by the last force-push 😓

@jetersen
Copy link
Contributor Author

jetersen commented Jun 6, 2019

@justinharringa
Copy link
Collaborator

justinharringa commented Jun 7, 2019

@Casz I'm assuming the token here is either fake or doesn't really have much access, right?

@jetersen
Copy link
Contributor Author

jetersen commented Jun 7, 2019

@justinharringa I just took the one that was already included in the other test class 😓 I can generate one and throw it away 🐇

@justinharringa
Copy link
Collaborator

Just basically making sure if someone finds that token that they can't do anything that'll be nasty or net them a bunch of cryptocurrency. 😆

Copy link
Collaborator

@markjacksonfishing markjacksonfishing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Owner

@baymac baymac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you find time answer my queries. :)

@baymac baymac merged commit c18e52b into baymac:develop Jun 10, 2019
@jetersen jetersen deleted the jcasc branch June 11, 2019 00:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants