plugin to stop/start idle hosts

2018-12-18 Thread Brian C. Hill

Hello Jenkins Users,

I'm looking for a plugin to start/stop idle AWS jenkins worker node 
other than the EC2 plugin.


I do not want the hosts created or terminated via the plugin - just 
stopped and started as needed. The ec2-plugin doesn't seem to be able to 
work with already-existing nodes (unless I've really missed something).


It doesn't have to be an AWS-centric plugin, either. It could just allow 
me to supply scripts to handle the actual stops and starts based on demand.


Is there such a plugin, or does anyone have any suggestions?

Brian


--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/58875c32-170a-aea5-8134-485aa8cd90a7%40bch.net.
For more options, visit https://groups.google.com/d/optout.


Re: Usage of Jenkins shared library in Job DSL

2018-12-18 Thread treneva
Well, not exactly. I found a workaround by reworking the entire logic.

My landscape is: one master declarative pipeline kicks off multiple child 
pipeline jobs. 
Both the master and the child pipelines are instances created out of shared 
libraries (jobBuilder, pipelineBuilder) and I want to be able to run the 
child items as standalone pipelines (in isolation) as well as running them 
from master pipeline context (different params).

The child job's Jenkins file looks like this (the syntax is not declarative 
but scripted - the shared library is loaded on the first line):

library identifier: 
'templates@branches/rel/10.4.0.x/build/change-management/jenkinsfiles/templates',
 
retriever: modernSCM([$class: 'SubversionSCMSource', remoteBase: 'SVN', 
credentialsId: 'USER'])

stage('Run Test Suite') {
jobBuilder {
nodeLabels = 'linux'
antExtraArgs = 'test -Dtest.suite=com.pcbsys.suites.nJMS.PromotionTests'
jobTimeoutHours = 3
}
}


jobsdsl syntax was used only to create the actual Jenkins child pipeline:

script {
for (String jobName : allJobs) {
jobDsl scriptText: """

pipelineJob('${nirvanaMajor}.${nirvanaMinor}_${devJobPrefix}${jobName}') {
 parameters {
stringParam('branch','${svnBranch}','svn repository 
url')
stringParam('buildmajor',"${nirvanaMajor}",'release 
major identifier')
stringParam('buildminor',"${nirvanaMinor}",'release 
minor identifier')
stringParam('fix', '${env.fix}','fix level')
stringParam('buildnumber', 
'${env.buildNumber}','artifacts build number')
stringParam('revision', '${env.buildNumber}','checkout 
revision')
stringParam('parentjob', '${pipelineName}','optional 
parent job')
}
removedJobAction: 'IGNORE'
definition {
cpsScm {
scm {
svn {
location ('${svnBranch}/${jobName}') {
credentials('user')
}
}
}
scriptPath('Jenkinsfile') 
}
}
}
""".stripIndent()
}
}

On Monday, December 17, 2018 at 11:51:39 PM UTC+2, Philip Steiner wrote:
>
> Hi tre..., I know this thread is getting old, but did you ever get an 
> answer or figure out how to use a Jenkins Shared Library in the Job DSL 
> script, or some workaround?
>
> Thanks
> Philip
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/75affe01-2fb0-4766-9867-d1873d5048e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: plugin to stop/start idle hosts

2018-12-18 Thread Jan Monterrubio
We use the scriptler script plugin to run some groovy scripts that mark a
node offline, perform some action and then mark it online again. Would
something like that help stop/start or are you looking for something that
used the AWS apis to stop/start?

On Tue, Dec 18, 2018 at 02:56 Brian C. Hill  wrote:

> Hello Jenkins Users,
>
> I'm looking for a plugin to start/stop idle AWS jenkins worker node
> other than the EC2 plugin.
>
> I do not want the hosts created or terminated via the plugin - just
> stopped and started as needed. The ec2-plugin doesn't seem to be able to
> work with already-existing nodes (unless I've really missed something).
>
> It doesn't have to be an AWS-centric plugin, either. It could just allow
> me to supply scripts to handle the actual stops and starts based on demand.
>
> Is there such a plugin, or does anyone have any suggestions?
>
> Brian
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/58875c32-170a-aea5-8134-485aa8cd90a7%40bch.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9Kvr%3Dc4Kj2zit9hEjTF%2BSj%3D%2BwOR5RHiJo3A6j2nif1RKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


1 Jenkins_URL for HTTP/HTTPS, 1 Jenkins_URL for Slaves. AWS/ECS

2018-12-18 Thread Justin Seiser
I have Jenkins Master running as a container in AWS ECS, with its file 
share mounted on an EFS volume.  I use the EC2 Plugin to deploy dynamic 
slaves in peered VPC's.  Everything is using an internal ELB with portls 
80/443/5 to allow access from the web browser as well as slave 
communication.  This setup works fine, except since I have to hardcode the 
host port, I can only run 1 Jenkins Master at a time.  

I would like to migrate to using a dynamic host port, which would require 
me to also use an Application Load Balancer for the HTTP/HTTPS 
configuration.  The ALB does not support anything else, so I would then 
need something like a network load balancer to send 5 traffic to the 
master.  I could configure both of these, and configure DNS to match, the 
problem is I am not sure how to tell the EC2 Plugin, to inform the clients 
to communicate through jenkins.nlb.whatever.com.  So They are using the 
Network Load Balancer instead of trying to hit the normal Jenkins_URL which 
would only handle HTTP/HTTPS.  

Anyone dealing with anything similar?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/aed80a0e-aebe-46c7-b6a4-5ce3c455a767%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why does it running on another node?

2018-12-18 Thread Eric Pyle

Help for the Usage setting (in node configuration page) says:

*Only build jobs with label expressions matching this node*
   In this mode, Jenkins will only build a project on this node when
   that project is restricted to certain nodes using a label
   expression, and that expression matches this node's name and/or labels.

So I read that as saying that a job which is not restricted to certain 
nodes or labels will not run on a node which requires "Only build jobs 
with label expressions matching this node".


-Eric

On 12/18/2018 12:12 AM, cyrilli1...@gmail.com wrote:
If this node used "Only build jobs with label restrictions matching 
this node." option, so a job of don't restrict the job does it still 
picking up this node?


在 2018年12月17日星期一 UTC+8下午10:37:58,Eric Pyle写道:

If you don't restrict the job, it will pick one of the available
nodes arbitrarily, and it doesn't matter whether it is the master
or a slave/agent. Once the job has run on a particular node, it
will remain there unless that node is unavailable at the time the
job starts. This is done to take advantage of any dependencies or
resources that may already be there from a previous run.

Generally, it is considered better to have jobs run on agents, and
let the master node just run Jenkins.

Regards,
Eric

On 12/17/2018 3:54 AM, cyril...@gmail.com  wrote:

I have a job it's doesn't use "Restrict where this project can be
run" option, why doesn't it running on a master node, but running
on a slave node?


Jenkins ver. 1.625.1

Could you help me to know?
-- 
You received this message because you are subscribed to the

Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to jenkinsci-use...@googlegroups.com .
To view this discussion on the web visit

https://groups.google.com/d/msgid/jenkinsci-users/1078c386-120f-40cc-b758-adbf1aa925aa%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout
.


-- 
Eric Pyle

Siemens PLM Software
Lebanon, NH
+1 603-277-3060
eric...@siemens.com  
http://www.siemens.com/plm

--
You received this message because you are subscribed to the Google 
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jenkinsci-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8872918d-a1cf-44c3-bea7-32900c9b0173%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060
eric.p...@siemens.com
http://www.siemens.com/plm

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c82f382c-0726-0c54-5636-9cf87b1153cc%40siemens.com.
For more options, visit https://groups.google.com/d/optout.


Re: Usage of Jenkins shared library in Job DSL

2018-12-18 Thread Philip Steiner
Thanks for the detailed followup! Lots to digest. It looks like you were 
having trouble accessing the Shared Library from generated pipeline 
scripts, which is a little different from my problem: I want to reference 
YAML data files stored in the Jenkins Shared Library from inside a Job DSL 
script, but now it appears that's not possible (at least I don't see 
anything like @Library for the Job DSL API), so I think I also need to 
rework the overall logic for my build environment. 

On Tuesday, December 18, 2018 at 4:27:57 AM UTC-8, tre...@gmail.com wrote:
>
> Well, not exactly. I found a workaround by reworking the entire logic.
>
> My landscape is: one master declarative pipeline kicks off multiple child 
> pipeline jobs. 
> Both the master and the child pipelines are instances created out of 
> shared libraries (jobBuilder, pipelineBuilder) and I want to be able to run 
> the child items as standalone pipelines (in isolation) as well as running 
> them from master pipeline context (different params).
>
> The child job's Jenkins file looks like this (the syntax is not 
> declarative but scripted - the shared library is loaded on the first line):
>
> library identifier: 
> 'templates@branches/rel/10.4.0.x/build/change-management/jenkinsfiles/templates',
>  
> retriever: modernSCM([$class: 'SubversionSCMSource', remoteBase: 'SVN', 
> credentialsId: 'USER'])
>
> stage('Run Test Suite') {
> jobBuilder {
> nodeLabels = 'linux'
> antExtraArgs = 'test -Dtest.suite=com.pcbsys.suites.nJMS.PromotionTests'
> jobTimeoutHours = 3
> }
> }
>
>
> jobsdsl syntax was used only to create the actual Jenkins child pipeline:
>
> script {
> for (String jobName : allJobs) {
> jobDsl scriptText: """
> 
> pipelineJob('${nirvanaMajor}.${nirvanaMinor}_${devJobPrefix}${jobName}') {
>  parameters {
> stringParam('branch','${svnBranch}','svn repository 
> url')
> stringParam('buildmajor',"${nirvanaMajor}",'release 
> major identifier')
> stringParam('buildminor',"${nirvanaMinor}",'release 
> minor identifier')
> stringParam('fix', '${env.fix}','fix level')
> stringParam('buildnumber', 
> '${env.buildNumber}','artifacts build number')
> stringParam('revision', '${env.buildNumber}','checkout 
> revision')
> stringParam('parentjob', '${pipelineName}','optional 
> parent job')
> }
> removedJobAction: 'IGNORE'
> definition {
> cpsScm {
> scm {
> svn {
> location ('${svnBranch}/${jobName}') {
> credentials('user')
> }
> }
> }
> scriptPath('Jenkinsfile') 
> }
> }
> }
> """.stripIndent()
> }
> }
>
> On Monday, December 17, 2018 at 11:51:39 PM UTC+2, Philip Steiner wrote:
>>
>> Hi tre..., I know this thread is getting old, but did you ever get an 
>> answer or figure out how to use a Jenkins Shared Library in the Job DSL 
>> script, or some workaround?
>>
>> Thanks
>> Philip
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8b6b6b48-7a95-43a3-9cfc-112c51ead9f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Install specific version of plugins with Groovy script

2018-12-18 Thread Phillip Dudley
Love these answers that aren't finished. 

Victor Martinez, do you have an example of what you're talking about? 

On Friday, April 20, 2018 at 4:43:24 PM UTC-5, geoffroy...@gmail.com wrote:
>
> Hello
> just in case, could someone share a groovy sample script to achieve this?
> I guess you have to download .jpi file into /plugins folder (also handling 
> dependencies...), then restart jenkins?
> I had written that in shell (ugly but working), but still learning in 
> Groovy!
> Thanks in advance
>
>
> On Thursday, 27 October 2016 11:28:19 UTC+2, Daniel Beck wrote:
>>
>>
>> > On 28.04.2016, at 11:38, Alexandre Chaussier  
>> wrote: 
>> > 
>> > All is OK if I want to use latest versions of plugins, but I would like 
>> to know if it is possible to request a specific version of the plugins when 
>> I request installation from my groovy code ? 
>> > 
>> > I use the UpdateCenter.getPlugin() method but I don't see where I can 
>> add this constraint. 
>>
>> Update center based installation can only install the one version defined 
>> in the update site. 
>>
>> You need to go with URL based installation for specific versions. 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c0a9cb82-a524-40f1-9f1f-c95fc43c1dfa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins as a render farm

2018-12-18 Thread 'Mark Raynsford' via Jenkins Users
Hello!

I've been using Jenkins to build code from hundreds of git repositories
using declarative pipelines. In the setup I'm using, I have a small
number of nodes, and all nodes must successfully build and run all
tests in order for the job as a whole to have been considered
successful.

I'd now like to try using Jenkins to render animations using Blender[0].

The problem that I'm actually trying to solve is that Blender (like all
3D renderers) generally takes a long time to render images. When
rendering an animation, each frame is rendered individually and saved
to a PNG file. When all frames have been rendered, the PNG files can be
stitched together with something like ffmpeg to produce a video file.
Given that there's no data dependency between frames, it's possible to
distribute the workload over many machines by giving each machine a set
of frame numbers to render and then collecting the images from all
machines when they've all finished rendering.

Blender has a full command-line interface, so the 'sh' declaration
in the pipelines will be enough to launch instances of Blender for
rendering. I can place the data to be rendered in a Git repository so
that all nodes can pull from that repository to start building. I would
include a pipeline script in the repository that each node can use to
build. This is how I've been handling building code, and it's been
working very well.

The problem: It's not clear to me how I could assign a set of frame
numbers to each node in the pipeline. I could hard code the numbers
into something that the pipeline code reads in the first stage of
building, but it seems like to do that effectively, I'd need to know
all of the nodes ahead of time (meaning I'd have to rewrite the data if
I add or remove a node later).

What I would really like is for the pipeline in each node to be told
"You are node 1 of 4" "You are node 3 of 4", and so on. Node 3 could
then, for example, use this information to tell Blender "Start
rendering at frame 3, and step forward by 4 frames each time" (4
because there are 4 nodes in total). If each node did this, the entire
range of frames would be covered and the work would be split equally
between the four nodes. The nodes I have are homogeneous, so there's no
need to try to give powerful nodes more work, and weaker nodes less.

Any advice would be appreciated!

[0] https://www.blender.org/

-- 
Mark Raynsford | http://www.io7m.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/20181218205530.767b8097%40almond.int.arc7.info.
For more options, visit https://groups.google.com/d/optout.


pgpXUFo0WVzMG.pgp
Description: OpenPGP digital signature


Re: Jenkins as a render farm

2018-12-18 Thread Slide
I think would be "easy" in a scripted pipeline compared to a declarative
pipeline. The reason I say that is because you can use loops directly in
your pipeline, so if you knew the number of frames, you could iterate over
the number of frames with 4 as an increment and create parallel steps for
each iteration (https://jenkins.io/doc/pipeline/examples/#parallel-from-list).
You'd use the iterator variable as the start index and the increment as the
number of frames. You could then even make the number of frames a parameter
to your job. I am not sure how this could be done with declarative, I am
still new to using declarative.

On Tue, Dec 18, 2018 at 1:56 PM 'Mark Raynsford' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Hello!
>
> I've been using Jenkins to build code from hundreds of git repositories
> using declarative pipelines. In the setup I'm using, I have a small
> number of nodes, and all nodes must successfully build and run all
> tests in order for the job as a whole to have been considered
> successful.
>
> I'd now like to try using Jenkins to render animations using Blender[0].
>
> The problem that I'm actually trying to solve is that Blender (like all
> 3D renderers) generally takes a long time to render images. When
> rendering an animation, each frame is rendered individually and saved
> to a PNG file. When all frames have been rendered, the PNG files can be
> stitched together with something like ffmpeg to produce a video file.
> Given that there's no data dependency between frames, it's possible to
> distribute the workload over many machines by giving each machine a set
> of frame numbers to render and then collecting the images from all
> machines when they've all finished rendering.
>
> Blender has a full command-line interface, so the 'sh' declaration
> in the pipelines will be enough to launch instances of Blender for
> rendering. I can place the data to be rendered in a Git repository so
> that all nodes can pull from that repository to start building. I would
> include a pipeline script in the repository that each node can use to
> build. This is how I've been handling building code, and it's been
> working very well.
>
> The problem: It's not clear to me how I could assign a set of frame
> numbers to each node in the pipeline. I could hard code the numbers
> into something that the pipeline code reads in the first stage of
> building, but it seems like to do that effectively, I'd need to know
> all of the nodes ahead of time (meaning I'd have to rewrite the data if
> I add or remove a node later).
>
> What I would really like is for the pipeline in each node to be told
> "You are node 1 of 4" "You are node 3 of 4", and so on. Node 3 could
> then, for example, use this information to tell Blender "Start
> rendering at frame 3, and step forward by 4 frames each time" (4
> because there are 4 nodes in total). If each node did this, the entire
> range of frames would be covered and the work would be split equally
> between the four nodes. The nodes I have are homogeneous, so there's no
> need to try to give powerful nodes more work, and weaker nodes less.
>
> Any advice would be appreciated!
>
> [0] https://www.blender.org/
>
> --
> Mark Raynsford | http://www.io7m.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/20181218205530.767b8097%40almond.int.arc7.info
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Website: http://earl-of-code.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVdbvm8oz%2BWt5k1KuJtKcH8J3LfFw2q5Hd0bXr20rXt4zA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to configure GitHub Organizaiton Item/Job via Groovy

2018-12-18 Thread Phillip Dudley
What I ended up doing is using what I had previously to setup Jenkins, 
login, and install the Job Configuration History plugin, and got the output 
of the config.xml. For whatever reason, doing the 
http://JENKINSURL:8080/job/NAME/config.xml would just result in a blank 
page, and not actually show the configuration of the GitHub Source Branch 
job. 

However, I noticed that the config is tied very specifically to specific 
versions of Plugins. I can install plugins, but if those change, then they 
break my job.

/**
 * activatePlugin activates given plugins.
 * The plugin parameter is a pluginManager object(?)
 * 
 * @param plugin [Object]
 * 
 * @return nil 
 */
def activatePlugin(plugin) {
  // If our specified plugin isn't enabled, enable it.
  if (! plugin.isEnabled()) {
plugin.enable()
// Set our state to true.
deployed = true
  }
  // Go through each dependency of our plugins, and enable those.
  // Otherwise our plugins wouldn't work even if they're installed.
  plugin.getDependencies().each {
activatePlugin(pluginManager.getPlugin(it.shortName))
  }
}

// As of 2018-12-18
def plugin_list = [
  "ant:1.9",
  "build-timeout:1.19",
  "email-ext:2.63",
  "github-branch-source:2.4.1",
  "gradle:1.29",
  "ldap:1.20",
  "matrix-auth:2.3",
  "antisamy-markup-formatter:1.5",
  "pam-auth:1.4",
  "pipeline:2.6",
  "pipeline-github-lib:1.0",
  "ssh-slaves:1.29.1",
  "subversion:2.12.1",
  "timestamper:1.8.10",
  "ws-cleanup:0.37",
]

// Loop through all of the plugins and install/update and activate them.
plugin_list.each { plugin ->
  // If the plugin isn't being installed, update it.
  if (! pluginManager.getPlugin(plugin)) {
deployment = updateCenter.getPlugin(plugin).deploy(true)
deployment.get()
  }
  // Activate the plugin and all of its dependencies.
  activatePlugin(pluginManager.getPlugin(plugin))
}

However, there is an overloaded method in the updateCenter called 
getPlugin(String name, and VersionNumber version)


   - 
   
https://javadoc.jenkins.io/hudson/model/UpdateCenter.html#getPlugin-java.lang.String-hudson.util.VersionNumber-

I'm not sure where to find the VersionNumber or how to get that to give to 
this method. 

On Friday, December 14, 2018 at 3:46:05 PM UTC-6, Phillip Dudley wrote:
>
> Would anyone have any pointers to configuring the GitHub Organization 
> Item/Job with Groovy so that when my Jenkins instance starts up, it reads 
> the 
>
> $JENKINS_HOME/init.groovy.d/
>
> folder and configures a default job to perform GitHub Organization 
> scanning for Jenkinsfiles? 
>
> I've got most of the other stuff I need such as setting banners, 
> installing plugins, configuring default Jenkins users and assigning them 
> permissions via the matrix-auth plugin. Even finally hooked up to LDAP and 
> I can authenticate. However, I don't seem to find too much on configuring 
> that plugin except through the UI. Most of my Googling returns results for 
> using Jenkinsfiles, or Groovy tutorials, but not actually setting up and 
> configuring that plugin. 
>
> TL;DR,
> Looking for a direction to learn how to configure the GitHub Organization 
> job to scan my GitHub Organization for Jenkinsfiles and start performing 
> Jobs. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cba85d73-2f8c-4c71-8063-90afbec219c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Jenkins server and BlueOcean won't load

2018-12-18 Thread MDKF
When Jenkins installed, it installed some, but not all of the required 
BlueOcean plugins, hence the failure to load.

On Tuesday, December 11, 2018 at 11:42:01 AM UTC-5, MDKF wrote:
>
> It doesn't open in any browser.
>
> On Tuesday, December 11, 2018 at 5:00:02 AM UTC-5, Pranav Kv wrote:
>>
>> Remove cache in ur browser and try.. Hope, that will be resolve issues. 
>>
>> Pranav KV
>>
>> On Tue, 11 Dec 2018, 1:09 am MDKF >
>>> HI,
>>>  I just setup a new Jenkins instance and installed BlueOcean. Jenkins 
>>> works fine, but when clicking any link into BlueOcean, the blue progress 
>>> bar moves most of the way, but the page never loads. There are no errors in 
>>> jenkins.log. How do I debug this?
>>> -Michael
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/d57df22a-d1a5-41a3-852e-b31994502c11%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b4a41bfa-3e54-4172-861b-3977580fb923%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins as a render farm

2018-12-18 Thread 'Mark Raynsford' via Jenkins Users
On 2018-12-18T14:01:09 -0700
Slide  wrote:

> I think would be "easy" in a scripted pipeline compared to a declarative
> pipeline. The reason I say that is because you can use loops directly in
> your pipeline, so if you knew the number of frames, you could iterate over
> the number of frames with 4 as an increment and create parallel steps for
> each iteration (https://jenkins.io/doc/pipeline/examples/#parallel-from-list).
> You'd use the iterator variable as the start index and the increment as the
> number of frames. You could then even make the number of frames a parameter
> to your job. I am not sure how this could be done with declarative, I am
> still new to using declarative.

I see, thanks! I'll keep it in mind.

I would probably want it the other way around though: The increment of
4 is derived from the number of nodes, and therefore I'd want this to
be determined at build-time so that I can easily add more nodes
later. The total number of frames that need to be rendered is
effectively constant; it's part of the data in the repository.

-- 
Mark Raynsford | http://www.io7m.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/20181218212557.5a66ab12%40almond.int.arc7.info.
For more options, visit https://groups.google.com/d/optout.


pgpnbroHnWqVR.pgp
Description: OpenPGP digital signature


Re: Jenkins as a render farm

2018-12-18 Thread Slide
I'm not sure you can get the number of nodes that match a label, that might
be an interesting step to add though.

On Tue, Dec 18, 2018, 14:26 Mark Raynsford 
wrote:

> On 2018-12-18T14:01:09 -0700
> Slide  wrote:
>
> > I think would be "easy" in a scripted pipeline compared to a declarative
> > pipeline. The reason I say that is because you can use loops directly in
> > your pipeline, so if you knew the number of frames, you could iterate
> over
> > the number of frames with 4 as an increment and create parallel steps for
> > each iteration (
> https://jenkins.io/doc/pipeline/examples/#parallel-from-list).
> > You'd use the iterator variable as the start index and the increment as
> the
> > number of frames. You could then even make the number of frames a
> parameter
> > to your job. I am not sure how this could be done with declarative, I am
> > still new to using declarative.
>
> I see, thanks! I'll keep it in mind.
>
> I would probably want it the other way around though: The increment of
> 4 is derived from the number of nodes, and therefore I'd want this to
> be determined at build-time so that I can easily add more nodes
> later. The total number of frames that need to be rendered is
> effectively constant; it's part of the data in the repository.
>
> --
> Mark Raynsford | http://www.io7m.com
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVd_Fxog8yGSpYY7-eQOQdX%3DA9up11%3DZAX5cyj-Xs_M3xQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

2018-12-18 Thread 'Yash Dabhi' via Jenkins Users
Thanks Mark,

I was able to find the root cause. I had root access issue on the server 
when job triggers the build and new folder didn't have write access to 
clone the repo. 

Thanks again for the help!

Thanks,
Yash

On Monday, December 17, 2018 at 3:25:15 PM UTC-5, Mark Waite wrote:
>
> You might check that the job definition was not changed recently.  If that 
> shows nothing of interest, you could login to the workspace last used for 
> the clone and perform the same commands in that clone.  That may help 
> identify what is failing.
>
> On Mon, Dec 17, 2018 at 1:11 PM 'Yash Dabhi' via Jenkins Users <
> jenkins...@googlegroups.com > wrote:
>
>> Hi Mark,
>>
>> Thanks for the reply. 
>>
>> I tried cloning the branch in my local and it clones fine. Branch exists 
>> and able to commit as well. Not sure why it stopped working suddenly. 
>>
>> Thanks,
>> Yash
>>
>> On Monday, December 17, 2018 at 2:40:41 PM UTC-5, Mark Waite wrote:
>>>
>>> That seems to indicate that you previously had a branch named '9' and 
>>> now the branch named '9' no longer exists.
>>>
>>> Mark Waite
>>>
>>> On Mon, Dec 17, 2018 at 11:32 AM 'Yash Dabhi' via Jenkins Users <
>>> jenkins...@googlegroups.com> wrote:
>>>
 Hi all,

 when I am trying to run job getting below error. Getting this while 
 checking out the source code.

 It happened all of sudden. I was working fine with the same 
 configuration. 

 Please advise what can be done. 

 > git fetch --tags ssh://${git_url}.git CICD
  > git rev-parse refs/remotes/origin/9^{commit} # timeout=10
  > git rev-parse refs/remotes/origin/origin/9^{commit} # timeout=10
  > git rev-parse origin/9^{commit} # timeout=10ERROR: Couldn't find any 
 revision to build. Verify the repository and branch configuration for this 
 job.An attempt to send an e-mail to empty list of recipients, ignored.
 [BFA] Scanning build for known causes...
 [BFA] Found failure cause(s):
 [BFA] GIT Revision Error from category SCM
 [BFA] Done. 0s



 Thank you!


 -- 
 You received this message because you are subscribed to the Google 
 Groups "Jenkins Users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to jenkinsci-use...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/68dc0a47-6c28-4027-8fa2-ed6c3e6a5492%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> -- 
>>> Thanks!
>>> Mark Waite
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/a02980bc-c27f-4515-bd65-d9405af2b3e4%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Thanks!
> Mark Waite
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6c6a617d-8b35-4432-bba9-fcd28a3298a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to configure GitHub Organizaiton Item/Job via Groovy

2018-12-18 Thread Phillip Dudley
Well, now I don't know why my script isn't working. I had to modify it to 
remove the version numbers, just to get the thing to work. The blog, 
https://qiita.com/aespinosa/items/5d791310f0cb436eb71f works if I copy and 
paste their example,

import jenkins.model.Jenkins;

pm = Jenkins.instance.pluginManager

uc = Jenkins.instance.updateCenter
pm.plugins.each { plugin ->
plugin.disable()
}

deployed = false
def activatePlugin(plugin) {
if (! plugin.isEnabled()) {
  plugin.enable()
  deployed = true
}

plugin.getDependencies().each {
  activatePlugin(pm.getPlugin(it.shortName))
}
}

["git", "workflow-aggregator", "github-oauth", "job-dsl", 
"extended-read-permission"].each {
if (! pm.getPlugin(it)) {
  deployment = uc.getPlugin(it).deploy(true)
  deployment.get()
}
activatePlugin(pm.getPlugin(it))
}

if (deployed) {
Jenkins.instance.restart()
}


but as soon as I add my own Array, I get a nullpointerexception saying that 
it can't call deploy() with null objects.

import jenkins.model.Jenkins;

pm = Jenkins.instance.pluginManager

uc = Jenkins.instance.updateCenter
pm.plugins.each { plugin ->
  plugin.disable()
}

deployed = false
/**
 *
 */
def activatePlugin(plugin) {
  if (! plugin.isEnabled()) {
plugin.enable()
  deployed = true
  }

  plugin.getDependencies().each {
activatePlugin(pm.getPlugin(it.shortName))
  }
}

/** this works.
[
  "git", 
  "workflow-aggregator", 
  "github-oauth", 
  "job-dsl", 
  "extended-read-permission"
].each {
  if (! pm.getPlugin(it)) {
deployment = uc.getPlugin(it).deploy(true)
  deployment.get()
  }
  activatePlugin(pm.getPlugin(it))
}
*/

[
  "ant",
  "build-timeout",
  "credentials",
  "email-ext",
  "github-branch-source:",
  "gradle",
  "jobConfigHistory",
  "ldap",
  "matrix-auth",
  "antisamy-markup-formatter",
  "pam-auth",
  "pipeline",
  "pipeline-github-lib",
  "ssh-slaves",
  "subversion",
  "timestamper",
  "ws-cleanup"
].each {
  if (! pm.getPlugin(it)) {
deployment = uc.getPlugin(it).deploy(true)
  deployment.get()
  }
  activatePlugin(pm.getPlugin(it))
}

Currently, it makes no sense. To me those are structured the same, but the 
second array doesn't work. 

On Tuesday, December 18, 2018 at 3:21:52 PM UTC-6, Phillip Dudley wrote:
>
> What I ended up doing is using what I had previously to setup Jenkins, 
> login, and install the Job Configuration History plugin, and got the output 
> of the config.xml. For whatever reason, doing the 
> http://JENKINSURL:8080/job/NAME/config.xml would just result in a blank 
> page, and not actually show the configuration of the GitHub Source Branch 
> job. 
>
> However, I noticed that the config is tied very specifically to specific 
> versions of Plugins. I can install plugins, but if those change, then they 
> break my job.
>
> /**
>  * activatePlugin activates given plugins.
>  * The plugin parameter is a pluginManager object(?)
>  * 
>  * @param plugin [Object]
>  * 
>  * @return nil 
>  */
> def activatePlugin(plugin) {
>   // If our specified plugin isn't enabled, enable it.
>   if (! plugin.isEnabled()) {
> plugin.enable()
> // Set our state to true.
> deployed = true
>   }
>   // Go through each dependency of our plugins, and enable those.
>   // Otherwise our plugins wouldn't work even if they're installed.
>   plugin.getDependencies().each {
> activatePlugin(pluginManager.getPlugin(it.shortName))
>   }
> }
>
> // As of 2018-12-18
> def plugin_list = [
>   "ant:1.9",
>   "build-timeout:1.19",
>   "email-ext:2.63",
>   "github-branch-source:2.4.1",
>   "gradle:1.29",
>   "ldap:1.20",
>   "matrix-auth:2.3",
>   "antisamy-markup-formatter:1.5",
>   "pam-auth:1.4",
>   "pipeline:2.6",
>   "pipeline-github-lib:1.0",
>   "ssh-slaves:1.29.1",
>   "subversion:2.12.1",
>   "timestamper:1.8.10",
>   "ws-cleanup:0.37",
> ]
>
> // Loop through all of the plugins and install/update and activate them.
> plugin_list.each { plugin ->
>   // If the plugin isn't being installed, update it.
>   if (! pluginManager.getPlugin(plugin)) {
> deployment = updateCenter.getPlugin(plugin).deploy(true)
> deployment.get()
>   }
>   // Activate the plugin and all of its dependencies.
>   activatePlugin(pluginManager.getPlugin(plugin))
> }
>
> However, there is an overloaded method in the updateCenter called 
> getPlugin(String name, and VersionNumber version)
>
>
>- 
>
> https://javadoc.jenkins.io/hudson/model/UpdateCenter.html#getPlugin-java.lang.String-hudson.util.VersionNumber-
>
> I'm not sure where to find the VersionNumber or how to get that to give to 
> this method. 
>
> On Friday, December 14, 2018 at 3:46:05 PM UTC-6, Phillip Dudley wrote:
>>
>> Would anyone have any pointers to configuring the GitHub Organization 
>> Item/Job with Groovy so that when my Jenkins instance starts up, it reads 
>> the 
>>
>> $JENKINS_HOME/init.groovy.d/
>>
>> folder and configures a default job to perform GitHub Organization 
>> scanning for Jenkinsfiles? 
>>
>> I've got most of the other stuff I

Create .ipa and .apk file in Mac with Jenkins MsBuild, Xcode and nuget

2018-12-18 Thread Pradeep Drall
Hi, 

I would like create .ipa and .apk file in Mac with Jenkins agent, MsBuild, 
Xcode and nuget. I created the build with MsBuild and nuget plugin from 
Jenkins agent in Mac machine but not getting .ipa and .apk file there. I 
also installed Xcode integration plugin. I installed Xcode10 version in Mac 
machine. 

Please do let me know how to create .ipa and .apk file and archive the same 
in Mac server for mobile application. 

Regards,
Pradeep

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c4129f24-0c8f-4109-8b3d-6906c72f162d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.