Skip to content

Commit

Permalink
ci: Adding set-upstream origin to release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
rottebds committed Jan 25, 2022
1 parent 4357174 commit 2c25873
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jenkinsfile_dev
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ node('integrations') {
SimplePipeline pipeline = new SimplePipeline(this)
pipeline.addCleanupStep('.')

String gitBranch = pipeline.determineGitBranch(branch)
String gitBranch = pipeline.determineGitBranch(params.BRANCH)
pipeline.setDirectoryFromBranch(gitBranch)
def gitStage = pipeline.addGitStage(gitUrl, gitBranch, false)
gitStage.setChangelog(true)
Expand Down
2 changes: 1 addition & 1 deletion jenkinsfile_pop_detect
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ node('integrations') {
SimplePipeline pipeline = new SimplePipeline(this)
pipeline.addCleanupStep('.')

String gitBranch = pipeline.determineGitBranch(branch)
String gitBranch = pipeline.determineGitBranch(params.BRANCH)
pipeline.setDirectoryFromBranch(gitBranch)
def gitStage = pipeline.addGitStage(gitUrl, gitBranch, false)
gitStage.setChangelog(true)
Expand Down
3 changes: 2 additions & 1 deletion jenkinsfile_release
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ node('integrations') {
SimplePipeline pipeline = new SimplePipeline(this)
pipeline.addCleanupStep('.')

String gitBranch = pipeline.determineGitBranch(branch)
String gitBranch = pipeline.determineGitBranch(params.BRANCH)
pipeline.setDirectoryFromBranch(gitBranch)
def gitStage = pipeline.addGitStage(gitUrl, gitBranch, false)
gitStage.setChangelog(true)
Expand All @@ -47,6 +47,7 @@ node('integrations') {
}

pipeline.addStage('Release'){
sh 'git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
sh 'npm ci && npm version $(git rev-parse --abbrev-ref HEAD)'
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"all": "npm run build && npm run format && npm run lint && npm run package && npm test",
"preversion": "npm test",
"version": "npm run build && git add -A dist",
"postversion": "git push https://github.com/synopsys-sig/detect-action.git && git push https://github.com/synopsys-sig/detect-action.git --tags"
"postversion": "git push && git push --tags"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 2c25873

Please sign in to comment.