Merge commit '1a015978c4bd5b52339eb00ecbe33645d7869ce4'

This commit is contained in:
Dan Hawkins 2020-11-08 21:40:45 +00:00
commit 24023d8c58
3 changed files with 33 additions and 22 deletions

View file

@ -17,6 +17,7 @@ class DebRootDefinition {
String GIS_OPT_SCRIPTS_CONTROL
String GIS_OPT_WWW
String GIS_OPT_OTHER
String GIS_OPT_KERNEL
String GIS_OPT_LOGIC
String GIS_OPT_PRINTHEAD
@ -45,6 +46,7 @@ class DebRootDefinition {
GIS_OPT_SCRIPTS_CONTROL = "${DEBPATH}/opt/gis/scripts/control"
GIS_OPT_WWW = "${DEBPATH}/opt/gis/www"
GIS_OPT_OTHER = "${DEBPATH}/opt/gis/other"
GIS_OPT_KERNEL = "${DEBPATH}/opt/gis/kernel"
GIS_OPT_LOGIC = "${DEBPATH}/opt/gis/logic"
GIS_OPT_PRINTHEAD = "${DEBPATH}/opt/gis/printhead"

View file

@ -1,3 +1,5 @@
gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy")
markunstable = false
unstablereason = ""
@ -373,7 +375,8 @@ def gitrelease(buildmeta, previousreleasemeta, String releaserepo, String source
def releasecomponent(toplevelbuildmeta, buildinfo, String otherreleasetags, String dryrunpush) {
def buildmeta = buildinfo.meta
def String uniquefolder = "${buildmeta.productinfo.productname}_${buildmeta.productinfo.subcomponentname}"
def uriconverted = gh.uniquereporootname(buildmeta.gitinfo.remoteurl)
def String uniquefolder = "${buildmeta.productinfo.productname}_${buildmeta.productinfo.subcomponentname}_${uriconverted}"
def String uniquefolderforrepo = "${releaserepofolder}/${uniquefolder}"
def String uniquefoldertemp = "${tempfolder}/${uniquefolder}"
def String uniquefolderforsourcerepo = "${sourcerepofolder}/${uniquefolder}"

View file

@ -1,5 +1,5 @@
pipeline {
agent { label "${AGENT_LABEL}" }
agent { label AGENT_LABEL }
stages {
stage('Initial setup') {
steps {
@ -53,7 +53,10 @@ pipeline {
SOURCEDIR = "${WORKSPACE}/source"
configurationhelper.gitCheckoutAndRegister(meta, 'source', SOURCEURL, SOURCEREVISION, SOURCEDIR, '', 0, false)
SOURCE_PATH = "${SOURCEDIR}"
env.SRC = "${SOURCE_PATH}/${SOURCE_OFFSET_PATH}"
SRC = "${SOURCE_PATH}"
if (SOURCE_OFFSET_PATH) {
SRC += "/${SOURCE_OFFSET_PATH}"
}
}
}
}
@ -81,26 +84,29 @@ pipeline {
steps {
script {
def PPDFOLDER = "${STATICANALYSIS}/ppd"
excludeoptions = ''
if (EXCLUDED_PATH_LIST) {
excludeoptions = """--exclude "${EXCLUDED_PATH_LIST}" """
}
dir(SRC) {
if (isUnix()) {
sh """#!/bin/bash
set -e
mkdir -pv "${PPDFOLDER}"
export PMD_JAVA_OPTS=-Xmx65536m
"${PPD}/run.sh" cpd --minimum-tokens 100 --files . ${excludeoptions} --language cpp --format xml --failOnViolation false > "${PPDFOLDER}/cpd.xml"
"""
} else {
bat """
mkdir "${PPDFOLDER}"
set PMD_JAVA_OPTS=-Xmx2048m
"${PPD}/cpd.bat" --minimum-tokens 100 --files . ${excludeoptions} --language cpp --format xml --failOnViolation false > "${PPDFOLDER}/cpd.xml"
"""
def EXCLUDE_PARAM = ''
if (EXCLUDE_PATHS) {
EXCLUDE_PARAM = '--exclude "'
def exclude_path_list = EXCLUDE_PATHS.split(',')
for (exclude_path in exclude_path_list) {
EXCLUDE_PARAM += "${SRC}/${exclude_path.trim()},"
}
EXCLUDE_PARAM += '"'
}
if (isUnix()) {
sh """#!/bin/bash
set -ev
mkdir -p "${PPDFOLDER}"
export PMD_JAVA_OPTS=-Xmx65536m
"${PPD}/run.sh" cpd --minimum-tokens 100 --files "${SRC}" --language cpp --format xml ${EXCLUDE_PARAM} --failOnViolation false > "${PPDFOLDER}/cpd.xml"
"""
} else {
bat """
mkdir -p "${PPDFOLDER}"
set PMD_JAVA_OPTS=-Xmx2048m
"${PPD}/cpd.bat" --minimum-tokens 100 --files "${SRC}" --language cpp --format xml ${EXCLUDE_PARAM} --failOnViolation false > "${PPDFOLDER}/cpd.xml"
"""
}
recordIssues(tools: [
cpd(pattern: "**/cpd.xml", reportEncoding: 'UTF-8'),