Re: Git Source Code Management Oddity

2022-05-24 Thread Mark Waite


On Monday, May 23, 2022 at 11:57:28 AM UTC-6 Eric wrote:

> Also note that I AM using the "with credentials" from the plugin.
>
>
I don't understand that statement.

If you're using the `withCredentials` wrapper in a Pipeline, then you don't 
need to use the thing that the git plugin calls the "Git Publisher post 
build step".  Perform the push of the plugin from a shell, batch, or 
powershell step inside a `withCredentials` wrapper.  Much easier to manage 
a `withCredentials` wrapper with shell commands than to wrestle with the 
`Git publisher post build step`.

Mark Waite
 

-- 
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/1b95410b-a81f-4a70-83e6-70e5cec86e3an%40googlegroups.com.


RE: How to uninstall Pipeline: Deprecated Groovy Libraries

2022-05-24 Thread 'Alan Sparks' via Jenkins Users

Thanks for that answer.  I’ll watch for those releases.
-Alan

-- 
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/DM6PR18MB33066A83A97177115E3C6776C5D79%40DM6PR18MB3306.namprd18.prod.outlook.com.


Re: How to uninstall Pipeline: Deprecated Groovy Libraries

2022-05-24 Thread Mark Waite


On Tuesday, May 24, 2022 at 3:27:28 PM UTC-6 Alan Sparks wrote:

> So this plugin (Pipeline: Deprecated Groovy Libraries) is now marked 
> deprecated and I’m trying to remove it.  But I don’t seem to see how.
>
>  
>
> When I check, I have “Pipeline: Groovy Libraries” already installed.  But 
> If I go to uninstall the deprecated one, it tells be I have dependencies on 
> “Pipeline: Declarative” and “GitLab”.   I need both of those.
>
>  
>
> I don’t see a procedure on the plugin info page how to work around the 
> dependencies.  Can someone point me to how to uninstall this plugin?  
> Thanks.
>
>  
>
You'll need to wait for the two plugins to be released with an update to 
their dependencies so that they do not depend on the deprecated plugin.  

The "Pipeline: Declarative" change 
 
was merged about 2 hours ago and is likely to be released very soon.

The GitLab plugin does not have a pull request 
 submitted for it yet.  
Once the pull request has been submitted and merged, then you'll need to 
update to that version.  Then you'll be able to remove the deprecated 
plugin.

Mark Waite

>

-- 
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/5863a3ff-e0bb-4eba-b6f4-b2babc5a0ff2n%40googlegroups.com.


How to uninstall Pipeline: Deprecated Groovy Libraries

2022-05-24 Thread 'Alan Sparks' via Jenkins Users
So this plugin (Pipeline: Deprecated Groovy Libraries) is now marked deprecated 
and I'm trying to remove it.  But I don't seem to see how.

When I check, I have "Pipeline: Groovy Libraries" already installed.  But If I 
go to uninstall the deprecated one, it tells be I have dependencies on 
"Pipeline: Declarative" and "GitLab".   I need both of those.

I don't see a procedure on the plugin info page how to work around the 
dependencies.  Can someone point me to how to uninstall this plugin?  Thanks.

-Alan

-- 
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/DM6PR18MB33060E678885A4323FF8401FC5D79%40DM6PR18MB3306.namprd18.prod.outlook.com.


Re: Call parallel stages from a loaded file

2022-05-24 Thread Ivan Fernandez Calvo
We call parallel from a function, it should work, we have similar 
implementation in a step that allows you to pass arrays to parallel to 
build a matrix execution in parallel. The arrays can be static, loaded from 
files, or anything you can convert to an array

https://github.com/elastic/apm-pipeline-library/tree/main/vars#matrix
https://github.com/elastic/apm-pipeline-library/blob/main/vars/matrix.groovy
https://github.com/elastic/apm-pipeline-library/blob/main/vars/axis.groovy


El lunes, 23 de mayo de 2022 a las 22:27:07 UTC+2, chen...@gmail.com 
escribió:

> Hi all, 
>
> I have this piece of code
>
> def s
> def workspace
> pipeline {
>   agent { label 'build_1804' }
>
>   stages {
> stage('load functions') {
>   steps {
> script{
>   workspace = env.WORKSPACE
>   node('build_1804') {
> s = load "${workspace}/regress/Jenkins_extension.groovy"   
>   }
> }
>   }
> }
>
> stage('Build and Test 1') {
> steps{
>   script{
> s.buildandtest1(this)
>   }
> }
>  }
>   }
> }
>
> And other file with:
> def buildandtest1(Object s) {
>   parallel {
> echo "Building test"
> echo "Calling test script..."
> sh """
>   cd regress
>   echo \"./do_standalone_wo_resnet50_2_58.sh\"
> """
>   }
> }
>
> }
> }
>
> Dont put too much attention in {} or other syntax errors, i have modified 
> the code to do it more readable. 
>
> The main problem is that seems that jenkins is not able to start 
> "parallel" stages when it is called from a method. I am getting this error. 
>
> java.lang.IllegalArgumentException: Expected named arguments but got 
> org.jenkinsci.plugins.workflow.cps.CpsClosure2@6a6de064at 
> org.jenkinsci.plugins.workflow.cps.DSL.singleParam(DSL.java:718)at 
> org.jenkinsci.plugins.workflow.cps.DSL.parseArgs(DSL.java:706)at 
> org.jenkinsci.plugins.workflow.cps.DSL.parseArgs(DSL.java:640)at 
> org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:234)
>
>
> I have googled, but i dont find any solution or clue to fix it.
>
> What am i missing ?
>

-- 
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/0501f3ad-2a94-4ea3-96e7-be76fc6bee2an%40googlegroups.com.