rakelib/install.rake
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 30 May 2016 23:05:25 +0100
changeset 24 ae6fc15070e4
parent 8 659ebd541dd2
child 137 e665031cade7
permissions -rw-r--r--
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