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

Add option to pass custom paramters from multibranch to the trigger jobs

    XMLWordPrintable

Details

    • 1.8

    Description

      It would be nice to have additional option in the multichannel pipline configuration to specify custom parameters to pass to the tirgger job.

      The problem we are facing right now is next. We have a lot of multibranch projects for different apps: 

       

       

      app1
      
          master branch
      
          feature1
      
      app2
      
          master
      
      app3
      
         ....
       
      

       

      But for most of those apps the OnDelete trigger job performs the same steps. The only difference is that we need to cleanup resources according to the app name. We want to have only one OnDelete job for all those multibranch projects but provide parameters together with SOURCE_PROJECT_NAME param to indicate for what app we've triggered job.

      Also it might be useful to pass other custom parameters from the upstream job.

      Attachments

        Activity

          aytuncbeken Aytunc BEKEN added a comment -

          Hi,

          Adding custom parameters feature is released with 1.8 version. Probably It will be available soon in the plugin site.
          Please let me know, then I will close the ticket.

          Thanks.

          aytuncbeken Aytunc BEKEN added a comment - Hi, Adding custom parameters feature is released with 1.8 version. Probably It will be available soon in the plugin site. Please let me know, then I will close the ticket. Thanks.
          pbx_g33k Oguzhan Uysal added a comment - - edited

          Hi aytuncbeken,

          Works like a charm, and having support for environment variables as values makes it even better. Thanks for picking this up quickly.

          I spoke too soon sorry. 

          In our multibranch project we define parameters and environment variables in the jenkinsfile to determine if a deployment should take place and to which environment. These values are dynamic and assigned to the env in the build context. Is it possible to pass these dynamic values to the job triggered by this plugin?

          setting `${ENV}` passes the literal string instead of the expected value

          pbx_g33k Oguzhan Uysal added a comment - - edited Hi aytuncbeken , Works like a charm, and having support for environment variables as values makes it even better. Thanks for picking this up quickly. I spoke too soon sorry.  In our multibranch project we define parameters and environment variables in the jenkinsfile to determine if a deployment should take place and to which environment. These values are dynamic and assigned to the env in the build context. Is it possible to pass these dynamic values to the job triggered by this plugin? setting `${ENV}` passes the literal string instead of the expected value
          aytuncbeken Aytunc BEKEN added a comment -

          Hi,

          To be in the same page, I will write what I understood.
          You have your parameters/variables in your Jenkins file.g
          So you are asking if it is possible to pass these parameters/variables to the jobs which are triggered by this plugin.
          If this is the case, I need search if it is possible or not. Because triggering occurs in the Jenkins branch indexing action which is before checking the Jenkinsfile.

          As this is different from the current enhancement. I will be glad if you can open a new ticket so I can close this.

          Thanks.

          aytuncbeken Aytunc BEKEN added a comment - Hi, To be in the same page, I will write what I understood. You have your parameters/variables in your Jenkins file.g So you are asking if it is possible to pass these parameters/variables to the jobs which are triggered by this plugin. If this is the case, I need search if it is possible or not. Because triggering occurs in the Jenkins branch indexing action which is before checking the Jenkinsfile. As this is different from the current enhancement. I will be glad if you can open a new ticket so I can close this. Thanks.
          pbx_g33k Oguzhan Uysal added a comment -

          Hi,

          Your interpretation of my issue/request is correct. As requested i have opened a new issue, https://issues.jenkins-ci.org/browse/JENKINS-61027.
          Thank you for your help. 

          pbx_g33k Oguzhan Uysal added a comment - Hi, Your interpretation of my issue/request is correct. As requested i have opened a new issue,  https://issues.jenkins-ci.org/browse/JENKINS-61027 . Thank you for your help. 
          aytuncbeken Aytunc BEKEN added a comment -

          Thanks a lot.

          oleksii_baranov I will close this issue as I assume it is working as requested.

          aytuncbeken Aytunc BEKEN added a comment - Thanks a lot. oleksii_baranov I will close this issue as I assume it is working as requested.

          People

            aytuncbeken Aytunc BEKEN
            oleksii_baranov Oleksii Baranov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: