pkg-wizard 0.1.15 → 0.1.16
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.
- data/lib/pkg-wizard/commands/build_bot.rb +8 -1
- data/lib/pkg-wizard.rb +1 -1
- metadata +4 -4
|
@@ -97,13 +97,15 @@ module PKGWizard
|
|
|
97
97
|
snapshots = Dir["snapshot/snapshot*"].size
|
|
98
98
|
sjobs = Dir["output/job*"].size
|
|
99
99
|
qjobs = Dir["incoming/*.src.rpm"].size
|
|
100
|
+
cjobs = Dir["workspace/job_*"].size
|
|
100
101
|
total_jobs = fjobs + sjobs
|
|
101
102
|
{
|
|
102
103
|
:failed_jobs => fjobs,
|
|
103
104
|
:successful_jobs => sjobs,
|
|
104
105
|
:enqueued => qjobs,
|
|
105
106
|
:total_jobs => total_jobs,
|
|
106
|
-
:snapshots => snapshots
|
|
107
|
+
:snapshots => snapshots,
|
|
108
|
+
:building => cjobs
|
|
107
109
|
}.to_yaml
|
|
108
110
|
end
|
|
109
111
|
|
|
@@ -251,11 +253,16 @@ module PKGWizard
|
|
|
251
253
|
end
|
|
252
254
|
end
|
|
253
255
|
|
|
256
|
+
# Build queue
|
|
254
257
|
scheduler = Rufus::Scheduler.start_new
|
|
255
258
|
scheduler.every '2s', :blocking => true do
|
|
256
259
|
meta[:start_time] = Time.now
|
|
257
260
|
queue = Dir['incoming/*.src.rpm'].sort_by {|filename| File.mtime(filename) }
|
|
258
261
|
if not queue.empty?
|
|
262
|
+
# Clean workspace first
|
|
263
|
+
Dir["workspace/job_*"].each do |j|
|
|
264
|
+
FileUtils.rm_rf j
|
|
265
|
+
end
|
|
259
266
|
job_dir = "workspace/job_#{Time.now.strftime '%Y%m%d_%H%M%S'}"
|
|
260
267
|
qfile = File.join(job_dir, File.basename(queue.first))
|
|
261
268
|
job_time = Time.now.strftime '%Y%m%d_%H%M%S'
|
data/lib/pkg-wizard.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pkg-wizard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 59
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 16
|
|
10
|
+
version: 0.1.16
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Sergio Rubio
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-03-
|
|
18
|
+
date: 2011-03-15 00:00:00 +01:00
|
|
19
19
|
default_executable: pkgwiz
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|