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:
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".
- duplicates
-
JENKINS-34395 Support for building tags
-
- Closed
-
- is related to
-
JENKINS-34540 Can't use Pipeline Parameter in Branch Specifier on Jenkins 1.651.2/2.0-2.6
-
- Closed
-
-
JENKINS-34176 Trigger when Github tag is pushed
-
- Resolved
-
[JENKINS-34520] Can't use Jenkinsfile for build git tags
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". |
Link |
New:
This issue is related to |
Labels | Original: 2.0 Jenkinsfile | New: 2.0 2.1 Jenkinsfile |
Link |
New:
This issue is related to |
Labels | Original: 2.0 2.1 Jenkinsfile | New: 2.0 2.1 |
Link |
New:
This issue duplicates |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 170659 ] | New: JNJira + In-Review [ 198917 ] |
Component/s | New: pipeline-general [ 21692 ] |
Component/s | Original: workflow-plugin [ 18820 ] |