Class: DPL::Provider::Catalyze
- Inherits:
-
DPL::Provider
- Object
- DPL::Provider
- DPL::Provider::Catalyze
- Defined in:
- lib/dpl/provider/catalyze.rb
Instance Method Summary collapse
Instance Method Details
#check_app ⇒ Object
17 18 |
# File 'lib/dpl/provider/catalyze.rb', line 17 def check_app end |
#check_auth ⇒ Object
20 21 22 |
# File 'lib/dpl/provider/catalyze.rb', line 20 def check_auth error "Missing Catalyze target" unless config['target'] end |
#config ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/dpl/provider/catalyze.rb', line 4 def config { # the git repository to deploy to "target" => [:target] || context.env['CATALYZE_TARGET'], # the pathspec for files to add to git for deployment e.g. your build directory. defaults to all files. "path" => [:path] || context.env['CATALYZE_PATH'] || '.' } end |
#needs_key? ⇒ Boolean
13 14 15 |
# File 'lib/dpl/provider/catalyze.rb', line 13 def needs_key? false end |
#push_app ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/dpl/provider/catalyze.rb', line 24 def push_app log "Deploying to Catalyze '#{config['target']}'" if [:skip_cleanup] # create commit message build_num = context.env["TRAVIS_BUILD_NUMBER"] commit = context.env["TRAVIS_COMMIT"] repo_slug = context.env["TRAVIS_REPO_SLUG"] branch = context.env["TRAVIS_BRANCH"] if build_num && commit && repo_slug && branch = "Build ##{build_num} (#{commit}) of #{repo_slug}@#{branch}" else = "Local build" end log "Using build files for deployment" context.shell "git checkout HEAD" context.shell "git add #{config["path"]} --all --force" context.shell "git commit -m \"#{}\" --quiet" end context.shell "git push --force #{config['target']} HEAD:master" end |