Class: ReleaseManager::VCSManager::VcsAdapter
- Inherits:
-
Object
- Object
- ReleaseManager::VCSManager::VcsAdapter
show all
- Includes:
- Logger
- Defined in:
- lib/release_manager/vcs_manager/vcs_adapter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
-
#add_known_hosts_keys(hostname) ⇒ Object
-
#add_permission(user, repo) ⇒ Object
-
#add_ssh_key(public_key) ⇒ Object
-
#clone_repo(mod_name, url) ⇒ Object
-
#create_merge_request(project, title, options = {}) ⇒ Gitlab::ObjectifiedHash
-
#create_repo_branch(repo_id, branch_name) ⇒ Object
-
#create_repo_fork(url, options = {}) ⇒ Object
-
#create_tag(url, tag_name, ref, message = nil, description = nil) ⇒ Gitlab::ObjectifiedHash
-
#diff_2_commit(diff_obj) ⇒ Object
-
#rebase_mr(url, mr_id) ⇒ Object
-
#remote_tag_exists?(url, tag) ⇒ Boolean
-
#remote_tag_names(url) ⇒ Object
-
#remote_tags(url) ⇒ Object
-
#repo_exists?(url) ⇒ Boolean
-
#repo_id(url) ⇒ Object
-
#swap_namespace(url, namespace = nil) ⇒ Object
-
#validate_authorization ⇒ Object
-
#vcs_create_branch(url, name, ref) ⇒ Object
-
#vcs_create_commit(url, branch, message, actions, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a single commit with one or more changes.
Methods included from Logger
#color, #log_level, #logger
Class Method Details
.create ⇒ Object
9
10
11
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 9
def self.create
raise NotImplementedError
end
|
Instance Method Details
#add_known_hosts_keys(hostname) ⇒ Object
106
107
108
109
110
111
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 106
def add_known_hosts_keys(hostname)
URI(ReleaseManager.gitlab_server)
known_hosts = File.expand_dir(File.join('~', '.ssh', 'ssh_known_hosts'))
`ssh-keygen -F #{hostname} -f #{known_hosts} > /dev/null`
`ssh-keyscan -H #{hostname} >> #{known_hosts}` unless $CHILD_STATUS.success?
end
|
#add_permission(user, repo) ⇒ Object
17
18
19
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 17
def add_permission(user, repo)
raise NotImplementedError
end
|
#add_ssh_key(public_key) ⇒ Object
13
14
15
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 13
def add_ssh_key(public_key)
raise NotImplementedError
end
|
#clone_repo(mod_name, url) ⇒ Object
29
30
31
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 29
def clone_repo(mod_name, url)
raise NotImplementedError
end
|
#create_merge_request(project, title, options = {}) ⇒ Gitlab::ObjectifiedHash
101
102
103
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 101
def create_merge_request(project, title, options={})
raise NotImplementedError
end
|
#create_repo_branch(repo_id, branch_name) ⇒ Object
33
34
35
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 33
def create_repo_branch(repo_id, branch_name)
raise NotImplementedError
end
|
#create_repo_fork(url, options = {}) ⇒ Object
21
22
23
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 21
def create_repo_fork(url, options = {} )
raise NotImplementedError
end
|
#create_tag(url, tag_name, ref, message = nil, description = nil) ⇒ Gitlab::ObjectifiedHash
64
65
66
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 64
def create_tag(url, tag_name, ref, message = nil, description = nil)
raise NotImplementedError
end
|
#diff_2_commit(diff_obj) ⇒ Object
120
121
122
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 120
def diff_2_commit(diff_obj)
raise NotImplementedError
end
|
#rebase_mr(url, mr_id) ⇒ Object
54
55
56
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 54
def rebase_mr(url, mr_id)
raise NotImplementedError
end
|
#remote_tag_exists?(url, tag) ⇒ Boolean
132
133
134
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 132
def remote_tag_exists?(url, tag)
raise NotImplementedError
end
|
#remote_tag_names(url) ⇒ Object
128
129
130
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 128
def remote_tag_names(url)
raise NotImplementedError
end
|
124
125
126
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 124
def remote_tags(url)
raise NotImplementedError
end
|
#repo_exists?(url) ⇒ Boolean
37
38
39
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 37
def repo_exists?(url)
raise NotImplementedError
end
|
#repo_id(url) ⇒ Object
41
42
43
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 41
def repo_id(url)
raise NotImplementedError
end
|
#swap_namespace(url, namespace = nil) ⇒ Object
25
26
27
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 25
def swap_namespace(url, namespace = nil)
raise NotImplementedError
end
|
#validate_authorization ⇒ Object
114
115
116
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 114
def validate_authorization
raise NotImplementedError
end
|
#vcs_create_branch(url, name, ref) ⇒ Object
48
49
50
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 48
def vcs_create_branch(url, name, ref)
raise NotImplementedError
end
|
#vcs_create_commit(url, branch, message, actions, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a single commit with one or more changes
create_commit(2726132, ‘master’, ‘refactors everything’, [‘create’, file_path: ‘/foo.txt’, content: ‘bar’]) create_commit(2726132, ‘master’, ‘refactors everything’, [‘delete’, file_path: ‘/foo.txt’])
81
82
83
|
# File 'lib/release_manager/vcs_manager/vcs_adapter.rb', line 81
def vcs_create_commit(url, branch, message, actions, options={})
raise NotImplementedError
end
|