Jenkinsfile.rb: added new target `jenkins:job`
...run when no targets are given to `Jenkinsfile.rb` on command line.
This job does everything - checks out & updates existing code,
(re)compiles, run tests and static analysis and finally create build
artifacts.
desc "Install project into INSTALL_DIR"
task :'install' => [ :'compile',
:'install:pre',
:'install:main',
:'install:post' ]
namespace :'install' do
task :'pre'
task :'post'
task :'main'
end
desc "Create build artifacts, e.g., deployable archives & packages"
task :'artifacts' => [ :'install',
:'artifacts:pre',
:'artifacts:main',
:'artifacts:post' ]
namespace :'artifacts' do
task :'pre'
task :'post'
task :'main' => :'setup' do
if File.exist? ARTIFACTS_DIR / BUILD_NAME then
zip ARTIFACTS_DIR / BUILD_NAME, remove: true
end
end
end