cyclid 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cyclid/plugins/api/github/helpers.rb +4 -4
- data/app/cyclid/plugins/provisioner/debian.rb +5 -0
- data/app/cyclid/plugins/provisioner/ubuntu.rb +5 -0
- data/app/cyclid/plugins/transport/ssh.rb +0 -6
- data/bin/cyclid-db-init +8 -4
- data/lib/cyclid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 075e82b45f23bff6cb7e99792eb97e3d7a55e912
|
4
|
+
data.tar.gz: 2ccbb21e53f9db060786e22d641a05203c18d420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3bcc3a37f8c1bd4b83d90ed61af1bee3482d94b05b60c0966bb05f7fa433a618671d4450ab94890ffeb4fa5bd5b0c672af133067aae5dc68d3d7d0f01893501
|
7
|
+
data.tar.gz: 35cfcb20a3434bd9e0ff492c00017e64288b51cda48662417b61807e7cf4584f0cba83201592ad648f48a259c71776b55bbc3aff432f8321170dff0e134e4e7f
|
@@ -29,14 +29,14 @@ module Cyclid
|
|
29
29
|
@pr ||= @payload['pull_request']
|
30
30
|
end
|
31
31
|
|
32
|
-
def pr_clone_url
|
33
|
-
pull_request['base']['repo']['html_url']
|
34
|
-
end
|
35
|
-
|
36
32
|
def pr_head
|
37
33
|
@pr_head ||= pull_request['head']
|
38
34
|
end
|
39
35
|
|
36
|
+
def pr_clone_url
|
37
|
+
pr_head['repo']['html_url']
|
38
|
+
end
|
39
|
+
|
40
40
|
def pr_sha
|
41
41
|
pr_head['sha']
|
42
42
|
end
|
@@ -25,6 +25,10 @@ module Cyclid
|
|
25
25
|
def prepare(transport, buildhost, env = {})
|
26
26
|
transport.export_env('DEBIAN_FRONTEND' => 'noninteractive')
|
27
27
|
|
28
|
+
# Build hosts may require an update before anything can be installed
|
29
|
+
success = transport.exec 'apt-get update'
|
30
|
+
raise 'failed to update repositories' unless success
|
31
|
+
|
28
32
|
if env.key? :repos
|
29
33
|
env[:repos].each do |repo|
|
30
34
|
next unless repo.key? :url
|
@@ -39,6 +43,7 @@ module Cyclid
|
|
39
43
|
end
|
40
44
|
end
|
41
45
|
|
46
|
+
# We must update again to cache the new repositories
|
42
47
|
success = transport.exec 'apt-get update'
|
43
48
|
raise 'failed to update repositories' unless success
|
44
49
|
end
|
@@ -25,6 +25,10 @@ module Cyclid
|
|
25
25
|
def prepare(transport, buildhost, env = {})
|
26
26
|
transport.export_env('DEBIAN_FRONTEND' => 'noninteractive')
|
27
27
|
|
28
|
+
# Build hosts may require an update before anything can be installed
|
29
|
+
success = transport.exec 'apt-get update'
|
30
|
+
raise 'failed to update repositories' unless success
|
31
|
+
|
28
32
|
if env.key? :repos
|
29
33
|
# Ensure apt-get-repository is available
|
30
34
|
transport.exec 'apt-get install -y software-properties-common'
|
@@ -45,6 +49,7 @@ module Cyclid
|
|
45
49
|
end
|
46
50
|
end
|
47
51
|
|
52
|
+
# We must update again to cache the new repositories
|
48
53
|
success = transport.exec 'apt-get update'
|
49
54
|
raise 'failed to update repositories' unless success
|
50
55
|
end
|
@@ -122,17 +122,11 @@ module Cyclid
|
|
122
122
|
|
123
123
|
# Close the SSH connection
|
124
124
|
def close
|
125
|
-
logout
|
126
|
-
|
127
125
|
@session.close
|
128
126
|
end
|
129
127
|
|
130
128
|
private
|
131
129
|
|
132
|
-
def logout
|
133
|
-
exec 'exit'
|
134
|
-
end
|
135
|
-
|
136
130
|
def build_command(cmd, path = nil, env = {})
|
137
131
|
command = []
|
138
132
|
if env
|
data/bin/cyclid-db-init
CHANGED
@@ -59,9 +59,10 @@ def generate_password
|
|
59
59
|
%w($ % ^ & * _)).sample(8).join
|
60
60
|
end
|
61
61
|
|
62
|
-
def create_admin_user
|
63
|
-
secret = SecureRandom.hex(32)
|
64
|
-
password = generate_password
|
62
|
+
def create_admin_user(initial_secret, initial_password)
|
63
|
+
secret = initial_secret || SecureRandom.hex(32)
|
64
|
+
password = initial_password || generate_password
|
65
|
+
|
65
66
|
user = User.new
|
66
67
|
user.username = 'admin'
|
67
68
|
user.email = 'admin@example.com'
|
@@ -97,7 +98,10 @@ def update_user_perms
|
|
97
98
|
permissions.save!
|
98
99
|
end
|
99
100
|
|
100
|
-
|
101
|
+
initial_secret = ARGV[0]
|
102
|
+
initial_password = ARGV[1]
|
103
|
+
|
104
|
+
secret, password = create_admin_user(initial_secret, initial_password)
|
101
105
|
create_admin_organization
|
102
106
|
|
103
107
|
update_user_perms
|
data/lib/cyclid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyclid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristian Van Der Vliet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|