File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ pipeline {
22 agent { docker ' ruby:2.6.3' }
33 parameters {
44 booleanParam(name : ' RELEASE' , defaultValue : false , description : ' Perform release?' )
5+ string(name : ' RELEASE_VERSION' , defaultValue : ' ' , description : ' Release version' )
56 }
67 stages {
78 stage(' Install' ) {
@@ -20,8 +21,12 @@ pipeline {
2021 when { expression { return params. RELEASE } }
2122 steps {
2223 configFileProvider([configFile(fileId : ' gem-credentials' , variable : ' CREDENTIALS' )]) {
23- sh ' mkdir -p ~/.gem && mv $CREDENTIALS ~/.gem/credentials && chmod 0600 ~/.gem/credentials'
24- sh ' bundle exec rake release'
24+ sshagent([' qameta-ci_ssh' ]) {
25+ sh ' mkdir -p ~/.gem && mv $CREDENTIALS ~/.gem/credentials && chmod 0600 ~/.gem/credentials'
26+ sh ' git checkout master && git pull origin master'
27+ sh ' bundle exec rake bump[${RELEASE_VERSION}]'
28+ sh ' bundle exec rake release'
29+ }
2530 }
2631 }
2732 }
Original file line number Diff line number Diff line change 55
66directory "pkg"
77
8+ desc "Bump allure version"
9+ task :bump , [ :version ] do |_task , args |
10+ version = args [ :version ]
11+ File . write ( "#{ root } /ALLURE_VERSION" , version , mode : "w" )
12+
13+ sh "bundle install --quiet && git commit Gemfile.lock ALLURE_VERSION -m 'Update allure to v#{ version } '"
14+ sh "git tag #{ version } "
15+ sh "git push origin HEAD --follow-tags"
16+ end
17+
818ADAPTORS . each do |adaptor |
919 namespace adaptor do
1020 gem = "pkg/#{ adaptor } -#{ version } .gem"
2737end
2838
2939namespace :all do
40+ task clean : ADAPTORS . map { |adaptor | "#{ adaptor } :clean" }
3041 task build : ADAPTORS . map { |adaptor | "#{ adaptor } :build" }
31- task install : ADAPTORS . map { |adaptor | "#{ adaptor } :install" }
3242 task push : ADAPTORS . map { |adaptor | "#{ adaptor } :push" }
3343end
You can’t perform that action at this time.
0 commit comments