diff --git a/pipeline-templates/SUSEQt5.7.template b/pipeline-templates/SUSEQt5.7.template --- a/pipeline-templates/SUSEQt5.7.template +++ b/pipeline-templates/SUSEQt5.7.template @@ -117,6 +117,22 @@ // Perform Appstream Compliance Checks sh "python3 -u ci-tooling/helpers/check-appstream-compliance.py --product ${productName} --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --usingInstall '$HOME/install-prefix/' --withDiverted '$WORKSPACE/install-divert/'" + // Platform Enablement Checks + // Frameworks have a metadata file which specifies the platforms it supports and should be built on + // This check compares that metadata file against the records held by the CI system + sh "if [[ -e metainfo.yaml ]]; then python3 ci-tooling/helpers/check-platform.py $WORKSPACE/metainfo.yaml &> PlatformCheckOutput.txt; fi" + + // If the platform check indicates there are missing platforms then we should flag the build as unstable + // We start this process by reading the output of the check command + def platformCheckResult = readFile "${env.WORKSPACE}/PlatformCheckOutput.txt" + // Then we check to see if it had anything in it - it will be empty if everything is okay + if( platformCheckResult != '' ) { + // If it does, then mark the build as unstable + currentBuild.result = 'UNSTABLE' + // We also print the check results so it can be examined easily + echo platformCheckResult + } + // cppcheck is not supported by Pipeline at the moment, so we don't run that for now // See https://issues.jenkins-ci.org/browse/JENKINS-35096