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-bi

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 202

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 "mast

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"

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"

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.p

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

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 a

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-th

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 schri

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: > >>

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

2021-03-23 Thread &#x27;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

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

2021-03-19 Thread &#x27;Martin Schmude' via Jenkins Users
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

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

2021-03-19 Thread &#x27;Martin Schmude' via Jenkins Users
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

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

2021-03-03 Thread &#x27;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 che

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

2021-02-24 Thread &#x27;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 startin

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

2021-02-12 Thread &#x27;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

Conventions for names of Jenkins jobs and job stages

2021-01-27 Thread &#x27;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

Re: Portable Maven launch

2021-01-25 Thread &#x27;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 wro

Re: .svn folder getting checked out

2020-12-30 Thread &#x27;Martin Schmude' via Jenkins Users
7;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 r

Re: .svn folder getting checked out

2020-12-25 Thread &#x27;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 did

Do multibranch jobs lead to code duplication?

2020-07-21 Thread &#x27;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 Jen

Re: git step in pipeline job in Docker container fails

2020-07-02 Thread Martin Schmude
Is there chance, that JENKINS-30600 will ever be fixed? It dates back to 2015, so presumably not? Until then thanks for https://issues.jenkins.io/browse/JENKINS-30600?focusedCommentId=383360&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-383360 This was helpful. --

Re: Unable to get value of password parameter into another parameter

2020-07-02 Thread Martin Schmude
Jerome: can withCredentials() be used in the script of a job parameter of type 'Active Choice Reactive Parameter'? Gajanan: there is a job parameter type 'List Subversion tags (and more)'. May be this satifies your needs. You will have to setup a credential (name+password) in the Jenkins credent

Re: git step in pipeline job in Docker container fails

2020-07-02 Thread Martin Schmude
I forgot the versions. Jenkins: 2.220 git plugin: 4.1.1 Pipeline plugin: 2.6 -- 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...@googleg

git step in pipeline job in Docker container fails

2020-07-02 Thread Martin Schmude
Hi all, I need help with an issue related to the git step in a pipeline job, that is executed in a Docker container. The pipeline looks like this: node('Docker-capable-node') { docker.inside('image-with-git-installed').inside { git credentialsId: 'my-credentials', url: 'https://gitlab.myco

Re: Iteration over list or map in Pipeline script

2017-03-16 Thread &#x27;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&#

Iteration over list or map in Pipeline script

2017-03-13 Thread &#x27;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

Howto trigger a remote job from a pipeline job

2016-12-06 Thread &#x27;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

Re: Confusion of Maven build jobs sequence

2015-11-10 Thread Martin Schmude
Not what I would have liked to hear, but I already guessed so. Anyway, thank you James. Does anybody know a well-established way of handling situations like this in Jenkins? Or maybe good sources of guidance out there in the WWW? Am Sonntag, 8. November 2015 23:53:05 UTC+1 schrieb James Nord: >

Confusion of Maven build jobs sequence

2015-11-08 Thread Martin Schmude
Hello everybody, Currently I am confused about the build sequence determined by Jenkins under the following circumstances. The company I am working at operates a Jenkins server with about 180 Maven build jobs. There are dependencies between the Maven projects defined in their pom.xml. The upstr