Fixed `Jenkinsfile.rb` to correctly propagate --project and --arch to `rake`
Since `Jenkinsfile.rb` does not spawn a subprocess but rather executes
rake within the same process, PROJECT and ARCH must be defined as
Ruby constants rather than as plain environment variables.
--- a/Jenkinsfile.rb Fri May 27 21:38:36 2016 +0100
+++ b/Jenkinsfile.rb Fri May 27 23:09:29 2016 +0100
@@ -11,10 +11,12 @@
opts.banner = "Usage: #{$0} [TASK1 [TASK2 [...]]\n"
opts.on('-p', '--project PROJECT', "PROJECT to build. Overrides project specified by the environment variable.") do | value |
ENV['PROJECT'] = value
+ self.class.const_set('PROJECT', value)
end
opts.on('-a', '--arch ARCH', "Arcitecture to build for. Overrides project specified by the environment variable.") do | value |
ENV['ARCH'] = value
+ self.class.const_set('ARCH', value)
end
opts.on(nil, '--help', "Prints this message") do