Re: pipeline multi branch, how to continue if error occures

2016-09-12 Thread Sverre Moe
Either get return code from the executing shell script or surround with 
try-catch

final def returnCode = sh returnStatus: true, script: ""
if (returnCode != 0) {

}

try {
sh ""
} catch (e) {

}

tirsdag 13. september 2016 04.10.57 UTC+2 skrev R Tyler Croy følgende:
>
> (replies inline) 
>
> On Mon, 12 Sep 2016, Klaus Rudolph wrote: 
>
> > Hi all, 
> > 
> > if I use gtest in pipeline setup and have a unit test which fails the 
> groovy script stops. 
> > 
> > How can I tell the script that I want to continue so that I am able to 
> see the results from xunit/gtest plugin? 
> > 
> > From the gui without running Jenkinsfile there I had to write "set +e" 
> in the dialog box, but I don't know how to write that in groovy. 
>
>
> If the issue is just a single `sh` command return a non-zero exit code, 
> then 
> you can avoid that with: 
>
> sh './test-runner.sh || true' 
>
>
> - R. Tyler Croy 
>
> -- 
>  Code:  
>   Chatter:  
>
>   % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F 
> -- 
>

-- 
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/d50489e1-b189-4139-921a-fe2d2e2ff1c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline multi branch, how to continue if error occures

2016-09-12 Thread R. Tyler Croy
(replies inline)

On Mon, 12 Sep 2016, Klaus Rudolph wrote:

> Hi all,
> 
> if I use gtest in pipeline setup and have a unit test which fails the groovy 
> script stops.
> 
> How can I tell the script that I want to continue so that I am able to see 
> the results from xunit/gtest plugin?
> 
> From the gui without running Jenkinsfile there I had to write "set +e" in the 
> dialog box, but I don't know how to write that in groovy.


If the issue is just a single `sh` command return a non-zero exit code, then
you can avoid that with:

sh './test-runner.sh || true'


- R. Tyler Croy

--
 Code: 
  Chatter: 

  % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
--

-- 
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/20160913021041.GP18556%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: warnings graph in multibranch pipeline projects

2016-09-12 Thread R. Tyler Croy
Moin Klaus!

Klaus Rudolph schrieb am Monday, den 12. September 2016:

> I started to migrate some jobs in jenkins to pipeline execution.
> 
> Is there any chance to see the warnings graph in pipeline jobs? Within my 
> older projects I can configure the graphs with "Configure the trend graph" 
> option. These option will crash in the pipeline syntax tool.


This issue might be relevant to your question:
https://issues.jenkins-ci.org/browse/JENKINS-31202

Do you not see graphs on the build specific pages too?


> 
> Is there any option to make the graph visible?
> 
> I have in my Jenkinsfile:
> 
> stage ('Warnings gcc') {
> step([$class: 'WarningsPublisher', canComputeNew: false, 
> canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', 
> healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: 
> [[parserName: 'GNU Make + GNU C Compiler (gcc)', pattern: 
> 'error_and_warnings.txt']], unHealthy: ''])
> }   
> 
> stage ('Warnings clang') {
> step([$class: 'WarningsPublisher', canComputeNew: false, 
> canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', 
> healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: 
> [[parserName: 'Clang (LLVM based)', pattern: 
> 'error_and_warnings_clang.txt']], unHealthy: ''])
> } 
> 
> The reports will be generated but no graph is displayed. Any hints?
> 
> -- 
> 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/trinity-860cbe76-3605-4d4b-903e-a3cb43a58741-1473687526354%403capp-gmx-bs24.
> For more options, visit https://groups.google.com/d/optout.

- R. Tyler Croy

--
 Code: 
  Chatter: 

  % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
--

-- 
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/20160913020902.GO18556%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


pipeline scheduling displays duplicate changes

2016-09-12 Thread tarocaravan
When I inspect my Jenkins pipeline job, I always see duplicate entries in 
the Changes view. It may be happening because:

i) I have polling enabled, so that the job kicks off if there are any 
checkins with a time period
ii) The pipeline job checks out the code on a build node and does a build

Questions: 
1) Is there a way to tell Jenkins to only list the changes once?
2) Can the polling schedule somehow be enbedded within the pipeline code?

Ideally what I'd like to see is the code polled, checked out, and built on 
a particular node, but instead what I'm seeing is that the code is checked 
out on the master and then checked out again on the build node.

I'm using Pipeline plugin 2.2 and Jenkins 2.11.

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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a7caadda-c604-4a0f-80f6-17132faf57fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Powershell script runs fine locally, but when ran via Jenkins...

2016-09-12 Thread aaron . trujillo
As the title states, when i run this powershell script locally it runs just 
fine, but when i try to run it through as a Jenkins job it fails and says 
that the path can not be found because it does not exist, clearly the path 
exists as it can be ran locally.
The code is as follows:

> $FilePath = C:\Windows\System32\inetsrv\config\applicationHost.config
>
> $Line2Edit = ''
>
> $AppendAllow =  '> />' 
>
>  
>
> (Get-Content $FilePath) -replace $Line2Edit , "$AppendAllow" |
>
> Set-Content $FilePath
>
>  When I log in on the local machine as Jenkins i am able to successfully 
run the command in powershell also.  

Any help would be greatly appreciated!
Thanks.

-- 
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/8f74e0f9-cf1b-415e-b0aa-dfb2bd3d188f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [SECURITY] How to protect pipeline jobs using GitHub branch/PR auto-discovery from doing harm

2016-09-12 Thread jpd4nt

Not sure about docker in docker, but you can have a throw away VM slave to 
build the docker image - there are a number plugins to do this.
 

>
> Mmmm, OK, but we need to create docker images to run the jobs based on 
> what is in the repository we are fetching. Is it possible to run a 
> docker container inside a docker slave (which I assume is a container 
> itself)? 
>
> -- 
> Leandro Lucarella 
> Technical Development Lead 
> Sociomantic Labs GmbH  
>

-- 
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/39ffcbe2-0abc-4ed6-9a5c-56da293284db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: snipped generator for xunit google test

2016-09-12 Thread Liam Newman
First make sure you have the latest version of the xUnit plugin installed. 
Then, try looking under "step: General Build Step" and under "Build Step" 
see "Process xUnit test result report". 



On Monday, September 12, 2016 at 2:25:50 AM UTC-7, Klaus Rudolph wrote:
>
> Hi all, 
>
> I want to generate a code snipped to use it in the jenkins pipeline 
> "Jenkinsfile". 
>
> But I can't find the xunit / gtest inside the 
> "jenkins->"MyProject"->Pipeline-Syntax->Snippet Generator. 
>
> There is a very long list which items e.g archieve, build, scm and so on. 
> But I can't find any xunit or related tools/plugins here. 
>
> Can anyone explain how to get xunit for gtest integrated into the 
> plugin/jenkinsfile. 
>
> Thanks! 
>  Klaus 
>

-- 
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/8e2f7178-207c-494a-9cb1-480de6eda4de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


warnings graph in multibranch pipeline projects

2016-09-12 Thread Klaus Rudolph
I started to migrate some jobs in jenkins to pipeline execution.

Is there any chance to see the warnings graph in pipeline jobs? Within my older 
projects I can configure the graphs with "Configure the trend graph" option. 
These option will crash in the pipeline syntax tool.

Is there any option to make the graph visible?

I have in my Jenkinsfile:

stage ('Warnings gcc') {
step([$class: 'WarningsPublisher', canComputeNew: false, 
canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', 
healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: 
[[parserName: 'GNU Make + GNU C Compiler (gcc)', pattern: 
'error_and_warnings.txt']], unHealthy: ''])
}   

stage ('Warnings clang') {
step([$class: 'WarningsPublisher', canComputeNew: false, 
canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', 
healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: 
[[parserName: 'Clang (LLVM based)', pattern: 'error_and_warnings_clang.txt']], 
unHealthy: ''])
} 

The reports will be generated but no graph is displayed. Any hints?

-- 
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/trinity-860cbe76-3605-4d4b-903e-a3cb43a58741-1473687526354%403capp-gmx-bs24.
For more options, visit https://groups.google.com/d/optout.


Access Maven Metadata Plugin parameters in Jenkins pipeline Groovy script

2016-09-12 Thread kelemensanyi


Hi,

How can I access the values of the parameters provided by "Maven Metadata 
Plugin" in the Jenkins pipeline Groovy script?

I created a job with two parameters:

Name   Type
-  -
SomeStrString Parameter
SomeArtifact   List maven artifact versions

Pipeline Groovy script:

  node {

// This is OK
println 'SomeStr: '+ SomeStr

// These DON'T WORK
println 'SomeArtifact: ' + SomeArtifact
println 'SomeArtifact: ' + SomeArtifact_VERSION
println 'SomeArtifact: ' + System.getenv('SomeArtifact')
println 'SomeArtifact: ' + System.getenv('SomeArtifact_VERSION')

  }


While the value of SomeStr is printed correctly, none of the above attempts 
work for the SomeArtifact property. I tried it with and without Groovy 
Sandbox as well, but no luck.

Versions: Jenkins 2.14, Maven Metadata Plugin for Jenkins CI server 1.4.1, 
Pipeline 2.1
Best Regards,
Sándor

-- 
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/16d30ee8-5665-4ba6-97a7-f1aab4860901%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


enkins Findbugs plugin graph not showing in jenkins server

2016-09-12 Thread Vineet Yadav
Hi Group Members,



i need your help ,I successfully installed findbugs in my linux server but
my findbugs graph are not shown in my dashboard.



can you please help me on this .



i am install using command line my findbugs is working but i am unable to
see graph same i am also getting in PMD and check style .



please help me on this.



Jenkins 2.9



Regards,

Vineet

-- 
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/CAO745kg8Z6gaCg-uZdP%3DPiQFg1nTuxNuD9vKf33xM9vjo20Miw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Workspace

2016-09-12 Thread jerome
As stated above, it's the expected behavior. The workspace is used to build 
with

   - Jenkins/jobs/[jobname]
   -  Jenkins/jobs/[jobname]@script  (for pipeline Jenkinsfile script 
   checkout)
   
This is kind of a scratch space. You may want to clean that folder between 
build if you don't want incremental glitch into your build. I personnaly 
put it on a different disk that may get replaced more often and I don't 
backup those workspace.

The Jenkins/jobs/[jobname]/builds/[buildnumber] is the build result folder, 
so archived artifacts, generated info per build en up there. This is what 
you may want to backup along the config.

Jerome

-- 
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/b2b1a20f-985e-4d8d-9646-1514e909b2b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins user shows with 'Red Stop Sign' in security configuration

2016-09-12 Thread neethu shaju
Hi 

I have tried adding the user with all lower case but it is still showing 
red stop sign.

Thanks.


On Monday, 19 May 2014 20:38:10 UTC+5:30, Ioannis Moutsatsos wrote:
>
> Thanks Steve;
>
> Although I'm running Jenkins on Windows and I'm not using LDAP for 
> authentication, I think your observation was in fact *correct!*
>
> After adding the user name in *all lower case in the security matrix and 
> asking the user to re-register with an lower case username* the 'Red Stop 
> Sign' disappeared and the user is now able to build Jenkins jobs
> Originally, the user had used a mixed case user name which was probably 
> not preserved in a similar way across the entire Jenkins system and the 
> Windows file system
>
> Thanks for the helpful points!
>
> Best regards
> Ioannis
>
> On Sunday, May 18, 2014 4:58:31 AM UTC-4, Stephen Connolly wrote:
>>
>> Are you sure you have matched the username case exactly?
>>
>> The great "fun" is that people have assumed:
>>
>> * that usernames are case insensitive - WRONG: try *any* unix OS
>>
>> * that email addresses are case insensitive - WRONG: read the RFC, the 
>> DNS name is case insensitive, but the bit *before* the @ _may_or_may_not_ 
>> be case sensitive, only the server that holds the mailbox knows the answer.
>>
>> Now sane system admins on unix systems only use lowercase usernames 
>> because it creates less problems.
>>
>> Since this is the typical policy, most mailbox servers are configured to 
>> match ignoring case.
>>
>> Similarly, LDAP directory servers default schema relies on an email 
>> attribute that is specified as case insensitive.
>>
>> Thus in 99% of cases usernames are case insensitive in the real world... 
>> However with over 7 Jenkins installations you could expect perhaps 700 
>> +/- sqrt(700)*2 of them to be facing case sensitivity issues.
>>
>> Yet there is an army of devs for Jenkins that have been submitting bugs 
>> and fixes to make Jenkins case insensitive.
>>
>> I gave an open pull request to make case sensitivity configurable, but 
>> until then you are in a limbo-land with regards to case sensitivity.
>>
>> The biggest source of issues is Active Directory servers in larger 
>> organisations where there was a consolidation of different directory 
>> servers due to mergers and acquisitions... You have some users with email 
>> address reported as john...@acme.com, others as john...@acme.com, and 
>> others as john...@acme.com. The users normally just type in their 
>> username in lowercase so may not be aware of how their username is being 
>> reported from AD (unless they go to the JENKINS_URL/whoAmI page).
>>
>> On Saturday, 17 May 2014, Ioannis Moutsatsos  wrote:
>>
>>> We are using matrix security configuration (Jenkins  v 1.532 LTS on 
>>> Windows)
>>> Recently a user 'self-signed' for an account, and when I tried to setup 
>>> his security configuration he is the only one in the user list appearing 
>>> with a red stop sign before his user name. 
>>>
>>> What does that mean? Is there something I'm missing? I've setup several 
>>> other users in the past with no issues.
>>>
>>> I have reloaded the Jenkins configuration from disk but did not make any 
>>> difference.
>>>
>>> Thanks in advance for any feedback you may have.
>>> Ioannis
>>>
>>> -- 
>>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> Sent from my phone
>>
>

-- 
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/1b3ec63e-5a04-47f7-aaf2-861c5fd838f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Potential bug with Config File Management plugin and Credentials plugin dropping anything other than id, username, password

2016-09-12 Thread Charlie Evans
Hello,

I'm using Config File Management to create a settings.xml file with the 
Oracle maven repository as a . The repository requires login so I'm 
using a username, password credential and the Replace All functionality. 
Unfortunately this does not work because the server requires additional 
configuration parameters: 


  maven.oracle.com
  username
  password
  

  ANY
  ANY
  OAM 11g


  

  
http.protocol.allow-circular-redirects
%b,true
  

  

  


When I run mvn clean install with this pom, the effective pom drops the 
 part and only has the id, username and password. This then 
causes the build to fail.

Is this a known bug or am I doing something wrong?

Thanks

-- 
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/d7911cc6-99a6-4425-8371-956a568e3e68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pipeline multi branch, how to continue if error occures

2016-09-12 Thread Klaus Rudolph
Hi all,

if I use gtest in pipeline setup and have a unit test which fails the groovy 
script stops.

How can I tell the script that I want to continue so that I am able to see the 
results from xunit/gtest plugin?

>From the gui without running Jenkinsfile there I had to write "set +e" in the 
>dialog box, but I don't know how to write that in groovy.

Regards
 Klaus
 

-- 
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/trinity-f10a84f1-7b06-4723-aa4a-003d1b0e65e7-1473679221179%403capp-gmx-bs34.
For more options, visit https://groups.google.com/d/optout.


Re: Post build task doesnt save

2016-09-12 Thread Antony Gelberg
I found it in the end. If "Escalate script execution status to job status" 
is checked, a task added below doesn't save, and is silently deleted. 

On Monday, 12 September 2016 12:55:03 UTC+3, Antony Gelberg wrote:
>
> Hi all,
>
> This is still an issue after upgrading to 2.21. Still no clues on how to 
> debug this?
>
> On Wednesday, 7 September 2016 16:32:11 UTC+3, Antony Gelberg wrote:
>>
>> Hi all,
>>
>> This should be the easy stuff but for some reason it's not happening. :)
>>
>> I'm trying to add a Post build task to a project that already has one. I 
>> click Add another task and fill in the relevant fields. When I click on 
>> Save, fill in the git comment for the commit (we use SCM Sync), then Save, 
>> I am returned to the project page, but the task is not added. There's 
>> nothing in the logs.
>>
>> How can I find out what's happening? NB Adding the exact same post-build 
>> task to other projects succeeded with no issues.
>>
>> Running 1.647, SCM Sync status is sunny.
>>
>> Antony
>>
>

-- 
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/89787340-01f0-438e-a0fa-4f6471c713c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Post build task doesnt save

2016-09-12 Thread Antony Gelberg
Hi all,

This is still an issue after upgrading to 2.21. Still no clues on how to 
debug this?

On Wednesday, 7 September 2016 16:32:11 UTC+3, Antony Gelberg wrote:
>
> Hi all,
>
> This should be the easy stuff but for some reason it's not happening. :)
>
> I'm trying to add a Post build task to a project that already has one. I 
> click Add another task and fill in the relevant fields. When I click on 
> Save, fill in the git comment for the commit (we use SCM Sync), then Save, 
> I am returned to the project page, but the task is not added. There's 
> nothing in the logs.
>
> How can I find out what's happening? NB Adding the exact same post-build 
> task to other projects succeeded with no issues.
>
> Running 1.647, SCM Sync status is sunny.
>
> Antony
>

-- 
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/2f929486-dd47-4ac4-aa89-1958d482bc9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [SECURITY] How to protect pipeline jobs using GitHub branch/PR auto-discovery from doing harm

2016-09-12 Thread Leandro Lucarella
On Sat, 10 Sep 2016 09:57:33 -0700 (PDT)
jpd4nt  wrote:
> Use slaves, not the master to run jobs.
> 
> If you want chroot workspaces you could use docker slaves, run a
> container per job etc.

Mmmm, OK, but we need to create docker images to run the jobs based on
what is in the repository we are fetching. Is it possible to run a
docker container inside a docker slave (which I assume is a container
itself)?

-- 
Leandro Lucarella
Technical Development Lead
Sociomantic Labs GmbH 

-- 
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/20160912113743.09dd0925%40labs-064.localdomain.
For more options, visit https://groups.google.com/d/optout.


snipped generator for xunit google test

2016-09-12 Thread Klaus Rudolph
Hi all,

I want to generate a code snipped to use it in the jenkins pipeline 
"Jenkinsfile".

But I can't find the xunit / gtest inside the 
"jenkins->"MyProject"->Pipeline-Syntax->Snippet Generator.

There is a very long list which items e.g archieve, build, scm and so on. But I 
can't find any xunit or related tools/plugins here.

Can anyone explain how to get xunit for gtest integrated into the 
plugin/jenkinsfile.

Thanks!
 Klaus

-- 
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/trinity-897058b4-1ce9-48d0-b168-b00c546bb685-1473672338404%403capp-gmx-bs77.
For more options, visit https://groups.google.com/d/optout.


The new Global Pipeline Library

2016-09-12 Thread Sverre Moe
There has been changes in the Global Pipeline Library plugin
https://issues.jenkins-ci.org/browse/JENKINS-31155

Jenkins Configuration => Global Pipeline Libraries
Choosing "Modern SCM" the next drop down list is empty. What does this 
option actually do?
Choosing "Legacy SCM" I'm able to define a git repository for the library.








According to the documentation:

> It can be used in two modes: a legacy mode in which there is a single Git 
> repository hosted by Jenkins itself, to which you may push changes; and a 
> more general mode in which you may define libraries hosted by any SCM in a 
> location of your choice.


Should it not be the other way around for the modes in configuration? 
Modern SCM should have option to add SCM.



The best way to specify the SCM is using an SCM plugin which has been 
> specifically updated to support a new API for checking out an arbitrary 
> named version (Modern SCM option). Initially the Git and Subversion plugins 
> have this modification

Choosing Modern SCM there is no option in the drop down list. Neither git 
nor subversion. Though they are with Legacy SCM.



If your SCM plugin has not been integrated, you may select Legacy SCM and 
> pick anything offered. In this case, you need to include 
> ${library.yourLibName.version} somewhere in the configuration of the SCM, 
> so that during checkout the plugin will expand this variable to select the 
> desired version.

For a library in a git repository would I need to tag a specific version?


---


It is great that we now can use a shared library stored with our own Git 
remote repository server. However until we transition to that have 
workflowLibs.git work as before.


If I move the shared library to a different SCM I would probably need to 
remove workflowLibs.git otherwise how would Jenkins know which one to load 
as I need to load it implicitly.

-- 
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/6c9d950a-0c0b-4ead-96a3-b23a227e4f50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Detect the git repo for multi-branch pipeline

2016-09-12 Thread Sverre Moe
Use instead
checkout scm

It will checkout code from the repository

fredag 9. september 2016 19.15.03 UTC+2 skrev Phil Swenson følgende:
>
> Hi, I have a multi branch pipeline configuration job working fine so 
> far
>
> However every single repository has exactly the same jenkinsfile except 
> for the git repo name.
>
> a typical jenkinsfile looks like:
>
> node('docker-slave') {
> withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 
> 'NEXUS', usernameVariable: 'NEXUS_USERNAME', passwordVariable: 
> 'NEXUS_PASSWORD']]) {
> git url: 'g...@bitbucket.org:myco/myprob.git', branch: 
> env.branch_name, credentialsId: '08df8ab41de0', variable: 'CREDENTIALS'
> stage 'Test'
> sh 'env > env.txt'
> sh 'cat env.txt'
> sh 'make verify'
> }
> }
>
>
> What I'd like to do is detect which git repo triggered the build so I don't 
> have to hardcode it in the jenkinsfile.  
>
>
>
> So what I'd like is to change the git line to something like:
>
>
>  git url: *env.GIT_URL*, branch: env.branch_name, credentialsId: 
> '08df8ab41de0', variable: 'CREDENTIALS'
>
>
>
> This gets me closer to my eventual goal of storing my Jenkinsfile in a common 
> location instead of having to copy it repo to repo and modify it repo to repo.
>
>
> Any ideas?
>
>
> Thanks
>
> phil
>
>

-- 
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/0b207773-2ec0-4af3-a95a-6703a711f692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.