Skip to content

Commit

Permalink
Added explicit step for CodeAnalysisReport
Browse files Browse the repository at this point in the history
Explicit step for report, final touches before official release to non-experimental repo.
  • Loading branch information
thabok committed Oct 30, 2018
1 parent da1150c commit 076cb05
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Expand Up @@ -10,14 +10,13 @@

<groupId>com.btc.ep</groupId>
<artifactId>btc-embeddedplatform</artifactId>
<version>1.9.6-beta-SNAPSHOT</version>
<version>1.9.7-beta-SNAPSHOT</version>
<packaging>hpi</packaging>

<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>http://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>btc-embeddedplatform-1.9.0-beta</tag>
</scm>

<name>BTC DSL for Pipeline</name>
Expand Down
15 changes: 15 additions & 0 deletions src/main/resources/dsl/btc.groovy
Expand Up @@ -105,6 +105,16 @@ def profileCreateC(body) {
return profileInit(body, 'profileCreateC')
}

def codeAnalysisReport(body) {
// evaluate the body block, and collect configuration into the object
def config = resolveConfig(body)
def reqString = createReqString(config)
// call EP to invoke test execution
def r = httpRequest quiet: true, httpMode: 'POST', requestBody: reqString, url: "http://localhost:${restPort}/codeAnalysisReport", validResponseCodes: '100:500'
echo "(${r.status}) ${r.content}"
return r.status;
}

def rbtExecution(body) {
// evaluate the body block, and collect configuration into the object
def config = resolveConfig(body)
Expand Down Expand Up @@ -533,6 +543,8 @@ def createReqString(config) {
reqString += '"robustnessTestFailure": "' + "${config.robustnessTestFailure}" + '", '
if (config.inputRestrictions != null)
reqString += '"inputRestrictions": "' + toAbsPath("${config.inputRestrictions}") + '", '
if (config.createReport != null)
reqString += '"createReport": "' + "${config.createReport}" + '", '

// Formal Verification
if (config.searchDepth != null)
Expand Down Expand Up @@ -577,6 +589,9 @@ def createReqString(config) {
reqString += '"dir": "' + toAbsPath("${config.dir}") + '", '
if (config.executionConfig != null)
reqString += '"executionConfig": "' + "${config.executionConfig}" + '", '
// CodeAnalysisReport
if (config.includeSourceCode != null)
reqString += '"includeSourceCode": "' + "${config.includeSourceCode}" + '", '

reqString = reqString.trim()
if (reqString.endsWith(','))
Expand Down

0 comments on commit 076cb05

Please sign in to comment.