Permission to copy artifacts

1,008 views
Skip to first unread message

Misty Stanley-Jones

unread,
Jan 20, 2016, 12:08:40 PM1/20/16
to job-dsl-plugin
I'm trying to configure my job to allow jobs with names that match a given pattern (say *-foo) to copy its artifacts. The relevant job XML is:

<hudson.plugins.copyartifact.CopyArtifactPermissionProperty plugin="copyar...@1.30">
<projectNameList>
<string>*-foo</string>
</projectNameList>
</hudson.plugins.copyartifact.CopyArtifactPermissionProperty>

I don't think I can address this directly via a job DSL property, so I need to use a configure block. I can't seem to get its syntax right. Here is the closest I have gotten, and the XML it generates:

    configure {
      project ->
        project / 'properties' << 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' {
          projectNameList "*-foo"
        }
      }

<properties>
<hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
<projectNameList>*-foo</projectNameList>
</hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
</properties>

As you can see, it is missing the <string> element inside <projectNameList>. I have tried a few different things to get there, but nothing has worked so far. Help is appreciated, as I am sure it is a really simple syntax thing.

Misty Stanley-Jones

unread,
Jan 20, 2016, 7:39:19 PM1/20/16
to job-dsl-plugin
I'm not convinced I did this the right way, but I got it working by doing this:

configure {
project ->
        // Allow jobs ending in -suitehelp to copy my artifacts
          project / 'properties' << 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' {
            'projectNameList'
        }
        project / 'properties' / 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' / 'projectNameList' {
          'string' "*-foo"
        }

Matt Sheehan

unread,
Jan 21, 2016, 9:23:49 AM1/21/16
to job-dsl-plugin
This by itself should work:

configure { project ->
  project / 'properties' / 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' / 'projectNameList' {
    'string' "*-foo"
  }
}

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/5bc0a9fb-8434-42e5-80ef-ea756484fec3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Misty Stanley-Jones

unread,
Jan 22, 2016, 5:54:14 PM1/22/16
to job-dsl...@googlegroups.com
Yes, that does work! Thank you. It does seem a rather black art.
 
 
On Fri, Jan 22, 2016, at 12:23 AM, Matt Sheehan wrote:
This by itself should work:
 
 
configure { project ->
  project / 'properties' / 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' / 'projectNameList' {
    'string' "*-foo"
  }
}

 
 
 
On Wed, Jan 20, 2016 at 6:39 PM Misty Stanley-Jones <mist...@gmail.com> wrote:
I'm not convinced I did this the right way, but I got it working by doing this:
 
configure {
project ->
        // Allow jobs ending in -suitehelp to copy my artifacts
          project / 'properties' << 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' {
            'projectNameList'
        }
        project / 'properties' / 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' / 'projectNameList' {
          'string' "*-foo"
        }
}
 
On Wednesday, January 20, 2016 at 9:08:40 AM UTC-8, Misty Stanley-Jones wrote:
I'm trying to configure my job to allow jobs with names that match a given pattern (say *-foo) to copy its artifacts. The relevant job XML is:
 
<hudson.plugins.copyartifact.CopyArtifactPermissionPropertyplugin="copyar...@1.30">
 
<projectNameList>
 
<string>*-foo</string>
 
</projectNameList>
 
</hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
 
I don't think I can address this directly via a job DSL property, so I need to use a configure block. I can't seem to get its syntax right. Here is the closest I have gotten, and the XML it generates:
 
 
    configure {
      project ->
        project / 'properties' << 'hudson.plugins.copyartifact.CopyArtifactPermissionProperty' {
          projectNameList "*-foo"
        }
      }
 
<properties>
 
<hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
 
<projectNameList>*-foo</projectNameList>
 
</hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
 
</properties>
 
As you can see, it is missing the <string> element inside <projectNameList>. I have tried a few different things to get there, but nothing has worked so far. Help is appreciated, as I am sure it is a really simple syntax thing.
 


--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and all its topics, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages