Re: nexusUser and nexusPassword

2023-01-21 Thread 'Martin Schmude' via Jenkins Users
You should make use of the Jenkins credentials store.
https://www.jenkins.io/doc/book/using/using-credentials/
Several kinds of secrets can be stored there. Type "User and password" 
suits your needs.

How to use that in your pipeline script:
https://www.jenkins.io/doc/pipeline/steps/credentials-binding/


mats...@gmail.com schrieb am Freitag, 20. Januar 2023 um 21:37:38 UTC+1:

> Hi,
>
> Here is my build.gradle:
>
> repositories {
> mavenLocal()
> mavenCentral()
> // nexus credentials (nexusUser and nexusPassword) are stored in 
> ~/.gradle/gradle.properties
> maven {
> url "${nexusRepoUrl}/repository/maven-public/"
> credentials {
> username = nexusUser
> password = nexusPassword
> }
> }
> }
>
> How can I provide nexusUser and nexusPassword to the job (ideally 
> globally)?
>
> Regards, Sunil
>
>

-- 
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/696d22d9-16ad-4a97-877a-ff9510a6be74n%40googlegroups.com.


Re: jenkins parameters issues

2022-06-25 Thread 'Martin Schmude' via Jenkins Users
That's not possible. Job parameters cannot depend on each other.
You can only add an explanatory description to the booleanParam A to make 
it clear to user that the value of the extendedChoice parameter will be 
ignored by the job if A is false.

zzgua...@gmail.com schrieb am Freitag, 24. Juni 2022 um 16:13:22 UTC+2:

> Hi team,
>   I have such a requirement on the Jenkins pipeline: when creating 
> parameters, there is a booleanParam parameter A, when A is true, I want the 
> extendedChoice boxes will pop up automatically, and the multi-select 
> parameters of this box will be passed to later use, when A is false I need 
> this optional box is not displayed, and this false value is also used in 
> the back, how can I implement it, or what can I refer to, 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/e8203cbd-75d8-4497-ac78-0947e93f10bcn%40googlegroups.com.


Re: terinary operators in declared pipeline

2022-06-02 Thread 'Martin Schmude' via Jenkins Users
You can code
def result = (branch == "main" 
  ? "@daily" 
  : (branch == "master" 
? "@hourly" 
: ""))

Maybe you find a switch more readable:
def result
switch(branch) {
case "main":
result = "@daily"
break
case "master":
result = "@hourly"
break
default:
result = ""
}

rmorg...@gmail.com schrieb am Mittwoch, 1. Juni 2022 um 18:48:02 UTC+2:

> I know you can do terninary operations.  Is it possible to chain them?
>
> so,
> if branch = "main" ? "@daily":""
> if branch = "master" ?" @hourly":""
> and so on?
>
>
>

-- 
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/a5dae6ab-1128-4d17-98fd-2c5c8af6f51fn%40googlegroups.com.


Re: terinary operators in declared pipeline

2022-06-02 Thread 'Martin Schmude' via Jenkins Users
You can code
def result = (branch == "main" ? "@daily" : (branch == "master" ? "@hourly" 
: ""))

Maybe you find a switch more readable:
def result
switch(branch) {
case "main": result = "@daily"
   break
case "master": result = "@hourly"
   break
default: result = ""
}

rmorg...@gmail.com schrieb am Mittwoch, 1. Juni 2022 um 18:48:02 UTC+2:

> I know you can do terninary operations.  Is it possible to chain them?
>
> so,
> if branch = "main" ? "@daily":""
> if branch = "master" ?" @hourly":""
> and so on?
>
>
>

-- 
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/5fb01744-46c3-40fd-8d3b-37649b41be69n%40googlegroups.com.


Re: terinary operators in declared pipeline

2022-06-02 Thread 'Martin Schmude' via Jenkins Users
You can code
```
def result = (branch == "main" ? "@daily" : (branch == "master" ? "@hourly" 
: ""))
```
Maybe you find a switch more readable:
```
def result
switch(branch) {
case "main": result = "@daily"
   break
case "master": result = "@hourly"
   break
default: result = ""
}
```

rmorg...@gmail.com schrieb am Mittwoch, 1. Juni 2022 um 18:48:02 UTC+2:

> I know you can do terninary operations.  Is it possible to chain them?
>
> so,
> if branch = "main" ? "@daily":""
> if branch = "master" ?" @hourly":""
> and so on?
>
>
>

-- 
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/69087581-6d2f-445e-9534-93458b219f65n%40googlegroups.com.


Re: Properties in a pipeline

2022-05-20 Thread 'Martin Schmude' via Jenkins Users
This script  

pipeline {
agent any
stages {
stage('play with properties') {
steps {
script {
def propsText = 'prop1 = val1\nprop2 = 
val2\nbuild.host=mybuildhost.hosts.myorganization.org'
writeFile file: 'myProps.properties', text: propsText
def props = readProperties file: 'myProps.properties'
echo "${props}"
echo props['build.host']
}
}
}
}
}

works. You can read properties from a properties file into a variable and 
then access the properties by indexing that variable.  
But you have to place the variable into a script block. The declarative 
syntax of Jenkins pipelines 
(https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline) 
doesn't allow them anywhere else, in particular not "... right at the 
beginning.".  
So if you need the properties in several script blocks you have to 
readProperties them in each of the blocks.  

This is different with the scripted syntax 
(https://www.jenkins.io/doc/book/pipeline/syntax/#scripted-pipeline) where 
you can set a variable in an outer block that spans multiple stages, like 
this:

node {
def props = ''
stage('read properties') {
writeFile file: 'myProps.properties', text: 'prop1 = val1\nprop2 = 
val2\nbuild.host=mybuildhost.hosts.myorganization.org'
props = readProperties file: 'myProps.properties'
echo "${props}"
}
stage('access properties') {
echo props['build.host']
}
}




-- 
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/eeb2c2a9-4088-410e-a8bf-0b7f5c92b068n%40googlegroups.com.


Re: nested each

2022-02-05 Thread 'Martin Schmude' via Jenkins Users
In the past I ran into issues with pipeline scripts that did not behave as 
expected due to CPS transformation.
See https://www.jenkins.io/doc/book/pipeline/cps-method-mismatches/
https://www.jenkins.io/doc/book/pipeline/pipeline-best-practices/#using-noncps
Try to annotate interesting_commit_check() with @NonCPS.

jeremy@dzsi.com schrieb am Freitag, 4. Februar 2022 um 21:18:46 UTC+1:

> what's wrong with this code? The output from it was 
>
> [Pipeline] echo 
> [modules/core/rwvx,
>  modules/automation/core, modules/tools/scripts, modules/toolchain, 
> modules/tools/CI, modules/core/util, modules/im/platform][Pipeline] echo 
> (modules/core/rwvx|modules/automation/core|modules/tools/scripts|modules/toolchain|modules/tools/CI|modules/core/util|modules/im/platform).*[Pipeline]
>  echo 
> file:
>  "modules/im/platform"[Pipeline] echo 
> interesting
>  submodule change: modules/im/platform[Pipeline] echo 
> no
>  interesting commits found.
>
>
> which implies that the "return true" was ignored 
>
>
>
> def interesting_commit_check(topmodule) { 
> // returns true if any interesting commits are found
> modules=get_dependency_list(topmodule)
> modules_re = "(" + modules.join('|') + ").*"
> println("${modules_re}")
> currentBuild.changeSets.each {
> it.items.each {
> it.affectedFiles.each {
> pth = it.getPath()
> println("file: \"${pth}\"")
> if (it.getPath().matches('^modules.*')) {
> // in a submodule ... is it an important one?
> if (pth.matches(modules_re)) {
> print("interesting submodule change: ${pth}")
> return true
> } else {
> print("ignoring submodule change in ${pth}")   
> 
>
> }
> } else {
> if ( pth == "RELEASE" ) {
> println("ignoring release change")
> } else {
> print("ignoring supermod change: ${pth}")
> }
> }
> }
> }
> }
> print("no interesting commits found.")
> return false
> }
>
> *Jeremy Mordkoff*
> Director, Engineering Services
> 
>
> *Headquarters: 5700 Tennyson Parkway, Plano, Texas, USA *
> *Mobile*: +1 978.257.2183 <(978)%20257-2183>
> *Email: *jeremy@dzsi.com
>
> 
>
>  
>  
> 
>
>
> *Disclaimer*
>
> The information contained in this communication from the sender is 
> confidential. It is intended solely for use by the recipient and others 
> authorized to receive it. If you are not the recipient, you are hereby 
> notified that any disclosure, copying, distribution or taking action in 
> relation of the contents of this information is strictly prohibited and may 
> be unlawful.
>
>

-- 
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/c59ec0ed-d858-4285-9b1b-469f3d36cc51n%40googlegroups.com.


Re: Unable to execute test script from Jenkins

2021-08-24 Thread 'Martin Schmude' via Jenkins Users
Maven expects test classes in folder ./src/test/java. In 
https://github.com/RajuKumar9/fourthrepository there is no such folder.
There are no test classes, so Maven can't compile and execute any tests.

raju@ashmar.in schrieb am Dienstag, 24. August 2021 um 15:18:24 UTC+2:

> Hello Guys.
> I am facing issue with Jenkins my test locally running but on AWS it's 
> showing build successful but no tests run , Please Help me.
> Console OutputStarted by user Saurav Kumar 
>  Running as SYSTEM Building in 
> workspace /var/lib/jenkins/workspace/Test The recommended git tool is: NONE 
> using credential c30f8c69-28d8-49ad-9c72-00d5e0fa6ce4 > 
> /usr/libexec/git-core/git rev-parse --resolve-git-dir 
> /var/lib/jenkins/workspace/Test/.git # timeout=10 Fetching changes from the 
> remote Git repository > /usr/libexec/git-core/git config remote.origin.url 
> https://github.com/RajuKumar9/fourthrepository.git # timeout=10 Fetching 
> upstream changes from https://github.com/RajuKumar9/fourthrepository.git 
> > /usr/libexec/git-core/git --version # timeout=10 > git --version # 'git 
> version 2.32.0' using GIT_ASKPASS to set credentials > 
> /usr/libexec/git-core/git fetch --tags --force --progress -- 
> https://github.com/RajuKumar9/fourthrepository.git 
> +refs/heads/*:refs/remotes/origin/* # timeout=10 > 
> /usr/libexec/git-core/git rev-parse refs/remotes/origin/master^{commit} # 
> timeout=10 Checking out Revision 4c65d217dacd115b40a8fce94d04707474418aab 
> (refs/remotes/origin/master) > /usr/libexec/git-core/git config 
> core.sparsecheckout # timeout=10 > /usr/libexec/git-core/git checkout -f 
> 4c65d217dacd115b40a8fce94d04707474418aab # timeout=10 Commit message: "new 
> changes" > /usr/libexec/git-core/git rev-list --no-walk 
> 4c65d217dacd115b40a8fce94d04707474418aab # timeout=10 [Test] $ mvn clean 
> test [INFO] Scanning for projects... [INFO] [INFO] 
>  
> [INFO] Building simplett $1.0-SNAPSHOT [INFO] 
>  
> [INFO] [INFO] *--- maven-clean-plugin:2.5:clean (default-clean) @ 
> simplett --- *[INFO] Deleting /var/lib/jenkins/workspace/Test/target 
> [INFO] [INFO] *--- maven-resources-plugin:2.6:resources 
> (default-resources) @ simplett --- *[INFO] Using 'UTF-8' encoding to copy 
> filtered resources. [INFO] Copying 5 resources [INFO] skip non existing 
> resourceDirectory 
> /var/lib/jenkins/workspace/Test/src/main/java/yourorganization/maven_sample 
> [INFO] [INFO] *--- maven-compiler-plugin:3.1:compile (default-compile) @ 
> simplett --- *[INFO] Changes detected - recompiling the module! [INFO] 
> Compiling 5 source files to /var/lib/jenkins/workspace/Test/target/classes 
> [INFO] [INFO] *--- maven-resources-plugin:2.6:testResources 
> (default-testResources) @ simplett --- *[INFO] Using 'UTF-8' encoding to 
> copy filtered resources. [INFO] skip non existing resourceDirectory 
> /var/lib/jenkins/workspace/Test/src/test/resources [INFO] [INFO] *--- 
> maven-compiler-plugin:3.1:testCompile (default-testCompile) @ simplett --- 
> *[INFO] 
> No sources to compile [INFO] [INFO] *--- 
> maven-surefire-plugin:2.19.1:test (default-test) @ simplett --- *[INFO] 
> No tests to run. [INFO] 
>  
> [INFO] BUILD SUCCESS [INFO] 
>  
> [INFO] Total time: 4.209 s [INFO] Finished at: 2021-08-24T07:32:17Z [INFO] 
> Final Memory: 14M/38M [INFO] 
>  
> Finished: SUCCESS
>
>  POM File
>
> http://maven.apache.org/POM/4.0.0; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd;>
> 4.0.0
> simplet
> simplett
> $1.0-SNAPSHOT
> 
> UTF-8
> 1.8
> 1.8
> 
> 
> 
> 
> src\main\java
> 
> 
> src\main\java\yourorganization\maven_sample
> www
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-surefire-plugin
> 3.0.0-M5
> 
> 
> testng.xml
> 
> 
> 
>
> 
> org.apache.maven.plugins
> maven-shade-plugin
> 3.2.4
>  
> 
> 
> shade
> 
> 
> 
> true
> 
>
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
> 
> com.yourorganization.maven_sample.LogicPositivizer
> 
>  com.yourorganization.maven_sample.SecondUser
> 
>  com.yourorganization.maven_sample.ThirdUser
> 
>  

Re: Jenkins Jobs Folder in Docker

2021-04-09 Thread 'Martin Schmude' via Jenkins Users
This is similar to the customized docker image that we build for Jenkins.
We just leave the $JENKINS_HOME/jobs folder intentionally inside the 
container. so that all job configurations are part of the docker image.
A Jenkins instance started from such an image has all its jobs available 
out-of-the-box.

There is in fact no option to tell Jenkins to use a different jobs folder 
other then $JENKINS_HOME/jobs.
As a workaround you could replace the $JENKINS_HOME/jobs folder by a link 
to e.g. /var/jenkins/jobs and let docker map a volume to /var/jenkins.

bco...@gmail.com schrieb am Freitag, 9. April 2021 um 17:44:56 UTC+2:

> Hello,
>
> I am building a custom docker image from jenkins/jenkins.  I would like to 
> have the jobs, builds, and workspace folder be on an external volumne from 
> from the container, but keep the rest of the configuration inside the 
> container.
>
> I have found where it is possible to set flags for builds and workspace, 
> however, cannot find anything to externalize jobs folder.  Is this possible?
>
> Thanks
> Bruce
>

-- 
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/c631227a-b5e1-4161-bfe8-52e1b2934f29n%40googlegroups.com.


Re: I cannot run Azure CLI commands from jenkins pipeline

2021-04-06 Thread 'Martin Schmude' via Jenkins Users
Maybe az has not been installed on the system where the job is executed.
Or az is not part of the PATH variable in the context of the job execution.
Let the job execute "echo $env:path" before any "az ..." commands, so that 
it prints out its path environment variable.

jesusfern...@gmail.com schrieb am Dienstag, 6. April 2021 um 13:21:16 UTC+2:

> I am trying to run some az commands from a Jenkins pipeline which (running 
> in Windows 10) I already used in my laptop´s Jenkins, but when trying to 
> use it on another computer (also running w10) I get this error : 
> ```
> 11:12:47  powershell.exe : az : The term 'az' is not recognized as the 
> name of a cmdlet, function, script file, or operable program. Check the 
> 11:12:47  At 
> C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellWrapper.ps1:3
>  
> char:1
> 11:12:47  + & powershell -NoProfile -NonInteractive -ExecutionPolicy 
> Bypass -Comm ...
> 11:12:47  + 
> ~
> 11:12:47  + CategoryInfo  : NotSpecified: (az : The term 
> '...ram. Check the :String) [], RemoteException
> 11:12:47  + FullyQualifiedErrorId : NativeCommandError
> 11:12:47   
> 11:12:47  spelling of the name, or if a path was included, verify that the 
> path is correct and try again.
> 11:12:47  At 
> C:\Users\User\.jenkins\workspace\playground\tmp\durable-933c3d89\powershellScript.ps1:3
>  
> char:25
> 11:12:47  + az devops configure --defaults 
> organization=h ...
> 11:12:47  + ~~
> 11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
> CommandNotFoundException
> 11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
> 11:12:47   
> 11:12:47  az : The term 'az' is not recognized as the name of a cmdlet, 
> function, script file, or operable program. Check the 
> 11:12:47  spelling of the name, or if a path was included, verify that the 
> path is correct and try again.
> 11:12:47  At 
> C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellScript.ps1:4
>  
> char:35
> 11:12:47  + $output = az boards work-item show 
> --id=89609 ...
> 11:12:47  +   ~~
> 11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
> CommandNotFoundException
> 11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
> ```
> However running any command from the cmd / powershell works fine. I have 
> set the ```Set-ExecutionPolicy Unrestricted``` command but I do not get any 
> hint of what is going wrong
>

-- 
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/c0d50cf9-303a-4c81-b735-d5989714336cn%40googlegroups.com.


Re: No space left on device

2021-04-05 Thread 'Martin Schmude' via Jenkins Users
In case anybody is not aware of windirstat: it is a disk space analysis 
tool for Windows.
https://windirstat.net/



Mark Waite schrieb am Montag, 5. April 2021 um 13:34:11 UTC+2:

> Windirstat
>
> On Mon, Apr 5, 2021, 3:06 AM 'Venkat' via Jenkins Users <
> jenkins...@googlegroups.com> wrote:
>
>> Hi Mark,
>>
>> Thanks for the reply, How can we get the same details on the windows 
>> server.
>>
>>
>> Regards
>> Venkat
>>
>> On Thu, Apr 1, 2021 at 7:22 PM Mark Waite  wrote:
>>
>>> Delete files to recover space.  The command "du -x /var/lib/jenkins/ | 
>>> sort -r -n | less" is a great help to identify the largest directories in 
>>> your installation.  Then you can decide what you want to do about those 
>>> large directories.
>>>
>>> Sometimes, it is as simple as configuring the jobs to only retain a 
>>> small number of recent builds.  The configuration slicing plugin can assist 
>>> with applying a setting to many job definitions at the same time.
>>>
>>> Mark Waite
>>>
>>> On Thu, Apr 1, 2021 at 7:47 AM 'Venkat Vemuri' via Jenkins Users <
>>> jenkins...@googlegroups.com> wrote:
>>>
 Hello Jenkins community,

 on the Jenkins server, I am getting *No space left on the device *message 
 while trying to run a  job, Is there any way that without increasing the 
 space we can handle this space issue.



 :33:25 java.nio.file.FileSystemException: 
 /var/lib/jenkins/workspace/shortlistsyncservice-gcpqa/target/shortlistsyncsearch.jar
  
 -> 
 /var/lib/jenkins/jobs/shortlistsyncservice-gcpqa/modules/net.shortlist$shortlistsyncsearch/builds/74/archive/net.shortlist/shortlistsyncsearch/1.0/shortlistsyncsearch-1.0.jar:
  
 *No space left on device*
 08:33:25 at 
 sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
 08:33:25 at 
 sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
 08:33:25 at sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:253)
 08:33:25 at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:581)
 08:33:25 at 
 sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
 08:33:25 at java.nio.file.Files.copy(Files.java:1274)
 08:33:25 at 
 hudson.FilePath$CopyRecursiveLocal$1.visit(FilePath.java:2487)
 08:33:25 at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
 08:33:25 at 
 hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:3192)
 08:33:25 at 
 hudson.FilePath$CopyRecursiveLocal.invoke(FilePath.java:2476)
 08:33:25 at 
 hudson.FilePath$CopyRecursiveLocal.invoke(FilePath.java:2460)
 08:33:25 at hudson.FilePath.act(FilePath.java:1076)
 08:33:25 at hudson.FilePath.act(FilePath.java:1059)
 08:33:25 at hudson.FilePath.copyRecursiveTo(FilePath.java:2408)
 08:33:25 at 
 jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:70)
 08:33:25 at 
 hudson.maven.MavenBuild$ProxyImpl.performArchiving(MavenBuild.java:514)
 08:33:25 at 
 hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:881)
 08:33:25 at 
 hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
 08:33:25 at hudson.model.Run.execute(Run.java:1880)
 08:33:25 at 
 hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
 08:33:25 at 
 hudson.model.ResourceController.execute(ResourceController.java:97)
 08:33:25 at hudson.model.Executor.run(Executor.java:428)
 08:33:26 An attempt to send an e-mail to empty list of recipients, 
 ignored.

 -- 
 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/01777d0d-9c2d-4f30-85f8-9d4a0770f483n%40googlegroups.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-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG69oCWd7piVYkJpP%2BWSMvH16Qhgzqm5cJvTi6Si61vxQ%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>>
>>
>> -- 
>> Thanks & Regards
>>
>> Venkat
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving 

Re: keep the docker container alive even on job failure and re use it for replay

2021-03-23 Thread 'Martin Schmude' via Jenkins Users
Don't start the container by the long-running job. Setup a second job that 
starts the container, so that the first job may fail without affecting the 
container.

ananthm...@gmail.com schrieb am Dienstag, 23. März 2021 um 15:23:29 UTC+1:

> Hi all , 
>
> I am looking for a feature where i need to docker container to be alive 
> even the job failed . to give the context , i am trying to develop do build 
> which take long time and whenever it build fails at some point i need to do 
> all the steps again . to avoid this i need to docker container to be alive 
> even when job get failed . 
>
> in addition to this i should be able to use the same docker container to 
> replay the same job again form a later stage . 
>
> i looked at the issues page for a while but couldn't find any similar ones 
> . if anyone has faced the issue let me know your thought on how can this 
> problem be solved . 
>

-- 
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/2b16fe88-d9ac-48bc-8a82-86f9fb947b5dn%40googlegroups.com.


Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

2021-03-19 Thread 'Martin Schmude' via Jenkins Users
Our Jenkins connects to Linux nodes by SSH with RHEL 7. The git version is 
1.8.3.1.
So the hint about an overaged git version is presumably right. Thank you, 
Mark!
The node systems are managed by the companies IT infrastructure team and 
only partially under my control.
So the JGit way looks promising and we will give it a try.



Mark Waite schrieb am Dienstag, 16. März 2021 um 19:52:55 UTC+1:

> On Wednesday, February 24, 2021 at 9:25:10 AM UTC-7 Martin Schmude wrote:
>
>> Hello all,
>> I am experiencing the following issue.
>> I have a pipeline job (not multibranch). In the job configuration the 
>> Jenkinsfile is checked out from git. The checkout is not lightweight (there 
>> is a tick "Lightweight checkout", which is not set).
>> A node job parameter is configured.
>> When starting the job the git checkout of the Jenkinsfile fails with
>>
>> Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
>> --progress -- https://gitlab.XXX.com/project.git 
>>  
>> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
>> ...
>> fatal: could not read Username for 'https://gitlab.XXX.com 
>> ': terminal prompts disabled
>>
>> Note that the Jenkinsfile has not started to be executed at that moment, 
>> since Jenkins failed to check it out.
>> The error does not occur if
>>
>>- if the selected node is master, or
>>- if the "Lightweight checkout" is selected.
>>
>> It does also not occur if no node parameter is configured at all.
>>
>> Is this expected behaviour or an bug? Should I file a ticket in 
>> https://issues.jenkins.io? I haven't found a ticket there that exactly 
>> matches my issue.
>> This 
>> https://groups.google.com/g/jenkinsci-users/c/hg4OUmlS9T8/m/Lg8UYopCBAAJ
>> looks related. But the root cause there was a file permissions issue, 
>> which is surely not the case in my setup.
>>
>>
> You don't mention the operating system on the agent or the version of 
> command line git on the agent.  CentOS 6, Oracle Linux 6, Red Hat 
> Enterprise Linux 6, and Scientific Linux 6 all ship a 1.7 version of 
> command line git that is so old that it is not officially supported by the 
> Jenkins git plugin.  The plugin has made reasonable attempts to not break 
> things that happily work with that old version of command line git, but no 
> longer applies any effort to test it or to adapt to failures with it.
>
> You could enable JGit 
>  on your 
> installation and try the same checkout with JGit.  If it works with JGit, 
> that may be another indicator that the issue is with the version of command 
> line git on the agent.
>
> You could install the most recent version of command line git on the agent 
> (currently 2.31.0) and see if that resolves the issue.
>
> Mark Waite
>  
>
>> My Jenkins instance is 2.222.4, running in a container derived from the 
>> Jenkins base image jenkins/jenkins:2.222.4.
>>
>

-- 
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/34eb42ac-e942-44cd-b22c-68527410170fn%40googlegroups.com.


Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

2021-03-19 Thread 'Martin Schmude' via Jenkins Users
The agent is a docker container. Its image is derived 
FROM azul/zulu-openjdk:8u252

When inside the container
> uname -a
Linux 3a8cb7c9d3db 3.10.0-1160.6.1.el7.x86_64 #1 SMP Wed Oct 21 13:44:38 
EDT 2020 x86_64 x86_64 x86_64 GNU/Linux

> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"

Our Dockerfile installs git with 
RUN apt-get -y install git

When inside the container git tells my its version 2.17.1.
> git version
git version 2.17.1
git 2.17.1 is of May 2018, which seems to sooo overaged, in particular to 
1.7 mentioned before.


Mark Waite schrieb am Dienstag, 16. März 2021 um 19:52:55 UTC+1:

> On Wednesday, February 24, 2021 at 9:25:10 AM UTC-7 Martin Schmude wrote:
>
>> Hello all,
>> I am experiencing the following issue.
>> I have a pipeline job (not multibranch). In the job configuration the 
>> Jenkinsfile is checked out from git. The checkout is not lightweight (there 
>> is a tick "Lightweight checkout", which is not set).
>> A node job parameter is configured.
>> When starting the job the git checkout of the Jenkinsfile fails with
>>
>> Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
>> --progress -- https://gitlab.XXX.com/project.git 
>>  
>> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
>> ...
>> fatal: could not read Username for 'https://gitlab.XXX.com 
>> ': terminal prompts disabled
>>
>> Note that the Jenkinsfile has not started to be executed at that moment, 
>> since Jenkins failed to check it out.
>> The error does not occur if
>>
>>- if the selected node is master, or
>>- if the "Lightweight checkout" is selected.
>>
>> It does also not occur if no node parameter is configured at all.
>>
>> Is this expected behaviour or an bug? Should I file a ticket in 
>> https://issues.jenkins.io? I haven't found a ticket there that exactly 
>> matches my issue.
>> This 
>> https://groups.google.com/g/jenkinsci-users/c/hg4OUmlS9T8/m/Lg8UYopCBAAJ
>> looks related. But the root cause there was a file permissions issue, 
>> which is surely not the case in my setup.
>>
>>
> You don't mention the operating system on the agent or the version of 
> command line git on the agent.  CentOS 6, Oracle Linux 6, Red Hat 
> Enterprise Linux 6, and Scientific Linux 6 all ship a 1.7 version of 
> command line git that is so old that it is not officially supported by the 
> Jenkins git plugin.  The plugin has made reasonable attempts to not break 
> things that happily work with that old version of command line git, but no 
> longer applies any effort to test it or to adapt to failures with it.
>
> You could enable JGit 
>  on your 
> installation and try the same checkout with JGit.  If it works with JGit, 
> that may be another indicator that the issue is with the version of command 
> line git on the agent.
>
> You could install the most recent version of command line git on the agent 
> (currently 2.31.0) and see if that resolves the issue.
>
> Mark Waite
>  
>
>> My Jenkins instance is 2.222.4, running in a container derived from the 
>> Jenkins base image jenkins/jenkins:2.222.4.
>>
>

-- 
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/92d31317-ce27-4e69-89f1-f6ee6fc67377n%40googlegroups.com.


Re: Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

2021-03-03 Thread 'Martin Schmude' via Jenkins Users
Anybody able to answer my question?

Martin Schmude schrieb am Mittwoch, 24. Februar 2021 um 17:25:10 UTC+1:

> Hello all,
> I am experiencing the following issue.
> I have a pipeline job (not multibranch). In the job configuration the 
> Jenkinsfile is checked out from git. The checkout is not lightweight (there 
> is a tick "Lightweight checkout", which is not set).
> A node job parameter is configured.
> When starting the job the git checkout of the Jenkinsfile fails with
>
> Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
> --progress -- https://gitlab.XXX.com/project.git 
>  
> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
> ...
> fatal: could not read Username for 'https://gitlab.XXX.com 
> ': terminal prompts disabled
>
> Note that the Jenkinsfile has not started to be executed at that moment, 
> since Jenkins failed to check it out.
> The error does not occur if
>
>- if the selected node is master, or
>- if the "Lightweight checkout" is selected.
>
> It does also not occur if no node parameter is configured at all.
>
> Is this expected behaviour or an bug? Should I file a ticket in 
> https://issues.jenkins.io? I haven't found a ticket there that exactly 
> matches my issue.
> This 
> https://groups.google.com/g/jenkinsci-users/c/hg4OUmlS9T8/m/Lg8UYopCBAAJ
> looks related. But the root cause there was a file permissions issue, 
> which is surely not the case in my setup.
>
> My Jenkins instance is 2.222.4, running in a container derived from the 
> Jenkins base image jenkins/jenkins:2.222.4.
>

-- 
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/d214d81e-bb30-44d2-8fc2-58bf6852a5bdn%40googlegroups.com.


Non-lightweight git checkout of Jenkinsfile fails if node parameter is provided

2021-02-24 Thread 'Martin Schmude' via Jenkins Users
Hello all,
I am experiencing the following issue.
I have a pipeline job (not multibranch). In the job configuration the 
Jenkinsfile is checked out from git. The checkout is not lightweight (there 
is a tick "Lightweight checkout", which is not set).
A node job parameter is configured.
When starting the job the git checkout of the Jenkinsfile fails with

Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
--progress -- https://gitlab.XXX.com/project.git 
 
+refs/heads/*:refs/remotes/origin/*" returned status code 128:
...
fatal: could not read Username for 'https://gitlab.XXX.com 
': terminal prompts disabled

Note that the Jenkinsfile has not started to be executed at that moment, 
since Jenkins failed to check it out.
The error does not occur if

   - if the selected node is master, or
   - if the "Lightweight checkout" is selected.

It does also not occur if no node parameter is configured at all.

Is this expected behaviour or an bug? Should I file a ticket 
in https://issues.jenkins.io? I haven't found a ticket there that exactly 
matches my issue.
This https://groups.google.com/g/jenkinsci-users/c/hg4OUmlS9T8/m/Lg8UYopCBAAJ
looks related. But the root cause there was a file permissions issue, which 
is surely not the case in my setup.

My Jenkins instance is 2.222.4, running in a container derived from the 
Jenkins base image jenkins/jenkins:2.222.4.

-- 
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/7921577c-48e7-4a5a-a3e2-d20497bc6840n%40googlegroups.com.


Re: Can pipelines and stages be nested in a dependency graph? Or is there a better alternative.

2021-02-12 Thread 'Martin Schmude' via Jenkins Users
No, pipeline scripts cannot be nested.


Anil schrieb am Donnerstag, 11. Februar 2021 um 16:58:20 UTC+1:

> I have a number of tasks and some are dependent on others for completion.
> If task A is dependent on tasks B and C completing, then B and C will be 
> child tasks of A.
> It is also possible that task D is dependent on task B and then we have a 
> DAG.
> So they will form a dependency graph (Directed Acyclic Graph)
> Can I have a pipeline script with nested pipelines and jobs?
> Or is there a better alternative.
>

-- 
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/f507a1bc-26c0-46a3-956b-19bbd8c9af0cn%40googlegroups.com.


Conventions for names of Jenkins jobs and job stages

2021-01-27 Thread 'Martin Schmude' via Jenkins Users
Hello all,
at the department I am working at we operate a Jenkins with ~100 pipeline 
jobs.
The jobs have evolved over ~4 years without any conventions about job and 
stage names.
Today we have a mess. Related jobs cannot easily be recognized by name. The 
"logic" how a job is sectioned into stages is different between all jobs.

We want to clean up and establish naming conventions. Before thinking a lot 
myself an issue I want to become aware of how others solved it.
Maybe there are well established naming conventions out there that we don't 
know, but  could adopt easily. At jenkins.io I didn't land a hit.

Any hints? 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/c1a84e30-9d2f-41be-aeae-1404faf08b20n%40googlegroups.com.


Re: Portable Maven launch

2021-01-25 Thread 'Martin Schmude' via Jenkins Users
The if statement is not a pipeline step. It has to be wrapped in a script 
block: 
https://www.jenkins.io/doc/book/pipeline/syntax/#script


jochen@gmail.com schrieb am Sonntag, 24. Januar 2021 um 21:30:54 UTC+1:

> Thanks,
>
> sounds like what I was looking for. But then: Any ideas, what's wrong in 
> my script?
>
> pipeline {
> agent any
> tools { 
> maven 'Maven3' 
> jdk 'Java8' 
> }
> stages {
> stage ('afw-core') {
> steps {
> withMaven(
>  // Maven installation declared in the Jenkins "Global 
> Tool Configuration"
>  maven: 'Maven3',
>
> // Use `$WORKSPACE/.repository` for local repository 
> folder to avoid shared repositories
> mavenLocalRepo: '.repository',
> ) {
> if (isUnix()) {
> sh 'mvn -fafw/afw-core/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> } else {
> bat 'mvn.cmd -fafw/afw-core/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> }
> }
> }
> }
> stage ('afw-bootstrap') {
> steps {
> withMaven(
>  // Maven installation declared in the Jenkins "Global 
> Tool Configuration"
>  maven: 'Maven3',
>
> // Use `$WORKSPACE/.repository` for local repository 
> folder to avoid shared repositories
> mavenLocalRepo: '.repository',
> ) {
> if (isUnix()) {
> sh 'mvn -fafw/afw-bootstrap/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> } else {
> bat 'mvn.cmd -fafw/afw-bootstrap/pom.xml -Pjacoco 
> -Dmaven.test.failure.ignore=true clean install'
> }
> }
> }
> }
> }
> }
>
> The error message I am getting:
>
>
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> WorkflowScript: 17: Expected a step @ line 17, column 9.
> if (isUnix()) {
>^
> WorkflowScript: 34: Expected a step @ line 34, column 9.
> if (isUnix()) {
>^
>
> On Sunday, January 24, 2021 at 5:54:26 PM UTC+1 geoffroy...@gmail.com 
> wrote:
>
>> Hello
>> you probably want to use 
>> https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#isunix-checks-if-running-on-a-unix-like-node
>>
>>
>> On Saturday, 23 January 2021 at 21:19:43 UTC+1 jochen@gmail.com 
>> wrote:
>>
>>>
>>> Hi,
>>>
>>> I've got a pipeline file, that should be executable on a Windows build 
>>> server, and on a Linux build server. The pipeline is launching Maven as 
>>> follows:
>>>
>>> On Linux:
>>>
>>> sh "mvn "
>>>
>>> But on Windows, this appears not to work, so I've got to use:
>>>
>>>bat "mvn.cmd " 
>>>
>>> Right now, I can use either of these steps, so have to choose between 
>>> Windows, and Linux. Is there any possibility to get this portable? I am 
>>> thinking something like
>>>
>>>if (isWindows()) {
>>>bat "mvn.cmd " 
>>>} else {
>>> sh "mvn "
>>>}
>>>
>>> Thanks,
>>>
>>> Jochen
>>>
>>>
>>>
>>>

-- 
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/f318612c-c265-47eb-9546-83d1469ae717n%40googlegroups.com.


Re: .svn folder getting checked out

2020-12-30 Thread 'Martin Schmude' via Jenkins Users
I think you need not worry about the .svn folders that you observe in your 
current setup. You should worry why you did not note them in the former 
setup.
When investigating before/after issues like this, comparison of Jenkins job 
logs before and after a modification had been helpful to me in the past.

So, if possible, execute the same Jenkins job on the former and on the 
current setup once. Then compare their job logs, located in 
:/job///console.
You will find the SVN commands there by searching for "svn".
Do they look similar? Where have they been executed? On the Jenkins master 
or on a node?


bma...@gmail.com schrieb am Dienstag, 29. Dezember 2020 um 11:01:34 UTC+1:

> You should double check your svn plugin config and the platform you're 
> checking on as I said.
> Also, wondering whether your config is actually using the svn binaries or 
> javasvn (disclaimer: not sure it's still a thing, I've totally moved away 
> from even seeing an svn use from inside Jenkins 4+ years ago)
>
> On Linux, ls will *not* show the .svn folders but they're still present.
>
> Given you're using svn pre-1.7 there'll be such a folder in all folders in 
> the local repository.
>
> Cheers
>
> Le lun. 28 déc. 2020 à 08:55, Ven H  a écrit :
>
>> Thanks a lot for your response. PFB the details below.
>>
>> Server / Software Old New 
>> Jenkins 2.163 2.257 
>> Jenkins Controller Windows Server 2012 R2 Ubuntu 18.04.3 
>> Jenkins Agent Windows Server 2019 Standard Windows Server 2019 Standard 
>> SVN Version 1.6.2 1.6.2 
>>
>> Regards,
>> Venkatesh
>>
>>
>> On Sat, Dec 26, 2020 at 11:40 PM Baptiste Mathus  wrote:
>>
>>> On Windows or Linux?
>>>
>>> On Linux it will require ls -a to show them.
>>>
>>> Please check and provide svn versions and OS on various cases.
>>>
>>> Or possibly, you've been using 'svn export' in some cases. I don't know. 
>>> You're the one best positioned to check 
>>>
>>> Le sam. 26 déc. 2020 à 17:07, Ven H  a écrit :
>>>
>>>> I am pretty sure, it didn't create those folders in the old instance. 
>>>> We still have the old instance running since we are in the process of 
>>>> transitioning. I don't see those folders there. That's why I raised this 
>>>> query.
>>>>
>>>> Regards,
>>>> Venkatesh
>>>>
>>>>
>>>> On Sat, Dec 26, 2020 at 12:48 AM 'Martin Schmude' via Jenkins Users <
>>>> jenkins...@googlegroups.com> wrote:
>>>>
>>>>> SVN does not download .svn folders, it creates them while performing a 
>>>>> checkout.
>>>>> The .svn folders are documented in: 
>>>>> http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.basic.in-action.wc
>>>>> .
>>>>> With the older Jenkins instance every SVN checkout must have created a 
>>>>> .svn folder too. Maybe you just didn't take note of them before the 
>>>>> switch 
>>>>> to your newer Jenkins instance, for whatever reason.
>>>>>
>>>>>
>>>>> venh...@gmail.com schrieb am Freitag, 25. Dezember 2020 um 18:57:24 
>>>>> UTC+1:
>>>>>
>>>>>> Thank you for your response. SVN version has not changed in our case. 
>>>>>> Our controller has changed. It's a newer version of Jenkins. The older 
>>>>>> version was hosted on Windows and the newer version is hosted in a 
>>>>>> Docker 
>>>>>> container in a Linux environment. 
>>>>>>
>>>>>> The checkout step in the pipeline didn't download the .svn folders in 
>>>>>> the earlier (or older) Jenkins instance, whereas it is doing it in the 
>>>>>> newer Jenkins instance. SVN has not changed at all. Hope I have 
>>>>>> explained 
>>>>>> the problem statement correctly.
>>>>>>
>>>>>> Regards,
>>>>>> Venkatesh
>>>>>>
>>>>>>
>>>>>> On Fri, Dec 25, 2020 at 6:23 PM Baptiste Mathus  
>>>>>> wrote:
>>>>>>
>>>>>>> Not sure what exactly you're concerned about:
>>>>>>>
>>>>>>> Subversion always had this .svn folder. Since 1.7 it's only at the 
>>>>>>> root of the checked out repo.
>>>>>>> Before svn 1.7 it was literally in all directories.
>>>>>>>
>>>>>>> This is expected

Re: .svn folder getting checked out

2020-12-25 Thread 'Martin Schmude' via Jenkins Users
SVN does not download .svn folders, it creates them while performing a 
checkout.
The .svn folders are documented in: 
http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.basic.in-action.wc.
With the older Jenkins instance every SVN checkout must have created a .svn 
folder too. Maybe you just didn't take note of them before the switch to 
your newer Jenkins instance, for whatever reason.


venh...@gmail.com schrieb am Freitag, 25. Dezember 2020 um 18:57:24 UTC+1:

> Thank you for your response. SVN version has not changed in our case. Our 
> controller has changed. It's a newer version of Jenkins. The older version 
> was hosted on Windows and the newer version is hosted in a Docker container 
> in a Linux environment. 
>
> The checkout step in the pipeline didn't download the .svn folders in the 
> earlier (or older) Jenkins instance, whereas it is doing it in the newer 
> Jenkins instance. SVN has not changed at all. Hope I have explained the 
> problem statement correctly.
>
> Regards,
> Venkatesh
>
>
> On Fri, Dec 25, 2020 at 6:23 PM Baptiste Mathus  wrote:
>
>> Not sure what exactly you're concerned about:
>>
>> Subversion always had this .svn folder. Since 1.7 it's only at the root 
>> of the checked out repo.
>> Before svn 1.7 it was literally in all directories.
>>
>> This is expected.
>>
>> If you're surprised more by the latter behavior described above, maybe 
>> your agent is having a pre-1.7 svn binaries?
>>
>> PS : we don't use the term 'slave' anymore for agents since 2016. And 
>> master got replaced by controller earlier this year.
>> Thanks.
>>
>>
>> Le jeu. 24 déc. 2020 à 19:27, Ven H  a écrit :
>>
>>> I have a pipeline script in Jenkinsfile which is in SVN. It has the 
>>> following checkout step.
>>>
>>> *checkout([$class: 'SubversionSCM', filterChangelog: false, 
>>> ignoreDirPropChanges: false,  locations: [[cancelProcessOnExternalsFail: 
>>> true, credentialsId: "", depthOption: 'infinity', 
>>> ignoreExternalsOption: true, local: '.', remote: ""]], 
>>> quietOperation: true, workspaceUpdater: [$class: 'UpdateUpdater']])*
>>>
>>> This is working fine in a Jenkins environment (master & slaves)  on 
>>> Windows. Now we are moving to a Jenkins master on a Docker container hosted 
>>> in a Linux environment. The slaves are still Windows servers since the 
>>> Application code is in .Net. 
>>>
>>> The Source code is in SVN. After moving to the new Jenkins instance, we 
>>> are facing a weird issue. The checkout step is somehow getting .svn folders 
>>> also downloaded into the workspace, which was not happening in the earlier 
>>> Jenkins environment. Not sure what is wrong. Can anyone please help?
>>>
>>> Regards,
>>> Venkatesh
>>>
>>> -- 
>>> 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/CAPp28epn9bDrJW6deQCtVNh2M8GYr1vvPM9vjevwDGKym%2Bhaug%40mail.gmail.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-use...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS70dOJALP9zbO-ph5RpFm8Ua-17zaKvnRkjS0UyQ58k-A%40mail.gmail.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/2f7cd4aa-6526-40de-910c-1e9672364cfcn%40googlegroups.com.


Do multibranch jobs lead to code duplication?

2020-07-21 Thread 'Martin Schmude' via Jenkins Users
Dear all,

if I understand multibranch jobs right, then a Jenkinsfile in branch 
"master" will be replicated into all other branches drawn from "master".
It has to be like that because the Jenkinsfile is the "marker" that tells 
Jenkins to build a branch, and how to do that. Branches without a 
Jenkinsfile will not be built.

This will often result in code duplication, with all the well-known issues.
If a small change has to be made to the Jenkinsfile, it has to be applied 
to all branches.

How do you handle that issue? Is there a recommended practice?

-- 
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/4ceb91fb-e271-4b1f-9026-5154d31e5823o%40googlegroups.com.


Re: Iteration over list or map in Pipeline script

2017-03-17 Thread 'Martin Schmude' via Jenkins Users
Thank you all for the clarification.


Am Montag, 13. März 2017 15:26:44 UTC+1 schrieb Martin Schmude:
>
> Hello,
>
> I have a freestyle job with one step of the kind "Execute Groovy Script". 
> Its Groovy code is
>
> def x = ['a', 'b', 'c']
> println x
> x.each { println it }
>
>
> The output of this job is (not surprinsingly):
>
> [Test-Groovy2] $ groovy 
> /var/lib/jenkins/workspace/Test-Groovy2/hudson3825239812036801886.groovy
> [a, b, c]
> a
> b
> c
> Finished: SUCCESS
>
>
> But if I create a pipeline job with the pipeline script set to the same 
> Groovy code, its output is:
>
> [Pipeline] echo[a, b, c][Pipeline] echoa[Pipeline] End of PipelineFinished: 
> SUCCESS
>
>
> The .each() gets the first element in the list and nothing more.
> What's going on here? I thought that pipeline scripts are just Groovy plus 
> some pipeline DSL, but I seem to be wrong.
>
> BTW: my Jenkins is 2.27.
>
>

-- 
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/b3fb9d74-feb4-448c-841d-559a7a33ad32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Iteration over list or map in Pipeline script

2017-03-13 Thread 'Martin Schmude' via Jenkins Users
Hello,

I have a freestyle job with one step of the kind "Execute Groovy Script". 
Its Groovy code is

def x = ['a', 'b', 'c']
println x
x.each { println it }


The output of this job is (not surprinsingly):

[Test-Groovy2] $ groovy 
/var/lib/jenkins/workspace/Test-Groovy2/hudson3825239812036801886.groovy
[a, b, c]
a
b
c
Finished: SUCCESS


But if I create a pipeline job with the pipeline script set to the same 
Groovy code, its output is:

[Pipeline] echo[a, b, c][Pipeline] echoa[Pipeline] End of PipelineFinished: 
SUCCESS


The .each() gets the first element in the list and nothing more.
What's going on here? I thought that pipeline scripts are just Groovy plus 
some pipeline DSL, but I seem to be wrong.

BTW: my Jenkins is 2.27.

-- 
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/ca2dd238-550f-46a0-8f56-1bc167402eb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Howto trigger a remote job from a pipeline job

2016-12-06 Thread 'Martin Schmude' via Jenkins Users
Hello,

I want to trigger a parameterized remote job from a pipeline job and can't 
find out, if this is possible, and if so how to code the trigger.
There is a build step for Jenkins pipelines, that triggers jobs. But it 
seems, that it cannot be applied to remote jobs.
Any help? 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/6920e4e3-721d-46e8-8bae-27f704b2eaf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.