pipeline with docker and warnings (pylint)

2017-05-19 Thread kristian kvilekval
I am trying to create a pipeline step that will display pylint warnings.  I 
have a docker container with the code which will write a 
/reports/pylint.log file 

I would like to run the  container and wait for the container to exit 
before executing the warning plugin on the resulting file.  
What I see instead is the container is started in daemon mode and the 
stopped/removed immediately.

Here is my example:


  stage ("Build") {
def image = docker.build ("biodev.ece.ucsb.edu:5000/bisque06", '.')
stage ("Test"){
  def workspace = pwd()
  image.withRun ("-v ${workspace}/reports:/reports", "bootstrap pylint 
unit-tests") { c->
// WAIT FOR run to be completed.. 
warnings canComputeNew: false, canResolveRelativePaths: false, 
defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', 
messagesPattern: '', parserConfigurations: [[parserName: 'PyLint', pattern: 
'reports/pylint.log']], unHealthy: ''
  }
}

Any help appreciated.
Kris








-- 
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/d949d232-35c4-4e80-8b39-7ccfbffe83dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: One Jenkinsfile per repo in multi-branch workflows?

2017-05-19 Thread Michael Kobit
Be careful if you do use the job DSL as you will have to deal with Groovy
sandbox permissions for job creation.

On Fri, May 19, 2017, 09:20 Matt Stave  wrote:

> You can use a JobDSL statement in the Jenkinsfile in the root of your repo
> to generate other jobs.  Those jobs wouldn't be triggered by subsequent
> repo changes, unless you add a call to them in your main Jenkinsfile - they
> also could be triggered on-demand, through replay, a cron ...
>
> --- Matt
>
>
> On Thursday, May 18, 2017 at 9:38:28 AM UTC-5, David Aldrich wrote:
>>
>> Hi
>>
>>
>>
>> As the free-style Multi-Branch Project plugin is deprecated, I am
>> experimenting with the Multibranch Pipeline job type.
>>
>>
>>
>> With the Multi-Branch Project plugin it was possible to have multiple
>> multi-branch jobs.  We took advantage of that and had multiple jobs to
>> build different executables in the repo and to run different regression
>> tests, with different polling periods.
>>
>>
>>
>> It seems that the Multibranch Pipeline supports only one build script
>> per repo, defined by the JenkinsFile in the root directory.
>>
>>
>>
>> This seems to me to be restrictive.  What is the thinking behind it and
>> is it possible to define multiple multi-branch pipeline jobs per repo?
>>
>>
>>
>> Best regards
>>
>>
>>
>> David
>>
>>
>>
> --
> 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/4b45b914-1cdf-4dfe-9076-330fea88798c%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/CALELY9F%3DWixhtxvoW0rFORs_Xtgp8N79dn3FWi8CMU4xgyB5Gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Best/most idiomatic way to do parallel tasks that are largely the same?

2017-05-19 Thread Adam Paul
Hello,

Let's say I have a product that needs to build on two different 
architectures (indeed, I do).  The build steps are exactly the same, only 
the architecture differs.  What is the best way to do this in parallel in a 
pipeline without duplicating the code for each architecture.  The example 
below is simple, but my real world one isn't so much.

eg. instead of:

parallel(
"sparc": {
def arch="sparc"
do_stuff(arch)
do_more_stuff(arch)
},
"i386": {
def arch="i386"
do_stuff(arch)
do_more_stuff(arch)
}
)


There is:

def testList = ["sparc","i386"]
def branches = [:] 

for (int i = 0; i < testList.size() ; i++) {
   String arch=testList[i]
   stage ("branch_${arch}"){ 
branches["branch_${arch}"] = { 
node (){
do_stuff(arch)
do_more_stuff(arch)
}
}
  }
}

parallel branches

which works, but I'm wondering if there is a better/more idiomatic way to 
do this?

Thanks!
 Adam

-- 
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/b7a18396-5e0b-467c-8e08-9bfcbb1d7e33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline conversion of MSTest to JUnit using XUnit

2017-05-19 Thread Joe Cavanaugh
 step([
$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1,
thresholds: [
[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '0', 
unstableNewThreshold: '', unstableThreshold: ''],
[$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', 
unstableNewThreshold: '', unstableThreshold: '']
],
tools: [[
$class: 'MSTestJunitHudsonTestType',
deleteOutputFiles: true,
failIfNotNew: true,
pattern: 'YOUR\\LOCATIONFOR\\TestResults\\xunit_results.xml',
skipNoTestFiles: false,
stopProcessingIfError: true
]]
])

I use the above for my XUnit to MSTest and then get the display on 
Jenkins... might help you out since you can use MSTest results directly. 

On Wednesday, May 17, 2017 at 9:59:15 AM UTC-5, Thiago Carvalho Davila 
wrote:
>
> Hi,
>
> I've been trying to convert MSTests using pipeline, and I've been 
> struggling to make a step for that:
>
> step([$class: 'XUnitBuilder', thresholds: [[$class: 
> 'FailedThreshold', unstableThreshold: '1']], tools: [[$class: 'MSTest', 
> pattern: 'TestResults\\*.trx']]])
>
> For this I get the error log:
>
> java.lang.IllegalArgumentException: Could not instantiate 
> {delegate={$class=XUnitBuilder, thresholds=[{$class=FailedThreshold, 
> unstableThreshold=1}], tools=[{$class=MSTest, pattern=TestResults\*.trx}]}} 
> for CoreStep(delegate: SimpleBuildStep{AnalysisPublisher(canComputeNew?: 
> boolean, canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, 
> checkStyleActivated?: boolean, defaultEncoding?: String, dryActivated?: 
> boolean, failedNewAll?: String, failedNewHigh?: String, failedNewLow?: 
> String, failedNewNormal?: String, failedTotalAll?: String, failedTotalHigh?: 
> String, failedTotalLow?: String, failedTotalNormal?: String, 
> findBugsActivated?: boolean, healthy?: String, openTasksActivated?: boolean, 
> pmdActivated?: boolean, shouldDetectModules?: boolean, thresholdLimit?: 
> String, unHealthy?: String, unstableNewAll?: String, unstableNewHigh?: 
> String, unstableNewLow?: String, unstableNewNormal?: String, 
> unstableTotalAll?: String, unstableTotalHigh?: String, unstableTotalLow?: 
> String, unstableTotalNormal?: String, useDeltaValues?: boolean, 
> usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: boolean, 
> warningsActivated?: boolean) | ArtifactArchiver(artifacts: String, 
> allowEmptyArchive?: boolean, caseSensitive?: boolean, defaultExcludes?: 
> boolean, excludes?: String, fingerprint?: boolean, onlyIfSuccessful?: 
> boolean) | CheckStylePublisher(canComputeNew?: boolean, 
> canResolveRelativePaths?: boolean, canRunOnFailed?: boolean, 
> defaultEncoding?: String, failedNewAll?: String, failedNewHigh?: String, 
> failedNewLow?: String, failedNewNormal?: String, failedTotalAll?: String, 
> failedTotalHigh?: String, failedTotalLow?: String, failedTotalNormal?: 
> String, healthy?: String, pattern?: String, shouldDetectModules?: boolean, 
> thresholdLimit?: String, unHealthy?: String, unstableNewAll?: String, 
> unstableNewHigh?: String, unstableNewLow?: String, unstableNewNormal?: 
> String, unstableTotalAll?: String, unstableTotalHigh?: String, 
> unstableTotalLow?: String, unstableTotalNormal?: String, useDeltaValues?: 
> boolean, usePreviousBuildAsReference?: boolean, useStableBuildAsReference?: 
> boolean) | CoberturaPublisher(autoUpdateHealth?: boolean, 
> autoUpdateStability?: boolean, coberturaReportFile?: String, failNoReports?: 
> boolean, failUnhealthy?: boolean, failUnstable?: boolean, maxNumberOfBuilds?: 
> int, onlyStable?: boolean, sourceEncoding?: SourceEncoding[ASCII, Big5, 
> Big5_HKSCS, Big5_Solaris, Cp037, Cp1006, Cp1025, Cp1026, Cp1046, Cp1047, 
> Cp1097, Cp1098, Cp1112, Cp1122, Cp1123, Cp1124, Cp1140, Cp1141, Cp1142, 
> Cp1143, Cp1144, Cp1145, Cp1146, Cp1147, Cp1148, Cp1149, Cp1250, Cp1251, 
> Cp1252, Cp1253, Cp1254, Cp1255, Cp1256, Cp1257, Cp1258, Cp1381, Cp1383, 
> Cp273, Cp277, Cp278, Cp280, Cp284, Cp285, Cp297, Cp33722, Cp420, Cp424, 
> Cp437, Cp500, Cp737, Cp775, Cp838, Cp850, Cp852, Cp855, Cp856, Cp857, Cp858, 
> Cp860, Cp861, Cp862, Cp863, Cp864, Cp865, Cp866, Cp868, Cp869, Cp870, Cp871, 
> Cp874, Cp875, Cp918, Cp921, Cp922, Cp930, Cp933, Cp935, Cp937, Cp939, Cp942, 
> Cp942C, Cp943, Cp943C, Cp948, Cp949, Cp949C, Cp950, Cp964, Cp970, EUC_CN, 
> EUC_JP, EUC_JP_LINUX, EUC_JP_Solaris, EUC_KR, EUC_TW, GB18030, GBK, ISCII91, 
> ISO2022_CN_CNS, ISO2022_CN_GB, ISO2022CN, ISO2022JP, ISO2022KR, ISO8859_1, 
> ISO8859_13, ISO8859_15, ISO8859_2, ISO8859_3, ISO8859_4, ISO8859_5, 
> ISO8859_6, ISO8859_7, ISO8859_8, ISO8859_9, JISAutoDetect, KOI8_R, MacArabic, 
> MacCentralEurope, MacCroatian, MacCyrillic, MacDingbat, MacGreek, MacHebrew, 
> MacIceland, MacRoman, MacRomania, MacSymbol, MacThai, MacTurkish, MacUkraine, 
> MS874, MS932, MS936, MS949, MS950, MS950_HKSCS, PCK, SJIS, TIS620, 
> UnicodeBig, UnicodeBigUnmarked, UnicodeLittle, UnicodeLittleUnmarked, UTF_16, 
> UTF_8, x_iso_8859_11, x_Johab], zoomCoverageChart?: boolean) | 
> 

declarative: how can agent { docker { image 'foo:latest' }} really get the latest version?

2017-05-19 Thread Matt Stave
If you run such a job the 1st time, all is well.
If you run it again, it may or may not decide to grab the latest version 
vs. use the one it already has.

I'm not sure if it's finding it on the Jenkins master, or on a local worker.

In my case it's an image built and pushed to a local repo by another 
Jenkins job, but the job that wants to use it runs independently.

A workaround is to skip using agent to get the image, and do a docker pull 
(which WILL get the latest one), docker run inside a node{}, but that seems 
kludgey, as does some sort of agent .. docker:dind + docker.pull, 
docker.inside ...

If you're using the Docker plugin to have docker-based slaves (which we're 
not), there's a "pull strategy" config option that has a lovely-sounding 
"pull once and update latest" option, fwiw.

-- 
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/9fbf5c04-4a34-4007-b2c4-3fbeb08ed872%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: test result graph links are covered by cbwf-stage-view element

2017-05-19 Thread Trever
We use the fantastic material design theme from 
http://afonsof.com/jenkins-material-theme/

On Friday, May 19, 2017 at 1:28:12 AM UTC-7, Danny Rehelis wrote:
>
> May I hijack this thread and ask you how did you make Jenkins look like 
> that?
>
> On Thu, May 18, 2017 at 8:43 PM Trever  
> wrote:
>
>> Some time recently, we are unable to click the links under Jacoco, 
>> FindBugs and test results because they are covered over (invisibly) by the 
>> cbwf-stage-view CSS element. (see the attached image).
>>
>>
>> -- 
>> 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/8f2505a9-fc2f-4562-adf3-4a0d49fdc2a5%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/3c5c2167-c570-4a61-96fc-1b0ba5402f74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker host and Jenkins on separate machines...

2017-05-19 Thread Alex Domoradov
Not sure what do you mean by "By default Jenkins supposes to be able to  
start docker containers on the same host as itself,". 
Because we are using Jenkins with AWS ECS cluster without any problems. And 
our slave nodes are different EC2 instances from master node. 

On Friday, May 19, 2017 at 10:20:52 AM UTC+3, Kirill Peskov wrote:
>
> Hi All, 
>
> I'm googling already about an hour if not longer, but I really cannot 
> find an answer to quite simple question: "How to setup Jenkins to 
> connect to a Docker host (or multiple Docker hosts later on) running on 
> a separate machine(s)? Docs on the jenkins.io site seem to be not really 
> verbose about such a setup... By default Jenkins supposes to be able to 
> start docker containers on the same host as itself, but that's not my 
> case. 
>
> Cheers, 
> Kirill 
>
>

-- 
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/53cd4406-dbaf-48df-80c4-2da6727901eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Grails plugin not available in new Jenkins versions?

2017-05-19 Thread Chris Peck
I'm having the same issue with the current LTS release 2.46.2. Does anyone 
know how to install it?


On Monday, April 24, 2017 at 2:46:40 PM UTC-4, Carina Marban wrote:
>
> Hi,
>
>
> I'm currently trying to migrate our jobs from a Jenkins 1.650 instance
> to a new one that we just updated to 2.56. Unfortunately, I seem unable 
> to install the Grails plugin: 
> https://wiki.jenkins-ci.org/display/JENKINS/Grails+Plugin 
> because it is not in the list of available plugins. 
> I also can't find it on https://plugins.jenkins.io
>
> Am I correct to assume that the Grails plugin is not available anymore in 
> more recent 
> versions of Jenkins? Since it is quite central to our process, that would 
> unfortunately 
> mean that I will have to downgrade to an older version of Jenkins. Is 
> there any way 
> I can find out which is the most recent version of Jenkins that still 
> supports the plugin?
>
> I saw the discussions in the Jenkins Developers user group about the 
> plugin 
> not having any active maintainers anymore. Is it really dead? I know that 
> there
> is not a huge number of projects that are actively using Grails but I am 
> still a bit surprised (and sad) about this.
>
> Am I maybe just missing something?
>
>
> Thanks in advance,
> Carina
>

-- 
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/ca81a7aa-1059-4458-9791-b6f2755a2f63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker host and Jenkins on separate machines...

2017-05-19 Thread Matt Stave
Did you try in "configure system" after installing the Docker plugin 
setting the Docker URL to something like tcp://172.16.42.43:4243

On Friday, May 19, 2017 at 2:20:52 AM UTC-5, Kirill Peskov wrote:
>
> Hi All, 
>
> I'm googling already about an hour if not longer, but I really cannot 
> find an answer to quite simple question: "How to setup Jenkins to 
> connect to a Docker host (or multiple Docker hosts later on) running on 
> a separate machine(s)? Docs on the jenkins.io site seem to be not really 
> verbose about such a setup... By default Jenkins supposes to be able to 
> start docker containers on the same host as itself, but that's not my 
> case. 
>
> Cheers, 
> Kirill 
>
>

-- 
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/5b1dfec8-5356-4592-b3b0-595f04e1f34f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jenkins plugin in groovy, python or some other scripting language

2017-05-19 Thread Qiang
Groovy yes. 
There are samples of using Groovy/Gradle to build a jenkins 
plugin: https://www.cloudbees.com/event/topic/groovy-way-write-jenkins-plugin 

On Thursday, May 18, 2017 at 3:37:03 AM UTC-5, Jeeva Chelladhurai wrote:
>
> Oops! posted by mistake.. let me rephrase my question
>
> Is it possible to write Jenkins plugin in groovy, python or some other 
> scripting language? Many devops engineers are not familiar with java...
>
> Thanks,
> Jeeva
>

-- 
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/7568d9d6-f864-4adf-a7ab-e1463bede01b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: One Jenkinsfile per repo in multi-branch workflows?

2017-05-19 Thread Matt Stave
You can use a JobDSL statement in the Jenkinsfile in the root of your repo 
to generate other jobs.  Those jobs wouldn't be triggered by subsequent 
repo changes, unless you add a call to them in your main Jenkinsfile - they 
also could be triggered on-demand, through replay, a cron ...

--- Matt

On Thursday, May 18, 2017 at 9:38:28 AM UTC-5, David Aldrich wrote:
>
> Hi
>
>  
>
> As the free-style Multi-Branch Project plugin is deprecated, I am 
> experimenting with the Multibranch Pipeline job type.
>
>  
>
> With the Multi-Branch Project plugin it was possible to have multiple 
> multi-branch jobs.  We took advantage of that and had multiple jobs to 
> build different executables in the repo and to run different regression 
> tests, with different polling periods.
>
>  
>
> It seems that the Multibranch Pipeline supports only one build script  per 
> repo, defined by the JenkinsFile in the root directory.
>
>  
>
> This seems to me to be restrictive.  What is the thinking behind it and is 
> it possible to define multiple multi-branch pipeline jobs per repo?
>
>  
>
> Best regards
>
>  
>
> David
>
>  
>

-- 
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/4b45b914-1cdf-4dfe-9076-330fea88798c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to set request header size for jetty

2017-05-19 Thread stanislavzal

>
> hi
>>
>
May 19, 2017 10:05:33 AM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Header is too large >8192


I added such options in jenkins.xml and it is resolved issue:
  -Xrs -Xmx256m 
-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle 
-Dorg.eclipse.jetty.server.HttpConfiguration.requestHeaderSize=32768 
-Dorg.eclipse.jetty.server.HttpConfiguration.responseHeaderSize=32768 
-Dorg.eclipse.jetty.server.Request.maxFormContentSize=50 -jar 
"%BASE%\jenkins.war" --httpPort=8080 --requestHeaderSize=32768 
--webroot="%BASE%\war"




-- 
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/e7ae0d61-5b1f-401e-a30f-d3b54be8522e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to set request header size for jetty

2017-05-19 Thread stanislavzal

>
> Please try this:
>>
> https://issues.jenkins-ci.org/browse/JENKINS-26963

workaround this by adding 
-Dorg.eclipse.jetty.server.Request.maxFormContentSize=50 in the 
 XML node of Jenkins\jenkins.xml 

-- 
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/d52a9d16-fd08-4ee3-a9f1-40bd4a32a7ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ant logger in jenkins

2017-05-19 Thread Moulidharan
Can anyone help me how to define ant logger in Jenkins?I had tried using
ant_opts in environment variables but didn't work.Exactly I want (ant -f
build.xml -logger org.apache.tools.ant.listener.ProfileLogger).Thanks in
advance.



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Ant-logger-in-jenkins-tp4898094.html
Sent from the Jenkins users mailing list archive at Nabble.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/1495185383465-4898094.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline uses 2 executors when changing node

2017-05-19 Thread Andreas Tscharner

Hello World,

Our setup:
* Jenkins 2.32.2 on Debian Linux
  libvirt Plugin for Jenkins
* 8 VMs on the same server, running Windows 7, building our software
  KVM/QEMU VMs, using libvirt
  labelled "build"
* 4 Ubuntu machines containing 2 VMs each (=8) running Windows 10, 
testing our software

  KVM/QEMU VMs, using libvirt
  labelled "aat"

Now I created a pipeline which starts at a "build" node. It runs there 
and displays "part of ...".
Now at some point in the pipeline I want to switch to an "aat" node for 
testing; I use the step command "build 'SmokeTest'"). It switches to one 
of the "aat" nodes (displaying "part of ...") and then the actual job 
(SmokeTest) starts at a second "aat" node. The job at the first "aat" 
node is just waiting.


How can I make sure that only one "aat" node is being used?

TIA and best regards
Andreas
--
Andreas Tscharner 
--
"Intruder on level one. All Aliens please proceed to level one."
  -- Call in "Alien: Resurrection"

--
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/2033b570-fe94-dd86-fd49-1a0ef13a643e%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Remoting Library and JarCache

2017-05-19 Thread Kristian
Hi,

I read, that the Remoting library of Jenkins has a so-called Cache dir
(https://github.com/jenkinsci/remoting/blob/master/docs/workDir.md).

Why is this cache dir needed? What is the purpose of it? And what is
concretely saved/cached in there? I only see a bunch of jar files...

-- 
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/CAO5HUhOWvcuUUBPBEyVvRDkKrDWqh3nrnnAH%3Dh-0jk60PAPQwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failing builds

2017-05-19 Thread Kristian
Does really nobody have an idea what to do here?

2017-05-08 14:46 GMT+02:00 Kristian :

> Sorry, the error message was not correct. Correct error message is this:
>
>
> FATAL: command execution failedjava.nio.channels.ClosedChannelException 
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:208)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:181)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:800)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173)
>  
> 
>   at 
> org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:311)
>  
> 
>   at hudson.remoting.Channel.close(Channel.java:1295) 
> 
>   at hudson.slaves.ChannelPinger$1.onDead(ChannelPinger.java:180) 
> 
>   at hudson.remoting.PingThread.ping(PingThread.java:130) 
> 
>   at hudson.remoting.PingThread.run(PingThread.java:86) 
> 
> Caused: java.io.IOException: Backing channel 'JNLP4-connect connection from 
> hostname01/192.168.2.54:64007' is disconnected.
>   at 
> hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:192)
>   at 
> hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
>   at com.sun.proxy.$Proxy77.isAlive(Unknown Source)
>   at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1043)
>   at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1035)
>   at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)
>   at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
>   at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
>   at 

RE: How to specify recipients in email-ext step in declarative script?

2017-05-19 Thread David Aldrich
Hi Slide

Do you know whether it’s possible to get the culprits without using email-ext, 
i.e. using the ‘mail’ command?

Best regards

David

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Slide
Sent: 18 May 2017 19:48
To: jenkinsci-users@googlegroups.com
Subject: Re: How to specify recipients in email-ext step in declarative script?


Then it's possible that it's the way culprits are determined for each job type. 
Free style inherits from AbstractProject, so the build has a getCulprits() that 
email-ext can call. It has to determine culprits on its own for pipeline jobs 
and it may not have all the info that a free style project does.

On Thu, May 18, 2017, 07:12 David Aldrich 
> wrote:
Well I haven’t found definitions of the providers so I can’t be sure, but the 
free-style job specifies:

Fixed: Recipient List, Culprits

and the Project Recipient List contains daldrich

So, yes, I think they are equivalent.

BR

David

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com]
 On Behalf Of Slide
Sent: 18 May 2017 14:52

To: jenkinsci-users@googlegroups.com
Subject: Re: How to specify recipients in email-ext step in declarative script?

Do you have the same recipient providers specified for the pipeline as you do 
in your normal (free style) job?

On Thu, May 18, 2017 at 2:33 AM David Aldrich 
> wrote:
Hi Slide

Thanks for helping me with this.  I am using a declarative pipeline. In the 
‘post’ clause, I set ‘success’, ‘failure’, ‘unstable’ and ‘changed’ to all be:

script{ emailext (body: '${DEFAULT_CONTENT}',
  recipientProviders: [[$class: 
'CulpritsRecipientProvider']],
  subject: '${DEFAULT_SUBJECT}',
  to: 'daldrich')

‘Failure’ works fine – daldrich and the culprits are emailed.

However, when the failure is fixed, i.e. we have condition ‘changed’, only 
daldrich is emailed.  In a traditional job the culprits should also be notified 
of the change to Fixed.

Perhaps this is an email-ext plugin bug?

Best regards

David

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com]
 On Behalf Of Slide
Sent: 17 May 2017 17:45

To: jenkinsci-users@googlegroups.com
Subject: Re: How to specify recipients in email-ext step in declarative script?

You are using "to: ", you don't need both to and recipientProviders, especially 
since you are already using the def recipients = emailext... to get the same 
thing. If the job succeeds, I don't think the culprits will be emailed, but I 
could be wrong. Are you using a pipeline or other type of job? Culprits are 
people who may have broken the build, so if the build is succeeding, then it 
may not email the culprits. You may want DevelopersRecipientProvider if you 
want anyone who added a change to be emailed.

On Wed, May 17, 2017 at 7:27 AM David Aldrich 
> wrote:
Hi Slide

I am running the job manually. There are commits by another user since the job 
last ran, so I assume there should be culprits.  The job actually succeeds, but 
I’m assuming that the culprits should still receive the email.

If I remove:

recipientProviders: [[$class: 'CulpritsRecipientProvider']],

then the culprits definitely won’t get the email?

BR

David

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com]
 On Behalf Of Slide
Sent: 17 May 2017 15:16

To: jenkinsci-users@googlegroups.com
Subject: Re: How to specify recipients in email-ext step in declarative script?


Try removing the recipientProvider parameter to emailext, I'm not sure if that 
will mess things up. I'm not familiar with declarative pipeline enough to say 
how to get the correct build status. How are you running the job? If you are 
running it manually and there have been no changes, then there are no culprits. 
The culprits are pulled from the changes from the scm you specify.

On Wed, May 17, 2017, 04:07 David Aldrich 
> wrote:
I tried replacing my code with that produced by the snippet generator:

script{ emailext (body: '${DEFAULT_CONTENT}',
  recipientProviders: [[$class: 
'CulpritsRecipientProvider']],
  subject: '${DEFAULT_SUBJECT}',
  to: 'daldrich')
}

But the result is an email to 

Re: Role strategy plugin: how to give specific access

2017-05-19 Thread Alex Domoradov
Thanks a lot. It is exactly what I was looking for. It works like a charm

On Thursday, May 18, 2017 at 6:42:36 PM UTC+3, Artur Szostak wrote:
>
> I believe you need to install "Extended Read Permission Plugin" to add an 
> additional cell to the permission table. Then you can select/check the 
> "ExtendedRead" option rather than the "Configure" option to give read only 
> access to the job's configuration. 
>
>  
> From: jenkins...@googlegroups.com  <
> jenkins...@googlegroups.com > on behalf of Alex Domoradov <
> alex...@gmail.com > 
> Sent: 18 May 2017 17:32:08 
> To: Jenkins Users 
> Subject: Role strategy plugin: how to give specific access 
>
> Hello, 
>
> we have been using role strategy plugin for a few years. And it works 
> fine. But now we need to give specific access to specific users. We need 
> that people will be able to view configuration of a job but at the same 
> time they won't be able to change the configuration itself. Is it possible 
> to configure the plugin in such way? 
>
> Thanks in advance 
>
> -- 
> 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  jenkinsci-users+unsubscr...@googlegroups.com >. 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/bf2694a2-6686-4439-9cd8-6a77a6ee0aec%40googlegroups.com
> <
> https://groups.google.com/d/msgid/jenkinsci-users/bf2694a2-6686-4439-9cd8-6a77a6ee0aec%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
> 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/b26e23c6-8cef-4518-ab01-e9a164c504d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to use Jenkins CLI for linter?

2017-05-19 Thread David Aldrich
Hi

I want to use the Jenkins declarative script linter via the CLI.

I have specified a fixed SSHD port in Jenkins Global Security.

I have shared my SSH public key with my account on the Jenkins server, so I can 
connect to the server using SSH.

However, when I try to run the linter I get an error:

$ ssh -p  hudsonmaster declarative-linter < Jenkinsfile
Permission denied (publickey).

Can anyone help me please?

Best regards

David

-- 
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/315ff9f469364ad48e2a1e4da7b77311%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


Re: test result graph links are covered by cbwf-stage-view element

2017-05-19 Thread Danny Rehelis
May I hijack this thread and ask you how did you make Jenkins look like
that?

On Thu, May 18, 2017 at 8:43 PM Trever  wrote:

> Some time recently, we are unable to click the links under Jacoco,
> FindBugs and test results because they are covered over (invisibly) by the
> cbwf-stage-view CSS element. (see the attached image).
>
>
> --
> 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/8f2505a9-fc2f-4562-adf3-4a0d49fdc2a5%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/CAObRFCWddEfz2GM27F%3DQau7nVeh%2BZwhpqiXL0Ugc2tktA34KLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Job properties are not (should be !?) cumulative

2017-05-19 Thread ncosta


Project properties are not cumulative when additional settings are set 
during the pipeline.


For example, if setting a Parameterized build and later in the pipeline, 
a Discard Old Builds is set, the Parameterized build is unset.

I had this happening when the Discard Old Builds were used in a Shared 
library, later in the pipeline.


When a additional propertie is set, it shouldn't unset all the previous 
properties, if they are not the same type (discard builds vs parameters).


Someone know if this is working as designed or is something that could be 
implemented?

-- 
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/f4ad1274-d5ad-470c-9c8a-6e8f7a3483b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: One Jenkinsfile per repo in multi-branch workflows?

2017-05-19 Thread David Aldrich
> There seems to be some work done in this regard, but it seems to be lagging,
> so I can't tell if it's going to stay this way or not.

Thanks for your answer. Good to know it is being worked on.

David

-- 
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/ceea20b58330439ea6efcfc1ad88a429%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


Docker host and Jenkins on separate machines...

2017-05-19 Thread Kirill Peskov
Hi All,

I'm googling already about an hour if not longer, but I really cannot
find an answer to quite simple question: "How to setup Jenkins to
connect to a Docker host (or multiple Docker hosts later on) running on
a separate machine(s)? Docs on the jenkins.io site seem to be not really
verbose about such a setup... By default Jenkins supposes to be able to
start docker containers on the same host as itself, but that's not my case.

Cheers,
Kirill

-- 
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/3b9eca65-cd85-b3c9-7fdf-e53e388f4604%40paranoid.email.
For more options, visit https://groups.google.com/d/optout.


No valid crumb was included in the request

2017-05-19 Thread Geetha Sundaram


installed jenkin 2.46.2 in windows server 2012, integrated with gitbucket, 
I am trying the trigger - Build when a change is pushed to GitBucket

Also trying to add webhook and test I am getting error

 

 
Error 403 No valid crumb was included in the request  
HTTP ERROR 403 Problem accessing 
/jenkins/gitbucket-webhook/. Reason:  No valid crumb was included in 
the requestPowered by Jetty:// 
 

 

-- 
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/16996a05-0018-4114-a491-493ceb164c22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.