Commit c85d2e97 authored by Ben Cooksley's avatar Ben Cooksley

Use the diverted install prefix when running appstream compliance checks.

Fixes T6247
parent b151f6ae
......@@ -11,6 +11,7 @@ parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
parser.add_argument('--usingInstall', type=str, required=True)
parser.add_argument('--withDiverted', type=str, required=True)
arguments = parser.parse_args()
# Load our build specification, which governs how we handle this build
......@@ -25,9 +26,20 @@ if sys.platform != "linux" or not buildSpecification['do-appstream-check']:
# Bail!
# Before we can process it, we need to determine which prefix to check
installRoot = arguments.installTo
if arguments.withDiverted != None:
installRoot = os.path.join( arguments.withDiverted, CommonUtils.makePathRelative(arguments.installTo) )
# Make sure we have Appstream metadata to process
appstreamDirectory = os.path.join( installRoot, 'share', 'metainfo' )
if not os.path.exists( appstreamDirectory ):
# Bail!
# Determine the command we need to run
commandToRun = "appstreamcli validate --pedantic {0}/share/metainfo/*"
commandToRun = commandToRun.format( arguments.usingInstall )
commandToRun = "appstreamcli validate --pedantic {0}/*"
commandToRun = commandToRun.format( appstreamDirectory )
# Now run it!
......@@ -115,7 +115,7 @@ timestamps {
stage('Checking Code Quality') {
// Perform Appstream Compliance Checks
sh "python3 -u ci-tooling/helpers/ --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/'"
sh "python3 -u ci-tooling/helpers/ --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/' --withDiverted '$WORKSPACE/install-divert/'"
// cppcheck is not supported by Pipeline at the moment, so we don't run that for now
// See
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment