Resurrect ccm

This commit is contained in:
Dan Hawkins 2021-11-13 15:48:55 +00:00
commit 0ac129bc90

View file

@ -13,12 +13,6 @@ pipeline {
script {
configurationhelper = autobuilder.configurationhelper()
PYTHONURL = 'git@hydra:tools/python.git'
PYTHONBRANCH = 'origin/3.6.3_windows'
PYTHONDIR = "${WORKSPACE}/python"
configurationhelper.gitCheckoutAndRegister(meta, 'python', PYTHONURL, PYTHONBRANCH, PYTHONDIR)
env.PYTHON = "${PYTHONDIR}/ver/python.exe"
CCMURL = 'git@hydra:tools/ccm.git'
CCMBRANCH = 'origin/master'
CCMDIR = "${WORKSPACE}/ccm"
@ -41,9 +35,9 @@ pipeline {
stage("Clean exports") {
steps {
script {
STATICANALYSIS = 'staticanalysis'
RESULTS = 'results'
cleanfolders = [
STATICANALYSIS,
RESULTS,
]
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
cleaner.clean(cleanfolders)
@ -61,18 +55,19 @@ pipeline {
stage('Static analysis') {
steps {
script {
def CCMOLDER = "${STATICANALYSIS}/ccm"
dir(CCMOLDER) {
echo "Executing: ${CCM} ${SRC} /xml /nummetrics=100 > ccm.xml"
def ccmconfigurationfile = "${WORKSPACE}/ccm.xml"
writeFile(file: ccmconfigurationfile, text: CCM_CONFIGURATION)
echo "Configuration file: ${ccmconfigurationfile} contains:\n${CCM_CONFIGURATION}"
dir(RESULTS) {
echo "Executing: ${CCM} ${ccmconfigurationfile} > ccm.xml"
if (isUnix()) {
sh """#!/bin/bash
find "${SRC}" -type f ! -name "*.cpp" -a ! -name "*.h" -a ! -name "*.hpp" -a ! -name "*.c" -exec rm -r {} \\;
# Uses mono
"${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml
${CCM}" "${ccmconfigurationfile}" > ccm.xml
"""
} else {
bat """
"${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml
powershell """
"${CCM}" "${ccmconfigurationfile}" > ccm.xml
"""
}
}
@ -82,25 +77,6 @@ pipeline {
}
}
}
stage('Classifying publishable artifacts') {
steps {
script {
def publishable = [
]
publishutils = load("${autobuilder.commonscripts()}/publishing/utils.groovy")
publishutils.generatelist(meta, publishable)
}
}
}
stage('Archiving artifacts') {
steps {
script {
ArrayList<String> itemsForRelease = ["${STATICANALYSIS}/**"]
def artifactlist = meta.generateartifacts(itemsForRelease)
archiveArtifacts artifactlist
}
}
}
}
post {
always {