Sha256: 4dea7ce28c00cc8f2ee946596b57ac099913f3a5a9a66c65de79a283e34f41f5

Contents?: true

Size: 852 Bytes

Versions: 1

Compression:

Stored size: 852 Bytes

Contents

require 'picsolve_docker_builder/composer/composer'

namespace :compose do
  desc 'Deploy to composition - jenkins task'
  task :jenkins do
    fail 'Not in a Jenkins environment' \
      if ENV['BUILD_NUMBER'].nil?
    Rake::Task[:'docker:deploy'].invoke
  end

  task :jenkins_fake do
    ENV['BUILD_NUMBER'] = '1234'
    Rake::Task[:'docker:jenkins'].invoke
  end

  task :prepare do
    @docker_compose ||= PicsolveDockerBuilder::Composer::Composer.new
    @docker_compose.prepare
  end

  desc 'Deploy to composition'
  task deploy: :prepare do
    stage = ENV['STAGE'] || 'CI'
    @docker_compose.stage = stage
    @docker_compose.deploy
  end

  desc 'Update version of container'
  task :update do
    require 'picsolve_docker_builder/helpers/config_version_update'
    PicsolveDockerBuilder::Helpers::ConfigVersionUpdate.update_task
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picsolve_docker_builder-0.5.1 lib/tasks/compose.rake