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

Configuration of action triggers in an Organization folder

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      1.8.5

      Description

      Recently, we have been able to setup handling of infrastructure teardowns by using the Pipeline Delete Event in this plugin with a multi-branch project. Unfortunately, now that we are looking to switch to an organization folder for automatic multi-branch project initialization, we have lost the ability to configure this plugin for child multi-branch projects.

      Specifically, the GitHub Organization project does not have options for action triggers, and the child multi-branch projects that it creates do not allow us to further configure actions independently.

      Could this feature be added?

       

      As a side issue, due to automating this across many repositories, it might be useful for the action triggers to be programmatically determined somehow (perhaps within the Jenkinsfile itself) rather than statically configured. Or if not possible, maybe allow running against a branch of the repository that triggered the action?

        Attachments

          Activity

          Hide
          aytuncbeken Aytunc BEKEN added a comment -

          Release with version 1.8.5

          Show
          aytuncbeken Aytunc BEKEN added a comment - Release with version 1.8.5
          Hide
          awong4travelers Alan Wong added a comment -

          Thank you so much for the update.

          I just tried 1.8.5 on our sandbox Jenkins and it works perfectly (updating the delete job parameter at the org level propagated correctly). For allowing a repo to handle its own deletions, I'm now using the following Jenkinsfile:

          pipeline {
              agent any
              stages {
                  stage('Delete') {
                      steps {
                          script {
                              if (env.SOURCE_PROJECT_FULL_NAME?.trim()) {
                                  build job: env.SOURCE_PROJECT_FULL_NAME.replaceAll(/\/[^\/]+$/, '/branch-name'), parameters: [
                                      string(name: 'SOURCE_PROJECT_NAME', value: env.SOURCE_PROJECT_NAME),
                                      string(name: 'SOURCE_PROJECT_FULL_NAME', value: env.SOURCE_PROJECT_FULL_NAME)
                                  ]
                              }
                          }
                      }
                  }
              }
          }
          
          

          I was able to setup a preliminary test which worked fine, with no dead locks so far.

           

          Show
          awong4travelers Alan Wong added a comment - Thank you so much for the update. I just tried 1.8.5 on our sandbox Jenkins and it works perfectly (updating the delete job parameter at the org level propagated correctly). For allowing a repo to handle its own deletions, I'm now using the following Jenkinsfile: pipeline { agent any stages { stage( 'Delete' ) { steps { script { if (env.SOURCE_PROJECT_FULL_NAME?.trim()) { build job: env.SOURCE_PROJECT_FULL_NAME.replaceAll(/\/[^\/]+$/, '/branch-name' ), parameters: [ string(name: 'SOURCE_PROJECT_NAME' , value: env.SOURCE_PROJECT_NAME), string(name: 'SOURCE_PROJECT_FULL_NAME' , value: env.SOURCE_PROJECT_FULL_NAME) ] } } } } } } I was able to setup a preliminary test which worked fine, with no dead locks so far.  
          Hide
          aytuncbeken Aytunc BEKEN added a comment -

          You are welcome!

          Thanks for sharing the job. Nice implementation. I think you should publish this, probably lots of people will look for a similar solution.

          If you do not have any objections, I will close the ticket soon.

          Show
          aytuncbeken Aytunc BEKEN added a comment - You are welcome! Thanks for sharing the job. Nice implementation. I think you should publish this, probably lots of people will look for a similar solution. If you do not have any objections, I will close the ticket soon.
          Hide
          awong4travelers Alan Wong added a comment -

          No objections here. Thank you.

          Show
          awong4travelers Alan Wong added a comment - No objections here. Thank you.
          Hide
          aytuncbeken Aytunc BEKEN added a comment -

          Thank you! for your contribution and all your efforts.

          Show
          aytuncbeken Aytunc BEKEN added a comment - Thank you! for your contribution and all your efforts.

            People

            Assignee:
            aytuncbeken Aytunc BEKEN
            Reporter:
            awong4travelers Alan Wong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: