Details

    • Similar Issues:

      Description

      When pipeline project have that configuration (pipeline script)

      pipeline script
      properties([
          [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], 
          parameters([
              [$class: 'GitParameterDefinition', 
                       branch: '', 
                       branchFilter: '.*', 
                       defaultValue: '', 
                       description: 'description', 
                       name: 'BRANCH_PARAM',
                       quickFilterEnabled: false, 
                       selectedValue: 'NONE', sortMode: 'NONE',tagFilter: '*', type: 'PT_BRANCH']
          ]),
          pipelineTriggers([])
      ])
      
      node('master') {
          // some block
          stage('get GIT Learn') {
              git url: 'https://github.com/klimas7/Learn.git', branch: params.BRANCH_PARAM
          }
          stage('get GIT Learn Spring') {
              git url: 'https://github.com/klimas7/LearnSpring.git'
          }
      }
      

      Plugin doesn't work correctly

        Attachments

          Activity

          Hide
          jfarr Jonothan Farr added a comment -

          Any updates on how to use this plugin from a Jenkinsfile? I'm trying to figure out how to use it in the parameters section of a declarative pipeline and I can't find any info on the wiki page. Any example would be really helpful, thanks.

          Show
          jfarr Jonothan Farr added a comment - Any updates on how to use this plugin from a Jenkinsfile? I'm trying to figure out how to use it in the parameters section of a declarative pipeline and I can't find any info on the wiki page. Any example would be really helpful, thanks.
          Hide
          gillingham Eric Gillingham added a comment - - edited

          Does this include support for triggered builds? I have the following Jenkinsfile

          // Set parameter and settings
          properties([
              parameters([
                  [$class: 'GitParameterDefinition',
                      branch: '',
                      branchFilter: '.*',
                      defaultValue: '',
                      description: 'Version to release',
                      name: 'RELEASE_VERSION',
                      quickFilterEnabled: false,
                      selectedValue: 'NONE',
                      sortMode: 'DESCENDING_SMART',
                      tagFilter: '*',
                      type: 'PT_TAG']
              ]),
              pipelineTriggers([
                  pollSCM('')
              ])
          ])
          
          node {
            try {
              stage('checkout') {
                checkout scm
              }
              stage('compile') {
                echo sh(returnStdout: true, script: 'env')
                echo "nothing to compile..."
              }
              stage('publish') {
                echo "uploading package..."
              }
            } finally {
              stage('cleanup') {
                echo "Final step"
              }
            }
          }
          

          The repo is setup with refs/tags/* as the Branch Specifier, and when I create a tag a build is triggered, but the RELEASE_VERSION variable is not set.

          I've seen in other issues that it could be Lightweight checkout related but I made sure in the repo "Lightweight checkout" is unchecked.

          Show
          gillingham Eric Gillingham added a comment - - edited Does this include support for triggered builds? I have the following Jenkinsfile // Set parameter and settings properties([ parameters([ [$class: 'GitParameterDefinition' , branch: '', branchFilter: '.*' , defaultValue: '', description: 'Version to release' , name: 'RELEASE_VERSION' , quickFilterEnabled: false , selectedValue: 'NONE' , sortMode: 'DESCENDING_SMART' , tagFilter: '*' , type: 'PT_TAG' ] ]), pipelineTriggers([ pollSCM('') ]) ]) node { try { stage( 'checkout' ) { checkout scm } stage( 'compile' ) { echo sh(returnStdout: true , script: 'env' ) echo "nothing to compile..." } stage( 'publish' ) { echo "uploading package ..." } } finally { stage( 'cleanup' ) { echo "Final step" } } } The repo is setup with refs/tags/* as the Branch Specifier, and when I create a tag a build is triggered, but the RELEASE_VERSION variable is not set. I've seen in other issues that it could be Lightweight checkout related but I made sure in the repo "Lightweight checkout" is unchecked.
          Hide
          omervk Omer van Kloeten added a comment -

          Wonderful, thank you! I'm looking forward to it.
          Would appreciate it if you @ mentioned me in this thread once you do, if possible.

          Show
          omervk Omer van Kloeten added a comment - Wonderful, thank you! I'm looking forward to it. Would appreciate it if you @ mentioned me in this thread once you do, if possible.
          Hide
          klimas7 Boguslaw Klimas added a comment -

          On the next week I will describe plugin usages case on the wiki page

          Show
          klimas7 Boguslaw Klimas added a comment - On the next week I will describe plugin usages case on the wiki page
          Hide
          omervk Omer van Kloeten added a comment -

          Could you please provide an example of this for declarative pipelines?

          Show
          omervk Omer van Kloeten added a comment - Could you please provide an example of this for declarative pipelines?
          Hide
          klimas7 Boguslaw Klimas added a comment -

          Release 0.9.0

          Show
          klimas7 Boguslaw Klimas added a comment - Release 0.9.0

            People

            • Assignee:
              klimas7 Boguslaw Klimas
              Reporter:
              klimas7 Boguslaw Klimas
            • Votes:
              9 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: