[JIRA] (JENKINS-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Daniel Spilker commented on JENKINS-50786 Re: Implement pathRestriction to job DSL extension context This is already supported by the Dynamic DSL: pipelineJob('example') { definition { cpsScm { scm { git { extensions { pathRestriction { includedRegions('includedFiles') excludedRegions('excludedFiles') } } } } } } } Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Daniel Spilker resolved as Fixed Jenkins / JENKINS-50786 Implement pathRestriction to job DSL extension context Change By: Daniel Spilker Status: Open Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Onuralp Taner edited a comment on JENKINS-50786 Re: Implement pathRestriction to job DSL extension context I've created [PR|https://github.com/jenkinsci/job-dsl-plugin/pull/1123] to implement this. After the merge, we can use it like below. {code:java} pipelineJob("jobname") \ { //.. definition \ {cpsScm \ {scm \ {git \ { //.. extensions \ { pathRestriction \ { includedPaths ( ' excludedFiles includedFiles ' ) excludedPaths ( ' includedFiles excludedFiles ' ) }}}}}} {code} Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Onuralp Taner edited a comment on JENKINS-50786 Re: Implement pathRestriction to job DSL extension context I've created this [PR|https://github.com/jenkinsci/job-dsl-plugin/pull/1123] to implement this. After the merge, we can use it like below. {code:java}pipelineJob("jobname") {//..definition {cpsScm {scm {git {//..extensions { pathRestriction { includedPaths('includedFiles') excludedPaths('excludedFiles')}}}}}}{code} Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Onuralp Taner commented on JENKINS-50786 Re: Implement pathRestriction to job DSL extension context I've created PR to implement this. After the merge, we can use it like below. pipelineJob("jobname") {//.. definition { cpsScm { scm { git { //.. extensions { pathRestriction { includedPaths 'excludedFiles' excludedPaths 'includedFiles' } } } } } } Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Onuralp Taner updated an issue Jenkins / JENKINS-50786 Implement pathRestriction to job DSL extension context Change By: Onuralp Taner pathRestriction is not implemented in extension GitContext. So when we want to use this we have to use configure block. It is fine if you are not in sandbox mode. {code:java}pipelineJob("jobname") {//..definition {cpsScm {scm {git {//..extensions { relativeTargetDirectory("myRootPath") // works because implemented pathRestriction('includedPaths', 'excludedPaths') // not implemented in the dsl plugin}// code below doesn't allowed in sandbox modeconfigure { node -> node / 'extensions' / 'hudson.plugins.git.extensions.impl.PathRestriction' { excludedRegions 'excludedPaths' }}}}}}}{code} Can't we add pathRestriction to the extensions GitContext.[Here is|https://github.com/jenkinsci/job-dsl-plugin/blob/f3828b0e577760880212f5a14d2985c631de8eeb/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/scm/GitExtensionContext.groovy#L142] how relativeTargetDirectory implemented. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Onuralp Taner updated an issue Jenkins / JENKINS-50786 Implement pathRestriction to job DSL extension context Change By: Onuralp Taner pathRestriction is not implemented in extension GitContext. So when we want to use this we have to use configure block. It is fine if you are not in sandbox mode. {code:java}pipelineJob("jobname") {//..definition {cpsScm {scm {git {//..extensions { relativeTargetDirectory("myRootPath") // works because implemented pathRestriction('includedPaths', 'excludedPaths') // not implemented in the dsl plugin}// code below doesn't allowed in sandbox modeconfigure { node -> node / 'extensions' / 'hudson.plugins.git.extensions.impl.PathRestriction' { excludedRegions 'excludedPaths' }}}}}}}{code} Can't we add pathRestriction to the extensions GitContext . [Here is|https://github.com/jenkinsci/job-dsl-plugin/blob/f3828b0e577760880212f5a14d2985c631de8eeb/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/scm/GitExtensionContext.groovy#L142] how relativeTargetDirectory implemented. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-50786) Implement pathRestriction to job DSL extension context
Title: Message Title Onuralp Taner created an issue Jenkins / JENKINS-50786 Implement pathRestriction to job DSL extension context Issue Type: Task Assignee: Daniel Spilker Components: job-dsl-plugin Created: 2018-04-13 08:33 Priority: Major Reporter: Onuralp Taner pathRestriction is not implemented in extension GitContext. So when we want to use this we have to use configure block. It is fine if you are not in sandbox mode. pipelineJob("jobname") { //.. definition { cpsScm { scm { git { //.. extensions { relativeTargetDirectory("myRootPath") // works because implemented pathRestriction('includedPaths', 'excludedPaths') // not implemented in the dsl plugin } // code below doesn't allowed in sandbox mode configure { node -> node / 'extensions' / 'hudson.plugins.git.extensions.impl.PathRestriction' { excludedRegions 'excludedPaths' } } } } } } } Can't we add pathRestriction to the extensions GitContext