Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OSCAL Profile Schematron Relative Paths for GHA #1604

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/ci-cd/validate-content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if [ -z "${SCRATCH_DIR+x}" ]; then
fi
fi

profile_schematron="oscal/src/utils/schematron/oscal-profile.sch"
profile_schematron="${OSCAL_DIR}/src/utils/schematron/oscal-profile.sch"
compiled_profile_schematron="${SCRATCH_DIR}/oscal-profile.xsl"
build_schematron "${profile_schematron}" "${compiled_profile_schematron}"

Expand Down Expand Up @@ -154,7 +154,7 @@ while IFS="|" read path format model converttoformats || [ -n "$path" ]; do
echo -e "${P_INFO}Validating profile with Schematron for project's requirements and recommendations.${P_INFO}${P_END}"
target_file=$(basename -- "${file_relative}")
svrl_result="/tmp/${target_file}.svrl"
result=$(validate_with_schematron "${SCRATCH_DIR}/oscal-profile.xsl" "${file_relative}" "$svrl_result" 2>&1)
result=$(validate_with_schematron "${SCRATCH_DIR}/oscal-profile.xsl" "${file}" "$svrl_result" 2>&1)
cmd_exitcode=$?
if [ $cmd_exitcode -ne 0 ]; then
echo -e "${P_ERROR}Profile validation execution for '${P_END}${file_relative}${P_ERROR}' with Schematron '${P_END}${profile_schematron}${P_ERROR}' did not complete.${P_END}"
Expand Down