Re: Automated Jenkins Plugin/Dependency Management

2016-10-14 Thread Maciej Wiczynski
So.. figures once I posted I found a possible solution.  If I set the 
group(via cookbook attribute) I get a build.gradle that seems to work, 
snippet of rebuild dependency: 
jenkinsPlugins([
group: 'com.sonyericsson.hudson.plugins.rebuild',
name: 'rebuild',
version: 'latest.release'
  ])

So I guess my question is, is there an easy way to find the group for all 
the plugins that don't use 'org.jenkins-ci.plugins'? I think I can look 
in https://updates.jenkins-ci.org/current/update-center.json and find the 
group for each plugin. If this isn't correct way to go about it I would 
appreciate tips on what I should be doing.
Thanks.
-Maciej


On Friday, October 14, 2016 at 4:03:17 PM UTC-4, Maciej Wiczynski wrote:
>
> I found this thread via 
> http://blog.thesparktree.com/post/149039600544/you-dont-know-jenkins-part-1. 
>  I'm new to gradle/jenkins and was trying to do something similar with my 
> setup.  I'm running into problem where some plugins are not found.  I'm not 
> sure how to find or specify where plugins can be found.. this is one error 
> I'm getting about rebuild plugin as example:
>  * What went wrong:
>A problem occurred configuring root project 'jenkins'.
>> Failed to notify project evaluation listener.
>   > Could not resolve all dependencies for configuration 
> ':jenkinsPlugins'.
>  > Could not find any matches for 
> org.jenkins-ci.plugins:rebuild:latest.release as no versions of 
> org.jenkins-ci.plugins:rebuild are available.
> Searched in the following locations:
> 
> http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> 
> http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/
> 
> https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/
> 
> file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> 
> file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/
> 
> https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> 
> https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/
> Required by:
> :jenkins:unspecified
>   > Could not resolve all dependencies for configuration 
> ':jenkinsPlugins'.
>  > Could not find any matches for 
> org.jenkins-ci.plugins:rebuild:latest.release as no versions of 
> org.jenkins-ci.plugins:rebuild are available.
> Searched in the following locations:
> 
> http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> 
> http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/
> 
> https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/
> 
> file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> 
> file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/
> 
> https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
> 
> https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/
>
> I looked in https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/ and 
> don't see rebuild plugin listed.
> I did find it in https://updates.jenkins-ci.org/current/update-center.json 
> but don't see how to set deps in build.gradle file.
> I have tried adding another maven url block under repositories block using 
> different urls, didn't work.  
>
> Thanks.
> -Maciej
>
> On Tuesday, August 30, 2016 at 12:12:27 PM UTC-4, Michael Kobit wrote:
>>
>> My fault explaining that
>>
>> I know that I can extract it using the *jar* command, but I don't get 
>> the same "unzipped" output as running *java -jar jenkins.war*.
>>
>> It looks like this happens because of some magic in 
>> https://github.com/jenkinsci/extras-executable-war that handles the 
>> unpacking and bootstrapping.
>>
>> I'm wondering, is there a similar way to unpack the *jenkins.war* without 
>> actually running the service, so that I can then programmatically configure 
>> the JENKINS_HOME.
>>
>> This might be the wrong approach or the totally wrong idea. I was 
>> probably going to move in the same direction that you said with using the 
>> https://github.com/jenkinsci/gradle-jpi-plugin to handle plugin 
>> dependency resolution, but plugins are not the

Re: Automated Jenkins Plugin/Dependency Management

2016-10-14 Thread Maciej Wiczynski
I found this thread via 
http://blog.thesparktree.com/post/149039600544/you-dont-know-jenkins-part-1. 
 I'm new to gradle/jenkins and was trying to do something similar with my 
setup.  I'm running into problem where some plugins are not found.  I'm not 
sure how to find or specify where plugins can be found.. this is one error 
I'm getting about rebuild plugin as example:
 * What went wrong:
   A problem occurred configuring root project 'jenkins'.
   > Failed to notify project evaluation listener.
  > Could not resolve all dependencies for configuration 
':jenkinsPlugins'.
 > Could not find any matches for 
org.jenkins-ci.plugins:rebuild:latest.release as no versions of 
org.jenkins-ci.plugins:rebuild are available.
Searched in the following locations:

http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/maven-metadata.xml

http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/

https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/

file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/maven-metadata.xml

file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/

https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/maven-metadata.xml

https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/
Required by:
:jenkins:unspecified
  > Could not resolve all dependencies for configuration 
':jenkinsPlugins'.
 > Could not find any matches for 
org.jenkins-ci.plugins:rebuild:latest.release as no versions of 
org.jenkins-ci.plugins:rebuild are available.
Searched in the following locations:

http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/maven-metadata.xml

http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/rebuild/

https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/maven-metadata.xml
https://repo1.maven.org/maven2/org/jenkins-ci/plugins/rebuild/

file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/maven-metadata.xml

file:/var/lib/jenkins/.m2/repository/org/jenkins-ci/plugins/rebuild/

https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/maven-metadata.xml

https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/rebuild/

I looked in 
https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/ and don't see 
rebuild plugin listed.
I did find it in https://updates.jenkins-ci.org/current/update-center.json 
but don't see how to set deps in build.gradle file.
I have tried adding another maven url block under repositories block using 
different urls, didn't work.  

Thanks.
-Maciej

On Tuesday, August 30, 2016 at 12:12:27 PM UTC-4, Michael Kobit wrote:
>
> My fault explaining that
>
> I know that I can extract it using the *jar* command, but I don't get the 
> same "unzipped" output as running *java -jar jenkins.war*.
>
> It looks like this happens because of some magic in 
> https://github.com/jenkinsci/extras-executable-war that handles the 
> unpacking and bootstrapping.
>
> I'm wondering, is there a similar way to unpack the *jenkins.war* without 
> actually running the service, so that I can then programmatically configure 
> the JENKINS_HOME.
>
> This might be the wrong approach or the totally wrong idea. I was probably 
> going to move in the same direction that you said with using the 
> https://github.com/jenkinsci/gradle-jpi-plugin to handle plugin 
> dependency resolution, but plugins are not the only thing I want to 
> configure. The Groovy init.d type scripts work, but it requires Jenkins to 
> hit a certain lifecycle stage to run.
>
> Jenkins just doesn't seem to lend itself well to configuration as code, 
> but maybe I'm missing something. 
>
> On Saturday, August 27, 2016 at 12:43:51 PM UTC-5, Jason Kulatunga wrote:
>>
>> Yep, the command is `jar xvf jenkins.war`, that will explode the war into 
>> the current directory. 
>>
>> On Friday, August 26, 2016 at 12:27:00 PM UTC-7, Michael Kobit wrote:
>>>
>>> Is there a way to basically "unzip" the *jenkins.war* so that the 
>>> plugins, workflow-libs, and other parts can be configured before actually 
>>> running the service?
>>>
>>> On Wednesday, August 17, 2016 at 9:36:08 AM UTC-5, Jason Kulatunga wrote:

 Hey,
 Thanks for all the help guys.
 I slept on this idea for a few days because, to be honest I really 
 didn't want to write my own package manager 
 
  and 
 re-invent the wheel. I took a step back and looked at how Jenkins solved 
 this problem for Plugin developers, and I think that we could just 
 piggy-back on