diff --git a/source/app/templates/build-cy-yml-html.sh b/source/app/templates/build-cy-yml-html.sh index 119ff56..094316a 100755 --- a/source/app/templates/build-cy-yml-html.sh +++ b/source/app/templates/build-cy-yml-html.sh @@ -2,4 +2,4 @@ set -Eeu ./source/app/templates/annotate.py ci-yml.py -#./source/app/templates/annotate.py template-yml.py +./source/app/templates/annotate.py template-yml.py diff --git a/source/app/templates/ci-yml.py b/source/app/templates/ci-yml.py index d08a4b2..6d9535b 100644 --- a/source/app/templates/ci-yml.py +++ b/source/app/templates/ci-yml.py @@ -1,5 +1,9 @@ data = { + "src_filename": "main.yml", + "dst_filename": "ci-yml.html", + "css_title": "Github Actions workflow", + "css_class": "ci-yml", "lines": { (39, 1): "trail", (70, 3): "dashboard_pull-request", @@ -9,8 +13,4 @@ (179, 4): "dashboard_branch-coverage", (214, 3): "dashboard_snyk", }, - "css_title": "Github Actions workflow", - "css_class": "ci-yml", - "src_filename": "main.yml", - "dst_filename": "ci-yml.html" } diff --git a/source/app/templates/template-yml.html b/source/app/templates/template-yml.html index 7c3458c..65cff79 100644 --- a/source/app/templates/template-yml.html +++ b/source/app/templates/template-yml.html @@ -1,21 +1,19 @@ -
.kosli.yml
- -
- 1 version: 1 - 2 - 3 trail: - 4 artifacts: - 5 --name: dashboard - 6 attestations: - 7 --name: lint - 8 type: generic - 9 --name: pull-request - 10 type: pull_request - 11 --name: unit-test - 12 type: junit - 13 --name: branch-coverage - 14 type: generic - 15 --name: snyk - 16 type: snyk - 17 +
.kosli.yml
+
+ {% raw %} 1 version: 1 {% endraw %} + {% raw %} 2 {% endraw %} + {% raw %} 3 trail: {% endraw %} + {% raw %} 4 artifacts: {% endraw %} + {% raw %} 5 - name: dashboard {% endraw %} + {% raw %} 6 attestations: {% endraw %} + {% raw %} 7 - name: pull-request {% endraw %} + {% raw %} 8 type: pull_request {% endraw %} + {% raw %} 9 - name: lint {% endraw %} + {% raw %} 10 type: generic {% endraw %} + {% raw %} 11 - name: unit-test {% endraw %} + {% raw %} 12 type: junit {% endraw %} + {% raw %} 13 - name: branch-coverage {% endraw %} + {% raw %} 14 type: generic {% endraw %} + {% raw %} 15 - name: snyk-scan {% endraw %} + {% raw %} 16 type: snyk {% endraw %}
diff --git a/source/app/templates/template-yml.py b/source/app/templates/template-yml.py new file mode 100644 index 0000000..65f2426 --- /dev/null +++ b/source/app/templates/template-yml.py @@ -0,0 +1,16 @@ + +data = { + "src_filename": "template.yml", + "dst_filename": "template-yml.html", + "css_title": ".kosli.yml", + "css_class": "template-yml", + "lines": { + (3, 1): "trail", + (7, 2): "dashboard_pull-request", + (9, 2): "dashboard_lint", + (5, 1): "dashboard", + (11, 2): "dashboard_unit-test", + (13, 2): "dashboard_branch-coverage", + (15, 2): "dashboard_snyk", + }, +} diff --git a/source/app/templates/template.yml b/source/app/templates/template.yml new file mode 100644 index 0000000..186912c --- /dev/null +++ b/source/app/templates/template.yml @@ -0,0 +1,16 @@ +version: 1 + +trail: + artifacts: + - name: dashboard + attestations: + - name: pull-request + type: pull_request + - name: lint + type: generic + - name: unit-test + type: junit + - name: branch-coverage + type: generic + - name: snyk-scan + type: snyk diff --git a/source/app/templates/todos.txt b/source/app/templates/todos.txt index 47c2ff0..f80e385 100644 --- a/source/app/templates/todos.txt +++ b/source/app/templates/todos.txt @@ -1,14 +1,4 @@ Maybe highlight line numbers that have special hover behaviour? -# annotate.py - -make data come in as a parameter somehow. dynamic import? - -make hard-coded HTML in a parameter - print("
Github Actions workflow
") - print("
") - -generate template-yml.html - write some commentary! \ No newline at end of file