Re: Declarative pipeline "when" tag is pushed

2017-12-20 Thread Steven Foster
I think you can get that with this:

when {
expression {
env.TAG_NAME != null
}
}

You get the env.TAG_NAME from the branch api when it's a tag build.
A shortcut would be helpful, I suggested it 
here https://issues.jenkins-ci.org/browse/JENKINS-48523


On Wednesday, December 20, 2017 at 7:12:44 AM UTC, Lynn Lin wrote:
>
> HI ,All,
>
>  i followed with page 
> https://wiki.jenkins.io/display/JENKINS/GitHub+Branch+Source+Plugin to 
> enable tag will trigger a new build then the questions comes 
>
> How can I use "when" in declarative pipeline to do something like 
> deployment when a new tag is pushed to remote repository
>
>
> stage('Example Deploy') {
> when {
> branch 'production' // here how we can use tag as condition 
> }
> steps {
> echo 'Deploying'
> }
> }
>
>
>
>
> "
>
>- When used with the Branch API Plugin 
>, tags will 
>show up as a new category. The default configuration of Branch API will 
> not 
>trigger builds for tags automatically. 
>
>This is by design, as one of the use-cases for tag discovery is to use 
>the tag job to perform deployment. If tags were built automatically, given 
>that the order in which the tag jobs actually execute is undefined, the 
>automatic build could cause significant issues. Branch API does provide a 
>mechanism to control what gets built automatically (known as the 
>BranchBuildStrategy) but that cannot be configured until you have at 
>least one extension plugin that provides a BranchBuildStrategy. 
>
>If you want tags to build automatically, you will need an extension 
>plugin for Branch API that implements at least one BranchBuildStrategy, 
>see AngryBytes/jenkins-build-everything-strategy-plugin 
> 
> for 
>a prototype example of such an extension plugin.
>
> “
>
>
> Thanks
> Lynn
>

-- 
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/9db42595-b6ad-4496-bf3f-0cd2db6c6ae2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem with build step - Windows Batch Command

2017-12-20 Thread vikash singh

>
> I am facing the same problem.
>
> Can you tell me how did you resolve it.?
How can i change the workspace to run windows batch command.? 

>  
>>
>>

-- 
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/c4f46e70-919f-4078-8a08-51c6ba9f1482%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build periodically not working in Jenkins v2.92

2017-12-20 Thread Daniel Beck

> On 20. Dec 2017, at 02:14, arunlakhanpal  wrote:
> 
> Does this point to anything?

Those don't look like anything is wrong. That's from the server that doesn't 
start jobs on schedule?

-- 
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/758E5C7F-3120-48F9-9B3D-7293CC261525%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Build and publish hybrid application mobile

2017-12-20 Thread Francesco Sisca
Hello everyone. For my company i build a hybrid app (angular2 and ionic2) 
and deploy it both Android and iOS. Actually i do it manually with this 
command 

ionic cordova platform add ios
ionic cordova platform add android
ionic cordova build ios --prod
ionic cordova build android --prod

and after this I sign the ios application with xcode to create ipa and 
publish it. Now, i can automatize this with jenkins? How?

-- 
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/e70cacdc-9418-4431-8925-fb64f6bcdc99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build periodically not working in Jenkins v2.92

2017-12-20 Thread arunlakhanpal
Thanks for the insight Daniel.

I did look into the thread dump but did not find anything that tells me
much. Sharing the extract I got from my jenkins server thread dump, which
might/might not be useful.

JmDNS().State.Timer
"JmDNS().State.Timer" Id=469 Group=main TIMED_WAITING on
java.util.TaskQueue@34c4afe1
at java.lang.Object.wait(Native Method)
-  waiting on java.util.TaskQueue@34c4afe1
at java.util.TimerThread.mainLoop(Timer.java:552)
at java.util.TimerThread.run(Timer.java:505)

JmDNS(akvcbujenkins01-bravurasolutions-local.local.).Timer
"JmDNS(akvcbujenkins01-bravurasolutions-local.local.).Timer" Id=468
Group=main TIMED_WAITING on java.util.TaskQueue@5bfeae9a
at java.lang.Object.wait(Native Method)
-  waiting on java.util.TaskQueue@5bfeae9a
at java.util.TimerThread.mainLoop(Timer.java:552)
at java.util.TimerThread.run(Timer.java:505)

sshd-SshServer[257b0d72]-timer-thread-1
"sshd-SshServer[257b0d72]-timer-thread-1" Id=459 Group=main TIMED_WAITING on
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@5a3a3987
at sun.misc.Unsafe.park(Native Method)
-  waiting on
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@5a3a3987
at 
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Keep-Alive-Timer
"Keep-Alive-Timer" Id=2725558 Group=system TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at sun.net.www.http.KeepAliveCache.run(KeepAliveCache.java:172)
at java.lang.Thread.run(Thread.java:745)

Does this point to anything?

Thanks.
Arun




--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-users-f361316.html

-- 
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/1513732477919-0.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Re: Disable withMaven publishers default configuration

2017-12-20 Thread ncosta

Hi Cyrille

Thanks for your clarification.

I now have the TEST and PROD using the same logger 
(org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution >> ALL).
Disabling the publishers on Global Tools Configuration screen, the 
publishers are shown as "Skip ... disabled by configuration" in Console 
output. Same as using the options from pipeline configuration.

Having the publishers disabled by default would be a better starting point, 
to avoid extra configuration. I'm now following JENKINS-46785.

I still think that when pipeline-maven auxiliar plugins are not installed, 
it shouldn't display that information on console log, when using this 
logger:
org.jenkinsci.plugins.pipeline.maven

On logger output, one can see that the findbugs plugin is not found and 
jgiven is not even shown here(it should !?). None of them is installed on 
TEST instance.

Dec 20, 2017 10:40:28 AM FINE 
org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher

No org.codehaus.mojo:findbugs-maven-plugin:findbugs execution found


On console log, it could mention that they are not installed or even  not 
shown at all. At the moment, there is no indication that the plugins are 
not installed.
In case of JGiven, it is not clear (at least for me) if the abort is due to 
missing jenkins plugin or if the project being built, does not use jgiven. 
In my understanding, I would assume the latter.

[debug] [withMaven] Run 'Findbugs Publisher'...
[debug] [withMaven] Run 'JGiven Publisher'...
[debug] [withMaven] jgivenPublisher - JGiven not found within your project 
dependencies, aborting.


Not sure if this input is already being considered (our previsously 
discarded) but if you think it should have a new bug report open, let me 
know :)

On Friday, 15 December 2017 00:53:50 UTC+1, Cyrille Le Clerc wrote:
>
> Hello,
>
> You had enabled logging on your test master and we display in the build 
> logs the logs of the plugin, this is why you had these messages on your 
> test masters.
>
> You can disable globally publishers through the Global Tools Configuration 
> screen.
>
> The message may not be intuitive but here is what happened:
>
>- "Use pipeline defined publisher for 'Findbugs Publisher'" --> the 
>config of the findbugs publisher is defined in the pipeline, in 
>"withMaven(options:[findbugsPublisher(...)]"
>- "Skip 'Findbugs Publisher' disabled by configuration" --> the 
>Findbugs Publisher is disabled
>- "pipelineGraphPublisher - triggerDownstreamPipelines" --> even if 
>you disable the "pipelineGraphPublisher" by configuration, we have a 
>listener of the pipeline build completion to decide if we trigger 
>downstream pipelines. We need to wait for the completion of the build 
>because the downstream pipeline trigger strategy is based on the result of 
>the upstream build, you probably don't want to trigger downstream 
> pipelines 
>if your build failed.
>
> Stephen Connolly mentioned another use case:disabling all the 
> publishers unless they are explicitly enabled in the pipeline 
> ("withMaven(options:[myPublisher(enabled: 
> true])"). James Nord had created a while ago the RFE JENKINS-46785 add a 
> way to disable all reporters (and selectively enable a few) 
> 
> .
> If have started to work on it with 
> https://github.com/jenkinsci/pipeline-maven-plugin/pull/116 and James 
> validated the user Experience. I'll provide details later.
>
> Did this clarify your messages?
>
> Cyrille 
>
>
>
> On Thursday, December 14, 2017 at 11:46:07 AM UTC+1, nco...@lbisa.com 
> wrote:
>>
>> Just noticed that PROD has a different logger. It is using:
>> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution
>>
>> and test was using:
>> org.jenkinsci.plugins.pipeline.maven
>>
>> Both were set to log level ALL.
>> After set test instance to use the same logger, the output are similar in 
>> both instances.
>>
>> Additionally, tested remove the logger from test and seems that the 
>> default console output is the same as:
>> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution
>>
>

-- 
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/1b928717-df20-41ae-82fa-c5b7b1b017db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.