visualizations: Add visualization jobs
This change adds a Source Lines of Code (SLoC) visualization job and a
test category visualization job.
The SLoC visualization job generates a stacked histogram representing
the lines of code in each programming language for a given list of
directories. This job takes an input parameter `DIRECTORIES` which
should consist of a list of space-separated directories to be included
in the visualization, where statistics are generated for each top-level
subdirectory. An example output from this job is shown [here][1].
The test category visualization job generates a stacked histogram
representing the number of test configurations enabled at each CI level.
This job takes an input parameter `FILTER` which represents a string
that must be included in the job or group name for the job to be
included in the visualization. An example output from this job is shown
[here][2].
[1]: https://ci-builds.staging.trustedfirmware.org/static-files/58yOtzp9JwWBVtvHrSGl_yEmefYiT6B3eRN-uO_56mExNjYxNDM1OTMxOTU3OjU6Q0pLYXk6am9iL2Nqa2F5LXRmLWEtc2xvYy12aXN1YWxpemF0aW9uLzIzL2FydGlmYWN0/output.png
[2]: https://ci-builds.staging.trustedfirmware.org/static-files/egmlKGYCpXtG-7Q-dXFrviEt_xqwMx83bM679VJURIIxNjYxNDM1OTYxMTc4OjU6Q0pLYXk6am9iL2Nqa2F5LXRmLWEtdGVzdC1jYXRlZ29yeS12aXN1YWxpemF0aW9uL2xhc3RTdWNjZXNzZnVsQnVpbGQvYXJ0aWZhY3Q=/output.png
Change-Id: I81849b77e18bb42109ac3bca2fc60f4482fb2fea
Signed-off-by: Chris Kay <chris.kay@arm.com>
Co-authored-by: Weronika Wiesiolek <weronika.wiesiolek@arm.com>
diff --git a/tf-a-sloc-visualization.yaml b/tf-a-sloc-visualization.yaml
new file mode 100644
index 0000000..d387572
--- /dev/null
+++ b/tf-a-sloc-visualization.yaml
@@ -0,0 +1,38 @@
+- job:
+ name: tf-a-sloc-visualization
+ description: >-
+ Generates a visualization of programming languages used by the code-base.
+ node: docker-amd64-tf-a-jammy
+ concurrent: true
+ properties:
+ - authorization: !include: authorization.yaml.inc
+ - build-discarder:
+ days-to-keep: 30
+ parameters:
+ - string:
+ name: CI_REFSPEC
+ default: +refs/heads/master:refs/remotes/origin/master
+ - string:
+ name: TF_GERRIT_PROJECT
+ default: TF-A/trusted-firmware-a
+ - string:
+ name: TF_GERRIT_BRANCH
+ default: refs/heads/master
+ - string:
+ name: TF_GERRIT_REFSPEC
+ default: +refs/heads/master:refs/remotes/origin/master
+ - string:
+ name: DIRECTORIES
+ default: . ./drivers ./plat ./tools
+ description: List of directories to analyze.
+ builders:
+ - shell: !include-raw: scripts/clone.sh
+ - shell: |
+ mkdir -p output
+
+ cd trusted-firmware-a &&
+ bash ../tf-a-ci-scripts/script/graphs/sloc-viz.bash ${DIRECTORIES} \
+ > ../output.png 2> ../output.tsv
+ publishers:
+ - archive:
+ artifacts: output.*