diff options
author | Sravan Kumar Lakkimsetti | 2018-12-20 15:24:22 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2018-12-20 15:24:22 +0000 |
commit | a9714e3fe53b4d5998d810e317547ac46b64ed5f (patch) | |
tree | 9d90cbbe10e685c0421a9ebacee92a3afd51c7ea | |
parent | b6da9a0f6996feb6e2a42a758b23f5aa7e46ca93 (diff) | |
download | eclipse.platform.releng.aggregator-a9714e3fe53b4d5998d810e317547ac46b64ed5f.tar.gz eclipse.platform.releng.aggregator-a9714e3fe53b4d5998d810e317547ac46b64ed5f.tar.xz eclipse.platform.releng.aggregator-a9714e3fe53b4d5998d810e317547ac46b64ed5f.zip |
Bug 541598 - Generate gitLog as html report
Change-Id: I416365c050573f9d004816ad3f83708934faa213
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
4 files changed, 114 insertions, 4 deletions
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/DL.thin.header.php.html b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/DL.thin.header.php.html index 37a2e50d2..5b780a982 100644 --- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/DL.thin.header.php.html +++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/DL.thin.header.php.html @@ -52,6 +52,10 @@ include_once("utilityFunctions.php"); rel="stylesheet" type="text/css" href="resultsSection.css" /> +<link + rel="stylesheet" + type="text/css" + href="gitLogSection.css" /> <script type="text/javascript" diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLog.php b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLog.php index b2678ca2f..f804c42f8 100644 --- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLog.php +++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLog.php @@ -39,7 +39,7 @@ require("DL.thin.header.php.html"); echo "<h1>Git Log for <a href=\"../".$BUILD_DIR_SEG."\">".$BUILD_ID; echo "</a></h1>".PHP_EOL; -echo "<div class=\"resultsSection\">"; +echo "<div class=\"gitLogSection\">"; if (file_exists("gitLog.html")) { $log_file = file_get_contents("gitLog.html"); echo "$log_file"; diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLogSection.css b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLogSection.css new file mode 100644 index 000000000..7c5cf7a08 --- /dev/null +++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/gitLogSection.css @@ -0,0 +1,106 @@ +div.gitLogSection { + clear: both; + width: 100%; +} + +div.gitLogSection P { + text-indent: 30pt; + margin: inherit; +} + +div.gitLogSection table { + border-collapse: collapse; + background-color: #d9d9d9; + margin-top: 20px; + margin-bottom: 20px; + margin-right: 10%; + margin-left: 10%; + border: 1px solid black; +} + +div.gitLogSection table tr { + border-bottom: 1px solid black; + background-color: #ffffff; + color: black; +} + +div.gitLogSection th { + background-color: #9999CC; +} + +div.gitLogSection h2, div.gitLogSection h3 { + margin-left: 5%; + margin-right: 5%; +} + +div.gitLogSection table tr:nth-child(even) { + background-color: #ededed +} +/* hover must come after "stripped" to have desired effect. */ +div.gitLogSection table tr:hover { + background-color: #a3a3e5; +} + +div.gitLogSection table th, div.gitLogSection table td { + padding: 1px 5px; +} + +div.gitLogSection table th.cell { + text-align: left; + color: black; +} + +div.gitLogSection table td.cell { + text-align: left; + width: 15em; + color: black; +} + +div.gitLogSection table th.datecell { + text-align: left; + color: black; +} + +div.gitLogSection table td.datecell { + text-align: left; + width: 30em; + color: black; + white-space: nowrap; +} + +div.gitLogSection table th.authorcell { + text-align: left; + color: black; + + +div.gitLogSection table td.authorcell { + text-align: left; + width: 20em; + color: black; + white-space: nowrap; +} + +div.gitLogSection table th.commitcell { + text-align: left; + color: black; +} + +div.gitLogSection table td.commitcell { + text-align: left; + width: 80em; + color: black; + white-space: nowrap; +} + +div.gitLogSection table td.errorcell { + text-align: left; + width: 15em; + color: red; +} + +div.gitLogSection table td.namecell { + text-align: left; + width: 30em; + color: black; + white-space: nowrap; +}
\ No newline at end of file diff --git a/production/build-functions.shsource b/production/build-functions.shsource index bf03c22d8..33e7995a1 100755 --- a/production/build-functions.shsource +++ b/production/build-functions.shsource @@ -558,18 +558,18 @@ fn-tag-build-inputs () TMP_GIT_LOG=${TMP_DIR}/gitlog.txt echo -e "<h2>Git log from ${lastTag} (previous) to ${BUILD_ID} (current)</h2>" > ${GITLOG_FILE} echo -e "<h2>The tagging, and this report, were done at about $REPORTTIMESTAMP</h2>" >> ${GITLOG_FILE} - git log ${lastTag}..${BUILD_ID} --format=format:"<tr><td class=\"cell\">%cd</td><td class=\"cell\"><a href=\"https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=%H\">%s</a></td><td class=\"cell\">%aN</td></tr>">> ${TMP_GIT_LOG} + git log ${lastTag}..${BUILD_ID} --format=format:"<tr><td class=\"datecell\">%cd</td><td class=\"commitcell\"><a href=\"https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=%H\">%s</a></td><td class=\"authorcell\">%aN</td></tr>">> ${TMP_GIT_LOG} FILESIZE1=$(stat -c%s ${TMP_GIT_LOG}) if [ $FILESIZE1 -eq 0 ] then echo "<h3>No code changes from last build</h3>" else echo "<table width=\"80%\"><tbody> <tr><th class=\"cell\" colspan=\"3\">Repository: eclipse.platform.releng.aggregator</th></tr>" >> ${GITLOG_FILE} - echo "<tr> <th class=\"cell\">Date</th> <th class=\"cell\">Summary</th> <th class=\"cell\">Author</th> </tr>" >> ${GITLOG_FILE} + echo "<tr> <th class=\"datecell\">Date</th> <th class=\"commitcell\">Commit message</th> <th class=\"authorcell\">Author</th> </tr>" >> ${GITLOG_FILE} cat ${TMP_GIT_LOG} >> ${GITLOG_FILE} echo "</tbody></table><br><br>">> ${GITLOG_FILE} echo >> ${GITLOG_FILE} - git submodule --quiet foreach "comp=\$(echo \$path|cut -d. -f2);git log ${lastTag}..${BUILD_ID} --format=format:\"<tr><td class=\\\"cell\\\">%cd</td><td class=\\\"cell\\\"><a href=\\\"https://git.eclipse.org/c/\$comp/\$path.git/commit/?id=%H\\\">%s</a></td><td class=\\\"cell\\\">%aN</td></tr>\">${TMP_GIT_LOG};FILESIZE=\$(stat -c%s ${TMP_GIT_LOG});if [ \$FILESIZE -ne 0 ]; then echo \"<table width=\\\"80%\\\"><tbody> <tr><th class=\\\"cell\\\" colspan=\\\"3\\\">Repository: \$path</th></tr>\";echo \"<tr> <th class=\\\"cell\\\">Date</th> <th class=\\\"cell\\\">Summary</th> <th class=\\\"cell\\\">Author</th> </tr>\";cat ${TMP_GIT_LOG};echo \"</tbody></table><br><br>\";echo;fi" >> ${GITLOG_FILE} + git submodule --quiet foreach "comp=\$(echo \$path|cut -d. -f2);git log ${lastTag}..${BUILD_ID} --format=format:\"<tr><td class=\\\"datecell\\\">%cd</td><td class=\\\"commitcell\\\"><a href=\\\"https://git.eclipse.org/c/\$comp/\$path.git/commit/?id=%H\\\">%s</a></td><td class=\\\"authorcell\\\">%aN</td></tr>\">${TMP_GIT_LOG};FILESIZE=\$(stat -c%s ${TMP_GIT_LOG});if [ \$FILESIZE -ne 0 ]; then echo \"<table width=\\\"80%\\\"><tbody> <tr><th class=\\\"cell\\\" colspan=\\\"3\\\">Repository: \$path</th></tr>\";echo \"<tr> <th class=\\\"datecell\\\">Date</th> <th class=\\\"commitcell\\\">Commit message</th> <th class=\\\"authorcell\\\">Author</th> </tr>\";cat ${TMP_GIT_LOG};echo \"</tbody></table><br><br>\";echo;fi" >> ${GITLOG_FILE} fi else echo -e "\n\tGit log not generated because a reasonable previous tag could not be found." > ${GITLOG_FILE} |