File tree Expand file tree Collapse file tree 4 files changed +30
-17
lines changed
Expand file tree Collapse file tree 4 files changed +30
-17
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ wget -P $LIB_DIR ${base_url}/openfasttrace/releases/download/$OFT_CORE_VERSION/o
1313wget -P $LIB_DIR ${base_url}/openfasttrace-asciidoc-plugin/releases/download/$OFT_ASCIIDOC_PLUGIN_VERSION/openfasttrace-asciidoc-plugin-$OFT_ASCIIDOC_PLUGIN_VERSION-with-dependencies.jar
1414EOF
1515
16- COPY run-oft.sh /opt/oft/run-oft.sh
16+ COPY run-oft.sh /opt/oft/run-oft.sh
1717
1818ENTRYPOINT [ "/opt/oft/run-oft.sh" ]
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ inputs:
2020 description : The format of the report that OpenFastTrace should produce.
2121 default : " plain"
2222 required : false
23+ tags :
24+ description : |
25+ A comma separated list of tags to use for filtering specification items.
26+ required : false
2327 fail-on-error :
2428 description : |
2529 By default, the action will never fail but indicate the result of running the trace command in the "oft-exit-code" output variable.
@@ -35,8 +39,3 @@ outputs:
3539runs :
3640 using : " docker"
3741 image : " Dockerfile"
38- args :
39- - ${{ inputs.fail-on-error }}
40- - ${{ inputs.report-filename }}
41- - ${{ inputs.report-format }}
42- - ${{ inputs.file-patterns }}
Original file line number Diff line number Diff line change @@ -33,3 +33,13 @@ Covers:
3333- feat~ standard-github-action~ 1
3434
3535Needs: impl
36+
37+ ### Filter specification items based on tags
38+ ` req~filter-specitems-using-tags~1 `
39+
40+ The OFT Action supports filtering relevant specification items using OFT Tags.
41+
42+ Covers:
43+ - feat~ standard-github-action~ 1
44+
45+ Needs: impl
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
3- # [impl->req~run-oft-trace-command~1]
4- fail_on_error=$1
5- report_file_name=$2
6- report_format=$3
7- files=$4
3+ fail_on_error=${INPUT_FAIL-ON-ERROR:- " false" }
4+ report_file_name=${INPUT_REPORT-FILE-NAME:- " trace-report.txt" }
5+ report_format=${INPUT_REPORT-FORMAT:- " plain" }
6+ tags=${INPUT_TAGS:- " " }
7+ file_patterns=${INPUT_FILE-PATTERNS:- " ." }
8+
9+ options=(-o " $report_format " -f " $report_file_name " )
10+ # [impl->req~filter-specitems-using-tags~1]
11+ if [[ -n " $tags " ]]; then
12+ options=(" ${options[@]} " -t " $tags " )
13+ fi
814
915echo " ::notice::using OpenFastTrace JARs from: ${LIB_DIR} "
16+ echo " ::notice::running OpenFastTrace for file patterns: $file_patterns "
1017
11- # Run OpenFastTrace
18+ # [impl->req~run-oft-trace-command~1]
1219# shellcheck disable=SC2086
1320# we need to provide the file patterns unquoted in order for the shell to expand any glob patterns like "*.md"
14- if (java -cp " ${LIB_DIR} /*" \
15- org.itsallcode.openfasttrace.core.cli.CliStarter trace -o " ${report_format} " \
16- -f " ${report_file_name} " \
17- ${files} )
21+ if (java -cp " ${LIB_DIR} /*" org.itsallcode.openfasttrace.core.cli.CliStarter trace " ${options[@]} " $file_patterns )
1822then
1923 echo " oft-exit-code=0" >> " ${GITHUB_OUTPUT} "
2024 echo " All specification items are covered." >> " ${GITHUB_STEP_SUMMARY} "
You can’t perform that action at this time.
0 commit comments