[jenkinscat-docs] master: Finished 2nd working version of the script. (cee6d4a)

immanetize at fedoraproject.org immanetize at fedoraproject.org
Fri Feb 6 07:41:09 UTC 2015


Repository : http://git.fedorahosted.org/cgit/jenkinscat-docs.git

On branch  : master

>---------------------------------------------------------------

commit cee6d4ab862c186b8ed6b38eca00c5495676ab93
Author: Pavel Tisnovsky <ptisnovs at redhat.com>
Date:   Wed Jan 21 11:51:39 2015 +0100

    Finished 2nd working version of the script.


>---------------------------------------------------------------

 ChangeLog                       |    5 +++++
 tools/create_books_clj_file.lua |   39 ++++++++++++++++++++++++++++++++-------
 2 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6a4cb4f..ec6bd7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 2015-01-21  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* tools/create_books_clj_file.lua:
+	Finished 2nd working version of the script.
+
+2015-01-21  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* tools/create_books_clj_file.lua:
 	Support for normal book processing.
 
 2015-01-20  Pavel Tisnovsky  <ptisnovs at redhat.com>
diff --git a/tools/create_books_clj_file.lua b/tools/create_books_clj_file.lua
index bc7e979..f9f7d75 100644
--- a/tools/create_books_clj_file.lua
+++ b/tools/create_books_clj_file.lua
@@ -4,6 +4,7 @@ local json = require("dkjson")
 
 local json_url = "http://jenkins.machine:8080/"
 
+local bugzilla_url = "http://bugzilla.org/enter_bug.cgi?keywords=Documentation&groups=private&"
 local jenkins_dir = "/var/lib/jenkins/"
 
 local workdir = "work/"
@@ -212,7 +213,7 @@ end
 --
 --
 function readDocumentInfoFromPublicanCfg(jobDirectory)
-    local publicanCfgFile = jobDirectory .. "/workspace/publican.cfg"
+    local publicanCfgFile = jobDirectory .. "/publican.cfg"
 
     local fin = io.open(publicanCfgFile, "r")
     if fin == nil then
@@ -871,13 +872,37 @@ function main()
     --print(bug_template)
 
     local allJobs = fetchListOfAllJobs()
-    addJobDirectories(allJobs)
-    --addJobBuildCount(allJobs)
-    --addJobBuildInfo(allJobs)
-    addJobGitRepo(allJobs)
-    addJobTitleTypeAndProduct(allJobs)
-    exportToClojure("books.clj", allJobs)
+    local normalJobs = selectNormalJobs(allJobs)
+    local specialJobs = processSpecialJobs(allJobs)
+
+    local disabledJobs = readDisabledJobs()
+    local knownBooks = readKnownBooks()
+
+    --printDisabledJobs(disabledJobs)
+    printKnownBooks(knownBooks)
+
+    -- we need to filter out all disabled books
+    normalJobs = filterOutDisabledJobs(normalJobs, disabledJobs)
+    --printJobs("all", normalJobs)
+
+    addJobDirectories(normalJobs)
+    --addJobBuildCount(normalJobs)
+    --addJobBuildInfo(normalJobs)
+    addJobGitRepo(normalJobs)
+    addJobTitleTypeAndProduct(normalJobs)
     addArtifactInfo(normalJobs)
+
+    addInfoFromKnownBooks(normalJobs, knownBooks)
+    addInfoFromKnownBooks(specialJobs, knownBooks)
+
+    --printJobs("all", allJobs)
+    --printJobs("normal", normalJobs)
+    --printJobs("special", specialJobs)
+
+    local joinedJobTables = {}
+    concatTables(joinedJobTables, normalJobs)
+    concatTables(joinedJobTables, specialJobs)
+    exportToClojure("books_.clj", joinedJobTables)
 end
 
 



More information about the docs-commits mailing list