Hosting a new Plugin - Jenkins Lint

66 views
Skip to first unread message

Victor Martinez

unread,
Jul 5, 2015, 1:12:31 PM7/5/15
to jenkin...@googlegroups.com

Hi there,

I've been working on some Jenkins automation to highlight when Jobs are not using some of the best practices I've already found/defined based on others or in my own experience. It's exactly the same approach as other lint detect tools: such as: checkstyle, pmd, puppet-lint, so on. 

Looking forward for having some feedback.

Thanks,

Víctor

Daniel Beck

unread,
Jul 6, 2015, 5:58:49 PM7/6/15
to jenkin...@googlegroups.com
This looks interesting! I (and I assume many others) write scripts to check e.g. that all 'marked as keep forever' builds have a non-empty description and such. A dedicated plugin would have been a much more elegant solution.

One issue is the name though; Jenkins internally strips the 'Jenkins' prefix to a plugin name (and may soon do more) because so many plugins unnecessarily add that, so only 'Lint Plugin' would be left, which seems misleading. Can you think of another name?
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1861c0f5-73fd-4e69-bd08-3f75c24f2443%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Richard Bywater

unread,
Jul 6, 2015, 8:49:53 PM7/6/15
to jenkin...@googlegroups.com
It's up to Victor of course but perhaps Jenkins Job Lint Plugin as it would presumably come out as Job Lint Plugin which still fits?

Richard.

Victor Martinez

unread,
Jul 7, 2015, 3:25:20 AM7/7/15
to jenkin...@googlegroups.com
Thanks Daniel & Richard for that spot. I believe Jenkins Job Lint Plugin matches exactly what it does. I will rename it today. I'll will update those details later on. 

Thanks again

Kanstantsin Shautsou

unread,
Jul 7, 2015, 3:28:30 AM7/7/15
to jenkin...@googlegroups.com
So you doesn't want to do linting for non job functionality? Global/cloud configuration and etc?

Daniel Beck

unread,
Jul 7, 2015, 9:09:45 AM7/7/15
to jenkin...@googlegroups.com

On 07.07.2015, at 09:28, Kanstantsin Shautsou <kanstan...@gmail.com> wrote:

> So you doesn't want to do linting for non job functionality? Global/cloud configuration and etc?

A specific example would be the VersionColumn plugin functionality: Complain if not all slaves are on the current slave.jar version.

Victor Martinez

unread,
Jul 7, 2015, 1:18:47 PM7/7/15
to jenkin...@googlegroups.com
such a shame I cannot use Jenkins Lint, what about Jenkins Configuration Lint? Does it make sense?

Richard Bywater

unread,
Jul 7, 2015, 2:49:44 PM7/7/15
to jenkin...@googlegroups.com

Question for Daniel probably - does Jenkins get stripped at the end? For instance then it could be Configuration Lint for Jenkins.

Richard.


James Nord

unread,
Jul 7, 2015, 2:50:22 PM7/7/15
to jenkin...@googlegroups.com, Victor Martinez
If it just strips the leading jenkins can it be called jenkins jenkins lint plugin?


--
Sent from my phone.
Please excuse my brevity and any auto correct issues.

Daniel Beck

unread,
Jul 7, 2015, 3:17:27 PM7/7/15
to jenkin...@googlegroups.com

On 07.07.2015, at 20:50, James Nord <te...@teilo.net> wrote:

> If it just strips the leading jenkins can it be called jenkins jenkins lint plugin?

There's a proposal to strip trailing 'Plugin' as well, so it really should be the Jenkins Jenkins Lint Plugin Plugin.

Victor Martinez

unread,
Jul 7, 2015, 4:47:14 PM7/7/15
to jenkin...@googlegroups.com
I believe "Jenkins Jenkins Lint Plugin" is good enough, "plugin plugin" suffix is not necessary, since ir doesnt provide any further meaning . What do you think? Should i rename those references as "Jenkins Jenkins Lint Plugin"? What about the artifactid: "jenkins-jenkins-lint"?

Thanks

Ullrich Hafner

unread,
Jul 7, 2015, 5:00:26 PM7/7/15
to jenkin...@googlegroups.com
You don’t need to change the artifact ID.
(since we strip the string „Jenkins „ (space after Jenkins) the name JenkinsLint plugin would also work.)

> Am 07.07.2015 um 22:47 schrieb Victor Martinez <victormar...@gmail.com>:
>
> I believe "Jenkins Jenkins Lint Plugin" is good enough, "plugin plugin" suffix is not necessary, since ir doesnt provide any further meaning . What do you think? Should i rename those references as "Jenkins Jenkins Lint Plugin"? What about the artifactid: "jenkins-jenkins-lint"?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/39a27105-6efb-4bcc-952b-84dfc1a0ce50%40googlegroups.com.
signature.asc

Victor Martinez

unread,
Jul 7, 2015, 6:31:32 PM7/7/15
to jenkin...@googlegroups.com
Hi again,

 Finally I've changed those names as "JenkinsLint plugin". Thanks for that information Ullrich!  Please see the below information:
  • Github user: v1v
  • jenkins-ci.org: v2v
  • Description: Checks Jenkins Jobs for practices and behaviour that could potentially be improved.
Please let me know your thoughts and if I need to update anything else

Thanks again

Daniel Beck

unread,
Jul 7, 2015, 6:48:28 PM7/7/15
to jenkin...@googlegroups.com
Done: https://github.com/jenkinsci/jenkinslint-plugin

I also created the component 'jenkinslint-plugin' in Jira for you.

Welcome aboard!
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d9fc3124-f076-45b3-b20b-9c01eca23c92%40googlegroups.com.

Victor Martinez

unread,
Jul 12, 2015, 6:42:36 AM7/12/15
to jenkin...@googlegroups.com
Awesome!
Thanks so much. I will deploy this plugin shortly.

Cheers

Victor Martinez

unread,
Jul 12, 2015, 12:20:25 PM7/12/15
to jenkin...@googlegroups.com
Hi there,

I'm getting some errors when releasing this plugin since my github and jenkins-ci accounts are different (github: v1v, jenkins-ci: v2v)

Configured that ssh-add setup in order to allow different account names

/usr/bin/ssh-add -K ~/.ssh/v1v_rsa


And also ~/.m2/settings.xml to have my current v2v account and encripted password

I also added that public key (v1v.pub) in my jenkins-ci account 
 
Command:

mvn release:prepare release:perform


Console output: 

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy (default-deploy) on project jenkinslint: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:jenkinslint:hpi:0.1.0-20150712.160756-1 from/to maven.jenkins-ci.org (http://maven.jenkins-ci.org:8081/content/repositories/snapshots): Failed to transfer file: http://maven.jenkins-ci.org:8081/content/repositories/snapshots/org/jenkins-ci/plugins/jenkinslint/0.1.0-SNAPSHOT/jenkinslint-0.1.0-20150712.160756-1.hpi. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]


If I run those commands with the -X -e flags:

[INFO] Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.jenkins-ci.plugins:jenkinslint:hpi:0.1.0-20150712.161833-1 from/to maven.jenkins-ci.org (http://maven.jenkins-ci.org:8081/content/repositories/snapshots): Failed to transfer file: http://maven.jenkins-ci.org:8081/content/repositories/snapshots/org/jenkins-ci/plugins/jenkinslint/0.1.0-SNAPSHOT/jenkinslint-0.1.0-20150712.161833-1.hpi. Return code is: 401, ReasonPhrase: Unauthorized.

[INFO] at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)

[INFO] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)

[INFO] at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:274)

[INFO] at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)

[INFO] ... 25 more

[INFO] Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.jenkins-ci.org:8081/content/repositories/snapshots/org/jenkins-ci/plugins/jenkinslint/0.1.0-SNAPSHOT/jenkinslint-0.1.0-20150712.161833-1.hpi. Return code is: 401, ReasonPhrase: Unauthorized.

[INFO] at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:642)

[INFO] at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:557)

[INFO] at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:539)

[INFO] at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:533)

[INFO] at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:513)

[INFO] at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644)

[INFO] at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)

[INFO] at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410)

[INFO] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)

[INFO] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)

[INFO] ... 27 more

[INFO] [ERROR] 

[INFO] [ERROR] 

[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:

[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------


Any clues? 

Thanks

Victor Martinez

unread,
Jul 12, 2015, 12:43:14 PM7/12/15
to jenkin...@googlegroups.com
It looks like my current  PW encryption was incorrect  as the common issues section: https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins

I wrongly configured those settings.xml credentials based on mvn --encrypt-master-password

It's now solved!

Thanks
Reply all
Reply to author
Forward
0 new messages