Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58314

Job-dsl support for organizationFolder: DslFactory

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I will add the buildStrategies in my job-dsl script

      organizationFolder('my-project') {
      ....
          buildStrategies {
          }
      }
      

      Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder

      Workaround is make the change manually and look into the generated xml to manuipulate the xml via configure block

      organizationFolder('my-project') {
          ...
          configure {
              // see 
              def buildStrategies = it / buildStrategies
              buildStrategies << 'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
                  ignoreTargetOnlyChanges true
              }
              buildStrategies << 'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl' {
                  filters {
                      'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                          name 1902
                          caseSensitive false
                      }
                      'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                          name 1907
                          caseSensitive false
                      }
                  }
              }
          }
      }
      

        Attachments

          Issue Links

            Activity

            gimler Gordon Franke created issue -
            gimler Gordon Franke made changes -
            Field Original Value New Value
            Description I will add the buildStrategies in my job-dsl script

            {code:java}
            organizationFolder('my-project') {
            ....
                buildStrategies {
                }
            }
            {code}

            Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder
            I will add the buildStrategies in my job-dsl script

            {code:java}
            organizationFolder('my-project') {
            ....
                buildStrategies {
                }
            }
            {code}

            Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder

            Workaround is make the change manually and look into the generated xml to manuipulate the xml via configure block
            {code:java}
            organizationFolder('my-project') {
            ....
            configure {
                          // see
                          def buildStrategies = it / buildStrategies
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
                              ignoreTargetOnlyChanges true
                          }
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl' {
                              filters {
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1902
                                      caseSensitive false
                                  }
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1907
                                      caseSensitive false
                                  }
                              }
                          }
                      }
            }
            {code}
            gimler Gordon Franke made changes -
            Description I will add the buildStrategies in my job-dsl script

            {code:java}
            organizationFolder('my-project') {
            ....
                buildStrategies {
                }
            }
            {code}

            Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder

            Workaround is make the change manually and look into the generated xml to manuipulate the xml via configure block
            {code:java}
            organizationFolder('my-project') {
            ....
            configure {
                          // see
                          def buildStrategies = it / buildStrategies
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
                              ignoreTargetOnlyChanges true
                          }
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl' {
                              filters {
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1902
                                      caseSensitive false
                                  }
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1907
                                      caseSensitive false
                                  }
                              }
                          }
                      }
            }
            {code}
            I will add the buildStrategies in my job-dsl script

            {code:java}
            organizationFolder('my-project') {
            ....
                buildStrategies {
                }
            }
            {code}

            Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder

            Workaround is make the change manually and look into the generated xml to manuipulate the xml via configure block
            {code:java}
            organizationFolder('my-project') {
                ...
                configure {
                          // see
                          def buildStrategies = it / buildStrategies
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
                              ignoreTargetOnlyChanges true
                          }
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl' {
                              filters {
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1902
                                      caseSensitive false
                                  }
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1907
                                      caseSensitive false
                                  }
                              }
                          }
                      }
            }
            {code}
            gimler Gordon Franke made changes -
            Description I will add the buildStrategies in my job-dsl script

            {code:java}
            organizationFolder('my-project') {
            ....
                buildStrategies {
                }
            }
            {code}

            Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder

            Workaround is make the change manually and look into the generated xml to manuipulate the xml via configure block
            {code:java}
            organizationFolder('my-project') {
                ...
                configure {
                          // see
                          def buildStrategies = it / buildStrategies
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
                              ignoreTargetOnlyChanges true
                          }
                          buildStrategies << 'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl' {
                              filters {
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1902
                                      caseSensitive false
                                  }
                                  'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                      name 1907
                                      caseSensitive false
                                  }
                              }
                          }
                      }
            }
            {code}
            I will add the buildStrategies in my job-dsl script

            {code:java}
            organizationFolder('my-project') {
            ....
                buildStrategies {
                }
            }
            {code}

            Actually it is only supported for branchSource : BranchSourcesContext that i can use with multibranchPipelineJob but not with organizationFolder

            Workaround is make the change manually and look into the generated xml to manuipulate the xml via configure block
            {code:java}
            organizationFolder('my-project') {
                ...
                configure {
                    // see
                    def buildStrategies = it / buildStrategies
                    buildStrategies << 'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
                        ignoreTargetOnlyChanges true
                    }
                    buildStrategies << 'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl' {
                        filters {
                            'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                name 1902
                                caseSensitive false
                            }
                            'jenkins.branch.buildstrategies.basic.NamedBranchBuildStrategyImpl_-ExactNameFilter' {
                                name 1907
                                caseSensitive false
                            }
                        }
                    }
                }
            }
            {code}
            daspilker Daniel Spilker made changes -
            Link This issue duplicates JENKINS-54877 [ JENKINS-54877 ]
            daspilker Daniel Spilker made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            daspilker Daniel Spilker made changes -
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              gimler Gordon Franke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: