[JIRA] (JENKINS-61177) "Accessing steps" again. Now "No tool named Maven found"

2020-02-21 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61177  
 
 
  "Accessing steps" again. Now "No tool named Maven found"   
 

  
 
 
 
 

 
Change By: 
 gek  
 

  
 
 
 
 

 
 I trying to use an  [ example  |  from  [ docs| https://jenkins.io/doc/book/pipeline/shared-libraries/#accessing-steps]  ]from docs . Copy and paste both of{quote}{color:#43}class {color}Utilities {color:#43}implements {color}Serializable { {color:#43}def {color}{color:#660e7a}steps{color} Utilities(steps) {{color:#43}this{color}.{color:#660e7a}steps {color}= steps} {color:#43}def {color}mvn(args) { {color:#660e7a}steps{color}.sh {color:#008000}"{color}$\{steps.tool {color:#008000}'Maven'{color}}{color:#008000}/bin/mvn -o {color}${args}{color:#008000}"{color} }}{quote}{quote}and{quote}{quote}{color:#808000}@{color}Library({color:#008000}'lib@trunk/pipelines/jlib/trunk'{color}) _{color:#43}import {color}derivative.Utilities{color:#43}def {color}utils = {color:#43}new {color}Utilities({color:#43}this{color}){color:#808080}{color}node { stage ({color:#008000}'some'{color}) { utils.mvn {color:#008000}'clean package'{color}    }}{quote}and then get the following output:{quote}ERROR: No tool named Maven found{quote}I have tried to susbstitute 'Maven' to 'git' , because i'd like to pass git into shared lib. But getting same message:{quote}ERROR: No tool named git found{quote}I cannot understand, what exactly is {color:#660e7a}steps{color}.sh? Is it bash script?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira 

[JIRA] (JENKINS-61177) "Accessing steps" again. Now "No tool named Maven found"

2020-02-21 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek edited a comment on  JENKINS-61177  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: "Accessing steps" again. Now "No tool named Maven found"   
 

  
 
 
 
 

 
 looks like it must not be a{quote}{color:#008000} {color:#660e7a} steps{color}.sh {color:#008000}"{color}$\{steps.tool {color:#008000}'Maven'\{color}}/bin/mvn -o {color}${args}{color:#008000}"{color}  { color}{ quote}{color:#172b4d}but{color}{quote}{color:#172b4d} {color:#660e7a} this.{color}{color:#008000} {color:#008000}{color:#660e7a} steps{color}.sh {color:#008000}"{color}$\{steps.tool {color:#008000}'Maven'\{color}}/bin/mvn -o {color}${args}{color:#008000}"{color} {color}{color}{color} {quote}{color:#172b4d}or, in my case{color}{quote}{color:#172b4d} {color:#660e7a} this.{color}{color:#008000} {color:#008000}{color:#660e7a} steps{color}.git {color}{color}{color} {quote} *there is need to fix documentation.*  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204719.1582282896000.4280.1582291560062%40Atlassian.JIRA.


[JIRA] (JENKINS-61177) "Accessing steps" again. Now "No tool named Maven found"

2020-02-21 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek commented on  JENKINS-61177  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: "Accessing steps" again. Now "No tool named Maven found"   
 

  
 
 
 
 

 
 looks like it must not be a 

steps.sh "${steps.tool 'Maven'{color}}/bin/mvn -o ${args}"
 but 

this.steps.sh "${steps.tool 'Maven'{color}}/bin/mvn -o ${args}"
 or, in my case 

this.steps.git
  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204719.1582282896000.4191.1582283760056%40Atlassian.JIRA.


[JIRA] (JENKINS-61177) "Accessing steps" again. Now "No tool named Maven found"

2020-02-21 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61177  
 
 
  "Accessing steps" again. Now "No tool named Maven found"   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-cps-global-lib-plugin  
 
 
Created: 
 2020-02-21 11:01  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 gek  
 

  
 
 
 
 

 
 I trying to use an example from docs. Copy and paste both of 

class Utilities implements Serializable {  def steps Utilities(steps) {{color:#43}this.steps = steps}  def mvn(args) {  steps.sh "${steps.tool 'Maven'{color}}/bin/mvn -o ${args}" } }
 

and
 

@Library('lib@trunk/pipelines/jlib/trunk') _ import derivative.Utilities def utils = new Utilities(this) node {  stage ('some') {  utils.mvn 'clean package'    } }
 and then get the following output: 

ERROR: No tool named Maven found
 I have tried to susbstitute 'Maven' to 'git' , because i'd like to pass git into shared lib. But getting same message: 

ERROR: No tool named git found
 I cannot understand, what exactly is steps.sh? Is it bash script?  
 

  
   

[JIRA] (JENKINS-58552) .split('.') method works incorrect

2019-07-18 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek commented on  JENKINS-58552  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: .split('.') method works incorrect   
 

  
 
 
 
 

 
 Oh, workaround was to use double backslashes: 

 

script {
RC_FILES = '4,5,6'
println RC_FILES.getClass()

VERSION_TAIL_0 = '1.2.3'
println VERSION_TAIL_0.getClass()

ARRAY01 = RC_FILES.split(",")
ARRAY02 = VERSION_TAIL_0.split('\\.')

ARRAY01.each {
println("$it")
}

ARRAY02.each {
println("$it")
}
}
 

 it was two wasted hours of my life...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200702.1563458305000.15402.1563458940116%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58552) .split('.') method works incorrect

2019-07-18 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58552  
 
 
  .split('.') method works incorrect   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Components: 
 groovy-plugin, pipeline  
 
 
Created: 
 2019-07-18 13:58  
 
 
Environment: 
 Jenkins 2.164.1  Pipeline:groovy 2.70  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 gek  
 

  
 
 
 
 

 
   Hello! When i use .slit() method with '.' as delimiter, it's work incorrectly. If i use any other char, like ',' - it's work as expected, but not with '.'   Problem code: 

 

script {
RC_FILES = '4,5,6'
println RC_FILES.getClass()

VERSION_TAIL_0 = '1.2.3'
println VERSION_TAIL_0.getClass()

ARRAY01 = RC_FILES.split(",")
ARRAY02 = VERSION_TAIL_0.split('.')

ARRAY01.each {
println("$it")
}

ARRAY02.each {
println("$it")
}
}
 

 Expected output:     

 

[Pipeline] echo
class java.lang.String 
[Pipeline] echo 
class java.lang.String
[Pipeline] echo
4
[Pipeline] echo
5
[Pipeline] echo
6
[Pipeline] echo
1
[Pipeline] echo
2
[Pipeline] echo
3

 

 Current output:     

 

[Pipeline] 

[JIRA] (JENKINS-57443) .plus() method works incorrect

2019-07-18 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek commented on  JENKINS-57443  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: .plus() method works incorrect   
 

  
 
 
 
 

 
 Any feedback?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199256.155781424.15374.1563457320123%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56925) extra newline character from powershell output

2019-06-25 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek edited a comment on  JENKINS-56925  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: extra newline character from powershell output   
 

  
 
 
 
 

 
 But how?Only way i see is use Write-Host -NoNewline , but it's output cannot be passed  throw  thru : [https://serverfault.com/questions/859826/output-is-truncated-in-jenkins-job-when-launching-powershell-script-remotely-usi] For some reason Write-Host -NoNewline output cannot be assigned to variable.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.198603.1554635511000.7845.1561448340266%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56925) extra newline character from powershell output

2019-06-06 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek commented on  JENKINS-56925  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: extra newline character from powershell output   
 

  
 
 
 
 

 
 But how? Only way i see is use Write-Host -NoNewline , but it's output cannot be passed throw:   https://serverfault.com/questions/859826/output-is-truncated-in-jenkins-job-when-launching-powershell-script-remotely-usi   For some reason Write-Host -NoNewline output cannot be assigned to variable.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.198603.1554635511000.22674.1559826240708%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-57443) .plus() method works incorrect

2019-05-14 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-57443  
 
 
  .plus() method works incorrect   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Components: 
 groovy-plugin, pipeline  
 
 
Created: 
 2019-05-14 06:10  
 
 
Environment: 
  Jenkins ver. 2.164.1  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 gek  
 

  
 
 
 
 

 
 Problem code: 

 

script {
TEST_STRING="oen/two/three"
TEST_LIST=TEST_STRING.split("/")
echo "$TEST_LIST"
TEST_LIST=TEST_LIST.plus(0,"one")
echo "$TEST_LIST"
}
 

 Expected output:  

 

[Pipeline] echo
08:58:07  [oen, two, three]
[Pipeline] echo
08:58:07  [one, two, three]
 

 Current output: 

 

[Pipeline] echo
08:58:07  [oen, two, three]
[Pipeline] echo
08:58:07  [oen, two, three, 0, one]
 

  
 

  
 
 
 
   

[JIRA] (JENKINS-56925) extra newline character from powershell output

2019-04-07 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56925  
 
 
  extra newline character from powershell output   
 

  
 
 
 
 

 
Change By: 
 gek  
 
 
Priority: 
 Major Trivial  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56925) extra newline character from powershell output

2019-04-07 Thread roster...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 gek gek created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56925  
 
 
  extra newline character from powershell output   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 gek gek  
 
 
Components: 
 durable-task-plugin  
 
 
Created: 
 2019-04-07 11:11  
 
 
Environment: 
 Jenkins ver. 2.164.1  Durable Task Plugin 1.29  
 
 
Labels: 
 jenkins,pipeline,powershell  
 
 
Priority: 
  Major  
 
 
Reporter: 
 gek gek  
 

  
 
 
 
 

 
 When i trying to wrap some powershell script output into variable, it's adds excess \n symbol to. Like: 

 

script {
	VARI = powershell (returnStdout: true, script: """Write-Output foo""")
	println VARI
	}
 

 It's outputs the following: 

 

[Pipeline] script
[Pipeline] {
[Pipeline] powershell
[Pipeline] echo
foo

[Pipeline] }
[Pipeline] // script
[Pipeline] }
 

 But powershell itself transmits output without `n . How to escape it in output?