upstream() method pointing to all branches of a job

2017-09-16 Thread red 888
I've seen a few examples of ways to trigger a pipeline when an upstream job 
is updated:

triggers {
  upstream(upstreamProjects: "/myjob/mybranch", threshold: hudson.model.
Result.SUCCESS)
}


properties([
pipelineTriggers([
upstream(
upstreamProjects: '/myjob/mybranch',
threshold: hudson.model.Result.SUCCESS,
),
]),
])


But, is there a way trigger on all of an upstream job's branches? Like it 
just looks at the whole job instead of just one branch, and then triggers 
if any of its branches are updated. Also, for this to be useful to me, if 
its even possible, I would also need a way of getting the name of each 
branch that triggered the downstream job.

-- 
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/bd271f63-f549-4f65-aa22-bb0718a87bd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: All jobs run when shared library is updated

2017-09-16 Thread red 888
Yes I agree that ideally the jenkinsfile code would be delivered in tandem 
with the actually applications code- sadly that is not often the case if 
ever.
But, I guess i stupidly misunderstood what "*Ignore on push notifications*" 
actually was. I thought it only ignored push notifications, and assumed 
because Im polling that was not relevant? I guess that means it won't push 
out the deploy if the SCM (polling or pushed to) notices there is a change? 

On Friday, September 15, 2017 at 5:52:12 PM UTC-4, red 888 wrote:
>
> I have my whole pipeline block of code defined in a shared library and my 
> jenkinsfiles for my apps just call this shared library.
>
> I noticed though that when I modify the shared library and push to the git 
> repo ALL the jenkins jobs that depend on this library re-run.
>
> How can I prevent this from happening? I dont want all the jobs that 
> depend on this shared library to re-run whenever there is a change made to 
> it. I know this could technically be a good thing, but for now I want to 
> disable this.
>

-- 
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/1f34da62-1124-41ad-9220-443f2286c93f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: All jobs run when shared library is updated

2017-09-16 Thread Mark Waite
On Sat, Sep 16, 2017 at 1:21 AM red 888  wrote:

> I suppose I want to have my cake and eat it too
>
> Just to be clear, I have my pipeline block,settings,options,stages,etc
> centralized in a shared Library and all my apps' jenkinsfiles just make a
> parameterized method call to it. This is awesome but now i need to figure
> out a development workflow for it that is also awesome.
>
> I'm polling, not push notifications. Is there a way to have the Jenkins
> server pull the repo,  keep the shared Lib up-to-date but not trigger all
> of the Jenkins jobs that rely on it immediately- does the load implicitly
> feature impact this?
>
>
What if you used a feature branch for pipeline development, then released
to users by merging less frequently from your feature branch to your master
branch on your pipeline library?

I'm pushing the concept that since a change to your pipeline library is a
change to the code you're delivering, it should be treated as a change to
all the consumers of that code.

If that won't work for you, have you tried adding the "*Ignore on push
notifications*" additional behavior in the definition of your implicitly
loaded pipeline library?

Mark Waite


> On Sep 15, 2017 8:34 PM, "Mark Waite"  wrote:
>
>> One way to disable it is to redefine your library references so that each
>> Jenkinsfile refers to a specific version in the pipeline shared library.
>> That has the additional benefit that it makes explicit what you have
>> decided implicitly, that you want to ignore changes in the pipeline shared
>> library.
>>
>> When you're ready to allow branches to see a change in the pipeline
>> shared library (because it might risk breaking those branches, etc.), you
>> update the Jenkinsfile to use the newest version of the pipeline shared
>> library.
>>
>> There are also settings which should allow the pipeline shared library to
>> ignore push notifications, but it seems cleaner and clearer to state in
>> your Jenkinsfile (or in the folder) the specific version of the pipeline
>> shared library that you want to use.
>>
>> Mark Waite
>>
>> On Fri, Sep 15, 2017 at 3:52 PM red 888  wrote:
>>
>>> I have my whole pipeline block of code defined in a shared library and
>>> my jenkinsfiles for my apps just call this shared library.
>>>
>>> I noticed though that when I modify the shared library and push to the
>>> git repo ALL the jenkins jobs that depend on this library re-run.
>>>
>>> How can I prevent this from happening? I dont want all the jobs that
>>> depend on this shared library to re-run whenever there is a change made to
>>> it. I know this could technically be a good thing, but for now I want to
>>> disable this.
>>>
>>> --
>>> 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/5f3d6c01-b693-4c5e-b441-9f1688a05b2a%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>>
> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jenkinsci-users/mkjelSUQCoU/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, 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/CAO49JtGdDW7SA0CqYg5s%3DMJH8Y8psOZUj%3DALh3nKG7PkKy36qA%40mail.gmail.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/CANLFi7ppK-dFgK9vMrZjNcFis38NqLmpHnpw_bb4OzaF1%3DaFPA%40mail.gmail.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 

Re: Have a job run for each branch of a shared library repo

2017-09-16 Thread Mark Waite
You might consider JenkinsPipelineUnit (refer to
https://issues.jenkins-ci.org/browse/JENKINS-33925 for comparisons of
various alternatives for automated testing of pipeline scripts).

If that doesn't meet your needs, could you create a test repository with
one branch per test scenario, then have it use your pipeline shared library
for its tests?  A multi-branch pipeline would then monitor all the branches
in that repository and report failures for the behaviors you're checking
that are related to that specific run.

Mark Waite

On Sat, Sep 16, 2017 at 2:06 AM red 888  wrote:

> Need to have a good dev workflow for developing share libraries my jobs
> depend on.
>
> Right now when a shared Lib is edited all jobs depending on it
> automatically run. I want to control and test this code somewhat like I do
> with regular apps with Jenkins.
>
> I don't want to have to manually point my jobs to specific versions
> (branches) of my shared Lib repo to test it and them have to point them
> back.
>
> I have an idea but not sure it is supported or too nutty.
>
> Can I have jobs automatically scan and execute once for each branch of
> each shared Lib repo? Just Like multibranch pipelines but the branches they
> track are from the shared libraries they import? Because this is my plan:
>
> * Create a test job for each language/platform I currently deploy with
> Jenkins. These jobs are designed expressly to mirror my real apps and do
> test runs of my shared libs for all my platforms without impacting my prod
> apps/jobs
> * These test jobs don't point to specific shared library branches
> (versions) but track ALL of there shared lib branches
> * when we branch one of the shared lib repos and commit our changes to our
> individual test/feature/hotfix branches all the test jobs execute for each
> of our branches.
> * We don't step on each other and can work in parallel because each branch
> gets its own test runs
> * the prod jobs just point to master so they are not impacted and
> deploying to all the jobs is as easy as merging to master
>
> --
> 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/9b98e145-5a9f-4b88-ab37-f91077fa2217%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/CAO49JtFUJjx5Srd9eFvcY8%3DXfnDEPRVEhqE3iHjW4mdrFG33Rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Have a job run for each branch of a shared library repo

2017-09-16 Thread red 888
Need to have a good dev workflow for developing share libraries my jobs depend 
on.

Right now when a shared Lib is edited all jobs depending on it automatically 
run. I want to control and test this code somewhat like I do with regular apps 
with Jenkins.

I don't want to have to manually point my jobs to specific versions (branches) 
of my shared Lib repo to test it and them have to point them back. 

I have an idea but not sure it is supported or too nutty.

Can I have jobs automatically scan and execute once for each branch of each 
shared Lib repo? Just Like multibranch pipelines but the branches they track 
are from the shared libraries they import? Because this is my plan:

* Create a test job for each language/platform I currently deploy with Jenkins. 
These jobs are designed expressly to mirror my real apps and do test runs of my 
shared libs for all my platforms without impacting my prod apps/jobs
* These test jobs don't point to specific shared library branches (versions) 
but track ALL of there shared lib branches
* when we branch one of the shared lib repos and commit our changes to our 
individual test/feature/hotfix branches all the test jobs execute for each of 
our branches.
* We don't step on each other and can work in parallel because each branch gets 
its own test runs
* the prod jobs just point to master so they are not impacted and deploying to 
all the jobs is as easy as merging to master

-- 
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/9b98e145-5a9f-4b88-ab37-f91077fa2217%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: All jobs run when shared library is updated

2017-09-16 Thread red 888
I suppose I want to have my cake and eat it too

Just to be clear, I have my pipeline block,settings,options,stages,etc
centralized in a shared Library and all my apps' jenkinsfiles just make a
parameterized method call to it. This is awesome but now i need to figure
out a development workflow for it that is also awesome.

I'm polling, not push notifications. Is there a way to have the Jenkins
server pull the repo,  keep the shared Lib up-to-date but not trigger all
of the Jenkins jobs that rely on it immediately- does the load implicitly
feature impact this?


On Sep 15, 2017 8:34 PM, "Mark Waite"  wrote:

> One way to disable it is to redefine your library references so that each
> Jenkinsfile refers to a specific version in the pipeline shared library.
> That has the additional benefit that it makes explicit what you have
> decided implicitly, that you want to ignore changes in the pipeline shared
> library.
>
> When you're ready to allow branches to see a change in the pipeline shared
> library (because it might risk breaking those branches, etc.), you update
> the Jenkinsfile to use the newest version of the pipeline shared library.
>
> There are also settings which should allow the pipeline shared library to
> ignore push notifications, but it seems cleaner and clearer to state in
> your Jenkinsfile (or in the folder) the specific version of the pipeline
> shared library that you want to use.
>
> Mark Waite
>
> On Fri, Sep 15, 2017 at 3:52 PM red 888  wrote:
>
>> I have my whole pipeline block of code defined in a shared library and my
>> jenkinsfiles for my apps just call this shared library.
>>
>> I noticed though that when I modify the shared library and push to the
>> git repo ALL the jenkins jobs that depend on this library re-run.
>>
>> How can I prevent this from happening? I dont want all the jobs that
>> depend on this shared library to re-run whenever there is a change made to
>> it. I know this could technically be a good thing, but for now I want to
>> disable this.
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/5f3d6c01-b693-4c5e-b441-9f1688a05b2a%40g
>> ooglegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/jenkinsci-users/mkjelSUQCoU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/jenkinsci-users/CAO49JtGdDW7SA0CqYg5s%3DMJH8Y8psOZUj%3DA
> Lh3nKG7PkKy36qA%40mail.gmail.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/CANLFi7ppK-dFgK9vMrZjNcFis38NqLmpHnpw_bb4OzaF1%3DaFPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins doesn't start automatically after a PC boots

2017-09-16 Thread masaru tsuchiyama
Yes


2017年9月16日(土) 11:27 Slide :

> If you go into the properties of the service in services.msc and look at
> the startup type, is it set to Automatic?
>
> On Fri, Sep 15, 2017 at 4:07 PM Masaru Tsuchiyama 
> wrote:
>
>> Hello
>>
>> Jenkins doesn't start automatically after a PC boots.
>>
>> I installed Jenkins by windows installer at
>> https://jenkins.io/download/thank-you-downloading-windows-installer
>>
>> If I start Jenkins service at services.msc manually, it can be started.
>> I'm running Jenkins as a normal user not System Account.
>>
>> I'm using Jenkins 2.78 now, but it has been happening for several
>> months. I'm not sure which version of Jenkins is the first version
>> which reproduces.
>>
>>
>> --
>> Masaru Tsuchiyama 
>>
>> --
>> 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/e751ea50-038b-8477-388c-17729581d2f6%40gmail.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/CAPiUgVf1ZDGQYhFK-VSdpu5tjhoE85ohBJHC6ytPCy4-YGi3wA%40mail.gmail.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/CAKQP9efpTyPjK0e%3DYdr0YBMeF_Yq2tk3uhjiyLaF%3DbKSWXD_Xw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.