Skip to content

Commit

Permalink
Improved - JIRA config - decoupling & cleaning (docToolchain#452)
Browse files Browse the repository at this point in the history
* Extract hardcoded Jira results filename to variable

* Rename legacy variable as exportJiraIssue.gradle expect different var name

* Add proper Asciidoc table syntax with header row

* Add all Jira configs to the Config.groovy file (and template_config)

* Add suggestion to gradle.properties about Config.groovy

* Give Config.groovy Jira settings preference over gradle.property

* Improve credentials comments & suggestions

* Improve recommended comment in gradle.properties

* Fix variable name to match configuration

* Update exportJiraIssues task documentation

* Add note about broken password input

* Add myself to the contributors list

* Add missing closing of htmlSanityCheckConfig tag

* Rename Jira helpers for exportEAP

* Re-generate docs as described in PR template

Co-authored-by: Vladi <[email protected]>
  • Loading branch information
Vladi and ewoks authored Aug 6, 2020
1 parent 20269b6 commit 31e3b55
Show file tree
Hide file tree
Showing 14 changed files with 373 additions and 122 deletions.
40 changes: 40 additions & 0 deletions Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,43 @@ htmlSanityCheck.with {
//sourceDir = "build/html5/site"
//checkingResultsDir =
}
//end::htmlSanityCheckConfig[]

//tag::jiraConfig[]
// Configuration for Jira related tasks
jira = [:]

jira.with {

// endpoint of the JiraAPI (REST) to be used
api = 'https://your-jira-instance'

/*
username:password (username:token) of an account which has the right permissions to read the JIRA issues for a given project.
It is recommended to store these securely instead of commiting them to your git repository.
In that case, either fetch it from some external storage or leave it empty (credentials = '') to fallback to gradle variables set through gradle properties files or environment variables.
The fallback in gradle.properties uses the 'jiraUser' and 'jiraPassword' keys.
You might even want to prompt the user for the password (by not providing it anywhere)
*/

credentials = "[email protected]:accesstoken".bytes.encodeBase64().toString() // colon ":" is used as a separation of username from password/token before base64 encoding

// the key of the Jira project
project = 'PROJECTKEY'

// the format of the received date time values to parse
dateTimeFormatParse = "yyyy-MM-dd'T'H:m:s.SSSz" // i.e. 2020-07-24'T'9:12:40.999 CEST

// the format in which the date time should be saved to output
dateTimeFormatOutput = "dd.MM.yyyy HH:mm:ss z" // i.e. 24.07.2020 09:02:40 CEST

// the label to restrict search to
label =

// Jira query
jql = "project='%jiraProject%' AND labels='%jiraLabel%' ORDER BY priority DESC, duedate ASC"

// Filename in which Jira query results should be stored
resultsFilename = 'JiraTicketsContent.adoc'
}
//end::jiraConfig[]
70 changes: 35 additions & 35 deletions docs/htmlchecks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<div class="infoBox" id="checks">

<div class="counter">782</div>
<div class="counter">788</div>

checks</div>

Expand All @@ -81,7 +81,7 @@

<div class="infoBox" id="duration">

<div class="counter">70.098sec</div>
<div class="counter">113.192sec</div>

duration</div>

Expand All @@ -104,7 +104,7 @@ <h2>Results by Page </h2>
<tbody>
<tr>
<td class="failures"><a href="#manualXhtml">manual.html</a></td>
<td class="number">782</td>
<td class="number">788</td>
<td class="number">3</td>
<td class="number failures">99%</td>
</tr>
Expand All @@ -113,7 +113,7 @@ <h2>Results by Page </h2>
</table><hr>

<h1 id="manualXhtml">Results for manual.html </h1>
location : /workspace/docToolchain/build/docs/html5/manual.html <p>
location : /home/vbjelako/Downloads/docs-as-code/docToolchain-Ewoks-Fork/build/docs/html5/manual.html <p>

<table><tr><td><div class="summaryGroup">
<table>
Expand All @@ -123,7 +123,7 @@ <h1 id="manualXhtml">Results for manual.html </h1>

<div class="infoBox" id="size">

<div class="counter">416.76</div>
<div class="counter">429.36</div>

kByte</div>

Expand All @@ -133,7 +133,7 @@ <h1 id="manualXhtml">Results for manual.html </h1>

<div class="infoBox" id="checks">

<div class="counter">782</div>
<div class="counter">788</div>

checks</div>

Expand All @@ -157,62 +157,62 @@ <h1 id="manualXhtml">Results for manual.html </h1>
</td></tr></table>


<div class="failures"><h3>External Links Check</h3></div>


175 anchor href attribute checked,
2 broken external link found.<br>

<ul>
<li> Warning: https://id.atlassian.com/manage/api-tokens returned statuscode 302, new location: http://id.atlassian.com/manage-profile/security/api-tokens </li>
<li> Warning: http://plantuml.com/ returned statuscode 301, new location: https://plantuml.com </li>
</ul>

<div class="success"><h3>Missing Local Images Check</h3></div>
<div class="success"><h3>Missing alt-attribute declaration in image tags</h3></div>


21 img src attributes checked,
0 missing image files found.<br>
208 image tags checked,
0 missing alt attributes found.<br>

<div class="success"><h3>Consistency of ImageMaps</h3></div>


0 imageMap checked,
0 map/area and usemap-references found.<br>

<div class="success"><h3>Broken Internal Links Check</h3></div>
<div class="failures"><h3>Missing Local Resources Check</h3></div>


272 href checked,
0 missing id found.<br>
1 anchor tag href attribute checked,
1 missing local resources found.<br>

<div class="success"><h3>Missing alt-attribute declaration in image tags</h3></div>
<ul>
<li> local resource "attachement/myfolder/myfile.json" missing </li>
</ul>

<div class="success"><h3>Broken Internal Links Check</h3></div>

204 image tags checked,
0 missing alt attributes found.<br>

273 href checked,
0 missing id found.<br>

<div class="success"><h3>Duplicate Definition of id Check</h3></div>
<div class="success"><h3>Missing Local Images Check</h3></div>


109 id checked,
0 duplicate id found.<br>
21 img src attributes checked,
0 missing image files found.<br>

<div class="failures"><h3>Missing Local Resources Check</h3></div>
<div class="failures"><h3>External Links Check</h3></div>


1 anchor tag href attribute checked,
1 missing local resources found.<br>
176 anchor href attribute checked,
2 broken external link found.<br>

<ul>
<li> local resource "attachement/myfolder/myfile.json" missing </li>
<li> Warning: https://id.atlassian.com/manage/api-tokens returned statuscode 302, new location: http://id.atlassian.com/manage-profile/security/api-tokens </li>
<li> Warning: http://plantuml.com/ returned statuscode 301, new location: https://plantuml.com </li>
</ul>
<hr><p>

<div class="success"><h3>Duplicate Definition of id Check</h3></div>


109 id checked,
0 duplicate id found.<br>
<hr><p>
<!-- scroll-to-top icon -->
<div class="scroll-top-wrapper">
<img src="arrow-up.png" alt="to top"/>
</div>

<div id="footer">
Generated by <a href="https://www.aim42.org">htmlSanityCheck</a> (version 1.1.3) at 09. June 2020, 12:00
Generated by <a href="https://www.aim42.org">htmlSanityCheck</a> (version 1.1.3) at 03. August 2020, 11:06
</div></body></html>
Binary file modified docs/images/demoPlantUML.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/demoPlantUMLScale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/demoPlantUMLWidth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 31e3b55

Please sign in to comment.