Class: Dpl::Providers::GitPush
Constant Summary
Dpl::Provider::FOLDS, Dpl::Provider::STAGES
Instance Attribute Summary
#key_name, #repo_name
Instance Method Summary
collapse
#before_finish, #before_init, #before_install, #before_prepare, #before_setup, #chmod, #cleanup, #cmd, #compact, #err, #error, #escape, examples, #expand, #file?, #finish?, #fold, #fold?, #info, #initialize, install_deps, install_deps?, #mkdir_p, move_files, #msg, #mv, #only, #open, #opt_for, #opt_key, #opts_for, #print, #quote, #read, #remove_dpl_dir, #rm_rf, #run, #run_cmd, #run_cmds, #run_stage, #run_stage?, #script, #setup_dpl_dir, #setup_git_config, #setup_git_http_user_agent, #setup_git_ssh, #setup_ssh_key, #shell, #sq, #ssh_keygen, #symbolize, #try_ssh_access, #uncleanup, unmove_files, validate_runtimes, #wait_for_ssh_access, #warn
#apt, #apt?, #cmds, #description, #env, #errs, #full_name, #gem, #gem?, #keep, #move, #msgs, #needs, #needs?, #node_js, #npm, #npm?, #opt, #path, #pip, #pip?, #python, #ruby_pre?, #ruby_version, #runtimes, #status, #strs, #summary, #user_agent, #vars
Methods included from Squiggle
#sq
Methods included from Assets
#asset
Methods included from Env
included, #opts
Methods included from ConfigFile
included, #opts
#interpolate, #obfuscate, #vars
Methods included from Memoize
included
Constructor Details
This class inherits a constructor from Dpl::Provider
Instance Method Details
#deploy ⇒ Object
93
94
95
96
97
98
99
100
|
# File 'lib/dpl/providers/git_push.rb', line 93
def deploy
git_clone
copy_files
return info :stop unless git_dirty?
push
pull_request if pull_request?
end
|
#login ⇒ Object
85
86
87
|
# File 'lib/dpl/providers/git_push.rb', line 85
def login
token? ? login_token : setup_deploy_key
end
|
#prepare ⇒ Object
89
90
91
|
# File 'lib/dpl/providers/git_push.rb', line 89
def prepare
Dir.chdir(work_dir)
end
|
#pull_request ⇒ Object
108
109
110
|
# File 'lib/dpl/providers/git_push.rb', line 108
def pull_request
pr_exists? ? info(:pr_exists) : create_pr
end
|
#push ⇒ Object
102
103
104
105
106
|
# File 'lib/dpl/providers/git_push.rb', line 102
def push
git_config
git_commit
git_push
end
|
#setup ⇒ Object
80
81
82
83
|
# File 'lib/dpl/providers/git_push.rb', line 80
def setup
info :setup
info :git_config
end
|
#validate ⇒ Object
76
77
78
|
# File 'lib/dpl/providers/git_push.rb', line 76
def validate
error :same_branch if same_branch? && !allow_same_branch?
end
|