jenkins-job-builder/tests/yamlparser/fixtures/project-in-folder-with-auth-properties.yaml
Adam Romanek 074985c7ff Fix Authorization Matrix property support on jobs in a folder
Without the fix:

> 2020-05-11 10:56:12.238+0000 [id=29522]	WARNING
> o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost/job/someFolder/createItem
> java.lang.ClassCastException: com.cloudbees.hudson.plugins.folder.properties.AuthorizationMatrixProperty cannot be cast to hudson.model.JobProperty

It turns out com.cloudbees.hudson.plugins.folder.properties.AuthorizationMatrixProperty
should only be applied to Folders, not Jobs. The latter should use
hudson.security.AuthorizationMatrixProperty.

Task: 39760
Story: 2007666

Change-Id: I64907265b214fb1e489e1e657a30c90d6ee08c3f
2020-05-13 14:16:45 +02:00

9 lines
155 B
YAML

- job:
folder: auth-jobs
name: auth-job-test
project-type: freestyle
properties:
- authorization:
auser:
- job-build