• Icon: Story Story
    • Resolution: Duplicate
    • Icon: Minor Minor
    • pipeline
    • Jenkins 2.0

      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".

          [JENKINS-34520] Can't use Jenkinsfile for build git tags

          Artem V. Navrotskiy created issue -
          Artem V. Navrotskiy made changes -
          Description Original: 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:
          {code:title=.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
          {code}

          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".
          New: 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:
          {code:title=.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
          {code}

          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".
          Artem V. Navrotskiy made changes -
          Link New: This issue is related to JENKINS-34540 [ JENKINS-34540 ]
          Artem V. Navrotskiy made changes -
          Labels Original: 2.0 Jenkinsfile New: 2.0 2.1 Jenkinsfile
          sam lewis made changes -
          Link New: This issue is related to JENKINS-34176 [ JENKINS-34176 ]
          Jesse Glick made changes -
          Labels Original: 2.0 2.1 Jenkinsfile New: 2.0 2.1
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-34395 [ JENKINS-34395 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170659 ] New: JNJira + In-Review [ 198917 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

            jglick Jesse Glick
            bozaro Artem V. Navrotskiy
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: