Re: replace text with user defined text

2021-09-23 Thread sambonta
Anyone got any idea on this ? 
On Saturday, September 18, 2021 at 10:23:34 PM UTC+5:30 sambonta wrote:

> Hi, 
>
> can someone please help me to find a plugin or assist to write a plugin to 
> replace the phrases containing "build" with other things
>
> Build Now => Run Job Now (there is a plugin to replace this)
> Build History => Job Run History
> Build Queue => Job Queue
> Build Executor Status => Job Executor Status
> Last Build => Last Run
> Last Stable Build => Last Stable Run
>

-- 
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/fa91c451-1ab7-4f7c-9503-eb1b1caec52cn%40googlegroups.com.


Re: replace text with user defined text

2021-09-23 Thread Ullrich Hafner
I don’t think that this is possible with a plugin right now. These texts are 
localized messages. Maybe you can create a new localization file that 
overwrites the existing files. You can have a look at the plugin that does this 
for the first item and try to achieve the same for the rest.


> Am 23.09.2021 um 09:48 schrieb sambonta :
> 
> Anyone got any idea on this ? 
> On Saturday, September 18, 2021 at 10:23:34 PM UTC+5:30 sambonta wrote:
> Hi, 
> 
> can someone please help me to find a plugin or assist to write a plugin to 
> replace the phrases containing "build" with other things
> 
> Build Now => Run Job Now (there is a plugin to replace this)
> Build History => Job Run History
> Build Queue => Job Queue
> Build Executor Status => Job Executor Status
> Last Build => Last Run
> Last Stable Build => Last Stable Run
> 
> 
> -- 
> 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/fa91c451-1ab7-4f7c-9503-eb1b1caec52cn%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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/19B33F36-7038-483C-8006-EAD66F479124%40gmail.com.


Re: Pull changes when a tag is created

2021-09-23 Thread jayarama...@gmail.com
Thanks Mark, we have compiled 2.33.0 from source so partial should work but 
Jenkins doesn't pull repo when there's a tag created. 

On Wednesday, September 22, 2021 at 1:14:13 PM UTC-7 Mark Waite wrote:

> If you're running the default command line git version on CentOS 7, it 
> does not accept partial globs in the refspec.  The command line git 
> documentation for refspec says:
>
> Since Git 2.6.0 you can use partial globs in the pattern to match multiple 
> branches, so this works:
> fetch = +refs/heads/qa*:refs/remotes/origin/qa*
>
> If you're running a command line git version before 2.6.0, your partial 
> glob won't work.
>
> On Wednesday, September 22, 2021 at 11:50:30 AM UTC-8 
> jayarama...@gmail.com wrote:
>
>> Hello,
>>
>> I wanted to trigger a Jenkins build when a new tag is created but I'm not 
>> having any luck with it. 
>>
>> Just to be sure I mentioned it, I don't have access to modify the repo 
>> since it's a public repo.
>>
>> The following configuration is what I used in the "Git" Source Code 
>> Management
>> Repo URL: https://github.com/apache/tomcat.git
>> Refspec: +refs/tags/8.5.*:refs/remotes/origin/tags/8.5.*
>> Branch Specifier: **/tags/**
>> Build Trigger: Poll SCM (with no schedule)
>>
>> Is there something I'm doing wrong?
>>
>> I can't do WebHooks which is unfortunate I think
>>
>> Any insights would be appreciated. 
>>
>> [image: SCM.jpg]
>>
>> [image: Triggers.jpg]
>>
>> 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/6bac0c97-15a3-4578-93d0-2fe7b14e63a7n%40googlegroups.com.


Declarative pipeline and global shared library complex question

2021-09-23 Thread mar...@gmail.com


I have been troubled by this for quite some time without finding out the 
reason.  I will describe a simple test case and will give the reasons for 
why I need to do it this way.  I would appreciate if all the good folks 
that spend their time to help others could just assume that the scenario is 
valid and not question it too long.

I have a shared library groovy called vars/testBuild.groovy as follow:

*import* org.slf4j.*

*def* call() {

   *final* Logger logger = LoggerFactory.*getLogger*
('org.biouno.unochoice.extra')

   *pipeline* {

  *agent* *any*

  *stages* {

 *stage*('My stage') {

   *steps* {

  *echo* "I ran"

   }

 }

  }

   }

}

 

I have a Jenkinsfile with the following content:

 

testBuild()

 

Jenkins has no issues building this and the echo step runs with no problem 
and outputs: I ran.

I need to move the pipeline for this case in a method called say 
myPipeline.  I need to do this because in my real life use case, I actually 
have a switch statement with several pipeline definitions in my call method 
and I have reached Jenkins CPS limitation of the size of the bytecode must 
not exceed 64K.  So I am left with the choice to define each of my pipeline 
in their own methods.  When I change the testBuild.groovy as follows:

 

*import* org.slf4j.*

*def* call() {

   *final* Logger logger = LoggerFactory.*getLogger*
('org.biouno.unochoice.extra')

   myPipeline()

}

*def* myPipeline() {

   *final* Logger logger = LoggerFactory.*getLogger*
('org.biouno.unochoice.extra')

   *pipeline* {

  *agent* *any*

  *stages* {

 *stage*('My stage') {

   *steps* {

  *echo* "I ran"

   }

 }

  }

   }

}

 

I get the following error from Jenkins:

 

hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No 
such property: any for class: testBuild

at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)

at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)

at 
com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:39)

at 
com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)

at testBuild.myPipeline(testBuild.groovy:9)

at 
org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(ModelInterpreter.groovy:60)

at testBuild.myPipeline(testBuild.groovy:8)

at testBuild.call(testBuild.groovy:4)

at WorkflowScript.run(WorkflowScript:1)

 

The other interesting fact is that when I change the pipeline as follow 
(with no additional method):

*import* org.slf4j.*

*def* call() {

   *final* Logger logger = LoggerFactory.*getLogger*
('org.biouno.unochoice.extra')

   *def* cl = {

  *agent* *any*

  *stages* {

 *stage*('My stage') {

   *steps* {

  *echo* "I ran"

   }

 }

  }

   }

   *pipeline* cl

}

 

I get the following similar result:
hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No 
such property: any for class: testBuildat 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)

at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)

at 
com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:39)

at 
com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)

at testBuild.call(testBuild.groovy:5)at 
org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(ModelInterpreter.groovy:60)

at testBuild.call(testBuild.groovy:14)at 
WorkflowScript.run(WorkflowScript:1) 

 

I know this is related to closures, delegates and DSL.  I tried to add the 
following two lines just before the pipeline cl call:

   cl.delegate = pipeline

   cl.resolveStrategy = Closure.*DELEGATE_FIRST*

 

and the error reports no property any for class 
org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter

Can anyone tell me how I can have the pipeline define in the method 
myPipeline?

-- 
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/3de459f0-d82f-4cc5-af13-e

Re: Declarative pipeline and global shared library complex question

2021-09-23 Thread mar...@gmail.com
I do not think it is important but this is occurring on Jenkins 2.249.3

On Thursday, September 23, 2021 at 1:32:36 PM UTC-4 mar...@gmail.com wrote:

> I have been troubled by this for quite some time without finding out the 
> reason.  I will describe a simple test case and will give the reasons for 
> why I need to do it this way.  I would appreciate if all the good folks 
> that spend their time to help others could just assume that the scenario is 
> valid and not question it too long.
>
> I have a shared library groovy called vars/testBuild.groovy as follow:
>
> *(snip)*
>

-- 
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/82e75b2a-794d-4daf-8c44-e8d16aeb2df2n%40googlegroups.com.


Re: Declarative pipeline and global shared library complex question

2021-09-23 Thread mar...@gmail.com
I am certain @Kohsuke knows the answer immediately.

On Thursday, September 23, 2021 at 1:32:36 PM UTC-4 mar...@gmail.com wrote:

> I have been troubled by this for quite some time without finding out the 
> reason.  I will describe a simple test case and will give the reasons for 
> why I need to do it this way.  I would appreciate if all the good folks 
> that spend their time to help others could just assume that the scenario is 
> valid and not question it too long.
>
> (snip)
>

-- 
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/a72c174a-7053-4861-8c2d-36af047393b3n%40googlegroups.com.


Not able to configure already added credentials in job configuration

2021-09-23 Thread kituu rao
Hi team,
I am facing issue in credentials section of jenkins
I have already added github credentials and other tools credentials in
Jenkin
But I'm not able to see that credentials while configuring the job. ( I
have put git scm but not able to get credentials which are already added.
It shown "none"  8n drop down)

Please any help will be 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/CAGvVVcZs%3DP%3Dy5qm9NwOCtZszXgNqj75n-CbceHX2yAsY79cFrQ%40mail.gmail.com.


Re: Calling functions in Jenkins Shared Libraries

2021-09-23 Thread mar...@gmail.com
Have you discovered anything?  See my recent post today about similar 
issue.  You can follow it.

On Monday, August 3, 2020 at 2:56:28 PM UTC-4 Chris Shannon wrote:

> I've been using Jenkins shared libraries for quite a while, but something 
> just popped up which is confusing me quite a bit. Instead of just creating 
> steps, I'm now trying to create a full declarative pipeline inside the 
> shared library.
>
>
> In any case, what I'm finding is that this works great when my pipeline is 
> defined directly inside the call method. As soon as I do a simple 
> function call, I get errors like:
>
>
> hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No such 
> property: any for class
>
> To be clear, here is working code:
>
> def call() {
>   pipeline {
> agent any
>
> stages {
>   stage("Stage") {
> steps {
>   echo "hi"
> }
>   }
> }
>   }
> } 
>
>
> And here is non-working code:
>
> def call() {
>   execute()
> }
>
> def execute() {
>   pipeline {
> agent any
>
> stages {
>   stage("Stage") {
> steps {
>   echo "hi"
> }
>   }
> }
>   }
> } 
>
>
> For reasons beyond this post, we are trying to add some commonality and 
> argument checking to our steps, which is why I'd like to be able to use 
> that concept of the extra function call..
>
>
> Any help/pointers would be much appreciated.
>
>
> Thanks!
>
> Chris
>

-- 
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/200486b2-eafe-46e8-9bf3-83050799eecen%40googlegroups.com.


Re: Not able to configure already added credentials in job configuration

2021-09-23 Thread kituu rao
On Thu, 23 Sep, 2021, 11:32 pm kituu rao,  wrote:

> Hi team,
> I am facing issue in credentials section of jenkins
> I have already added github credentials and other tools credentials in
> Jenkin
> But I'm not able to see that credentials while configuring the job. ( I
> have put git scm but not able to get credentials which are already added.
> It shown "none"  8n drop down)
>
> Please any help will be 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/CAGvVVcbinkg5poB3%3D_usXzYoG6bB9SwvfDXyyRhsydv_%3D5f0ow%40mail.gmail.com.