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

Can't use Jenkinsfile for build git tags

    Details

    • Type: Story
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: pipeline
    • Labels:
    • Environment:
      Jenkins 2.0
    • Similar Issues:

      Description

      I try to migrate to Jenkins 2.0 and Jenkinsfile pipeline definition.
      Base idea:

      • on any commit build make all artifacts;
      • on tag build also publish this artifacts to "GitHub releases" and etc.

      Ideally I want something like from Travis world:

      .travis.yml
      install:
      - ./build.package.sh
      deploy:
        - provider: script
          script: ./publish.manual.sh
          on:
            branch: master
        - provider: script
          script: ./publish.release.sh
          on:
            tags: true
      

      My project located on GitHub and I simply created "Multibranch Pipeline" with "GitHub"
      Branch Source. This solved common commit build pipeline. But it can't build git tags.

      I have no idea, how make build for automatic tag build. But manual build trigger is not a problem for me.

      I try to create a "Pipeline" with string parameter "TAG_NAME" and "Pipeline script from SCM" with "Branch Specifier" = "refs/tags/${TAG_NAME}". But this don't work (looks like TAG_NAME is not pass to environment variable).

      Aslo I can't use "TAG_NAME" parameter value on build with default "Branch Specifier" = "*/master".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                bozaro Artem V. Navrotskiy
              • Votes:
                3 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: