bard 0.44.0 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bard/ci.rb +9 -5
- data/lib/bard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86e79ccc420d8bed3ff834d150b9f58da74e34981dc59a244dd92de38fb5e831
|
|
4
|
+
data.tar.gz: 816db71d99a04cb75aff222369e41e719de7da1b608fc518b74e9ec3ba5a5ec0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70fedcdd193a7588a6342a7efee99ddf95598599d80b50d48206fb29674e1dcf002ac3a239c0e836630190a1b5e8552d2bfe8ecc53f600fc031e3d44330631ac
|
|
7
|
+
data.tar.gz: 1c2dc2a6b0f6c6b225b520f7d801f8ae0dfd16b4007302db9ab2b713036f1bf89a4a5e4cd9f0bd422e23c5c3830b45ea94095283a780540fb1e87c88c0559917
|
data/lib/bard/ci.rb
CHANGED
|
@@ -38,11 +38,11 @@ class Bard::CLI < Thor
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def exists?
|
|
41
|
-
`curl -s -I #{ci_host}
|
|
41
|
+
`curl -s -I #{ci_host}/` =~ /\b200 OK\b/
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def console
|
|
45
|
-
raw = `curl -s #{ci_host}/lastBuild/console
|
|
45
|
+
raw = `curl -s #{ci_host}/lastBuild/console`
|
|
46
46
|
raw[%r{<pre.*?>(.+)</pre>}m, 1]
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -51,17 +51,21 @@ class Bard::CLI < Thor
|
|
|
51
51
|
private
|
|
52
52
|
|
|
53
53
|
def get_last_time_elapsed
|
|
54
|
-
response = `curl -s #{ci_host}/lastStableBuild/api/xml
|
|
54
|
+
response = `curl -s #{ci_host}/lastStableBuild/api/xml`
|
|
55
55
|
response.match(/<duration>(\d+)<\/duration>/)
|
|
56
56
|
$1 ? $1.to_i / 1000 : nil
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
def auth
|
|
60
|
+
"botandrose:11cc2ba6ef2e43fbfbedc1f466724f6290"
|
|
61
|
+
end
|
|
62
|
+
|
|
59
63
|
def ci_host
|
|
60
|
-
"http
|
|
64
|
+
"http://#{auth}@ci.botandrose.com/job/#{project_name}"
|
|
61
65
|
end
|
|
62
66
|
|
|
63
67
|
def start
|
|
64
|
-
command = "curl -s -I -X POST '#{ci_host}/buildWithParameters?
|
|
68
|
+
command = "curl -s -I -X POST -L '#{ci_host}/buildWithParameters?GIT_REF=#{sha}'"
|
|
65
69
|
output = `#{command}`
|
|
66
70
|
@queueId = output[%r{Location: .+/queue/item/(\d+)/}, 1].to_i
|
|
67
71
|
end
|
data/lib/bard/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.44.
|
|
4
|
+
version: 0.44.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-04-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|