File tree Expand file tree Collapse file tree 5 files changed +40
-19
lines changed
Expand file tree Collapse file tree 5 files changed +40
-19
lines changed Original file line number Diff line number Diff line change 2323 with :
2424 report-filename : ${{ env.REPORT_FILENAME }}
2525 report-format : " html"
26- file-patterns : " . "
26+ file-patterns : ${{ github.workspace }}
2727
2828 - name : Upload tracing report
2929 id : upload-report
Original file line number Diff line number Diff line change 11# [impl->req~run-oft-trace-command~1]
22FROM eclipse-temurin:22-jre-alpine
3+ # alpine comes with sh only, by default
4+ RUN apk add --no-cache bash
35
46ARG OFT_CORE_VERSION=4.1.0
57ARG OFT_ASCIIDOC_PLUGIN_VERSION=0.2.0
@@ -13,6 +15,6 @@ wget -P $LIB_DIR ${base_url}/openfasttrace/releases/download/$OFT_CORE_VERSION/o
1315wget -P $LIB_DIR ${base_url}/openfasttrace-asciidoc-plugin/releases/download/$OFT_ASCIIDOC_PLUGIN_VERSION/openfasttrace-asciidoc-plugin-$OFT_ASCIIDOC_PLUGIN_VERSION-with-dependencies.jar
1416EOF
1517
16- COPY run-oft.sh /opt/oft/run-oft.sh
18+ COPY run-oft.sh /opt/oft/run-oft.sh
1719
1820ENTRYPOINT [ "/opt/oft/run-oft.sh" ]
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ description: |
88inputs :
99 file-patterns :
1010 description : |
11- A whitespace separated list of (Bash standard) glob patterns which specify the files and directories to include in the OFT trace run.
11+ A whitespace separated list of (standard Bash ) glob patterns which specify the files and directories to include in the OFT trace run.
1212 If not specified, the local workspace directory is used.
1313 default : " ."
1414 required : false
@@ -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,9 @@ 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 }}
42+ env :
43+ OFT_FILE_PATTERNS : ${{ inputs.file-patterns }}
44+ OFT_REPORT_FORMAT : ${{ inputs.report-format }}
45+ OFT_REPORT_FILENAME : ${{ inputs.report-filename }}
46+ OFT_TAGS : ${{ inputs.tags }}
47+ OFT_FAIL_ON_ERROR : ${{ inputs.fail-on-error }}
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=${OFT_FAIL_ON_ERROR:- " false" }
4+ report_file_name=${OFT_REPORT_FILENAME:- " trace-report.txt" }
5+ report_format=${OFT_REPORT_FORMAT:- " plain" }
6+ tags=${OFT_TAGS:- " " }
7+ file_patterns=${OFT_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