Skip to content
Permalink
Browse files
Merge remote-tracking branch 'origin/master' into JENKINS-36472
Conflicts:
	src/main/java/de/tracetronic/jenkins/plugins/ecutest/ETPlugin.java
  • Loading branch information
cpoenisch committed Jan 6, 2017
2 parents 4348bf4 + 5e8f792 commit e249323e197605f1ab813f53c148e04ee320628a
Showing with 2,237 additions and 790 deletions.
  1. +69 −38 Jenkinsfile
  2. +41 −11 pom.xml
  3. +17 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/ETPlugin.java
  4. +2 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/AbstractReportAction.java
  5. +68 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/AbstractReportDescriptor.java
  6. +49 −24 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/AbstractReportPublisher.java
  7. +2 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/AbstractRequestHandler.java
  8. +41 −47 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXPublisher.java
  9. +12 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXReport.java
  10. +20 −9 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXReportGenerator.java
  11. +103 −36 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXReportUploader.java
  12. +20 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/atx/AbstractATXReportHandler.java
  13. +3 −1 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/generator/ReportGenerator.java
  14. +5 −56 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/generator/ReportGeneratorPublisher.java
  15. +5 −49 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/junit/JUnitPublisher.java
  16. +3 −1 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/junit/JUnitReportGenerator.java
  17. +6 −17 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/log/ETLogPublisher.java
  18. +37 −31 src/main/java/de/tracetronic/jenkins/plugins/ecutest/report/trf/TRFPublisher.java
  19. +10 −8 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/AbstractTestBuilder.java
  20. +2 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/AbstractTestDescriptor.java
  21. +2 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/TestFolderBuilder.java
  22. +2 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/TestPackageBuilder.java
  23. +2 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/TestProjectBuilder.java
  24. +3 −1 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/client/AbstractTestClient.java
  25. +7 −3 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/client/PackageClient.java
  26. +7 −3 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/client/ProjectClient.java
  27. +2 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/test/client/TestClient.java
  28. +7 −9 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/AbstractToolBuilder.java
  29. +10 −24 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/AbstractToolDescriptor.java
  30. +8 −14 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/StartETBuilder.java
  31. +7 −13 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/StartTSBuilder.java
  32. +2 −8 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/StopETBuilder.java
  33. +2 −8 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/StopTSBuilder.java
  34. +11 −5 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/client/ETClient.java
  35. +6 −4 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/client/TSClient.java
  36. +4 −4 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/client/ToolClient.java
  37. +3 −3 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/AbstractToolInstallation.java
  38. +128 −45 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETInstallation.java
  39. +138 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETToolProperty.java
  40. +21 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/util/ATXUtil.java
  41. +3 −4 src/main/java/de/tracetronic/jenkins/plugins/ecutest/util/PathUtil.java
  42. +25 −46 src/main/java/de/tracetronic/jenkins/plugins/ecutest/util/ProcessUtil.java
  43. +11 −2 src/main/java/de/tracetronic/jenkins/plugins/ecutest/util/validation/ATXValidator.java
  44. +41 −16 src/main/java/de/tracetronic/jenkins/plugins/ecutest/wrapper/com/ETComClient.java
  45. +3 −3 src/main/java/de/tracetronic/jenkins/plugins/ecutest/wrapper/com/ETComDispatch.java
  46. +109 −0 src/main/java/de/tracetronic/jenkins/plugins/ecutest/wrapper/com/ETComProgId.java
  47. +2 −2 src/main/resources/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXPublisher/config.jelly
  48. +4 −4 src/main/resources/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXPublisher/global.jelly
  49. +94 −0 src/main/resources/de/tracetronic/jenkins/plugins/ecutest/report/atx/installation/config.xml
  50. +2 −2 ...in/resources/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETInstallation/select.jelly
  51. +38 −0 ...in/resources/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETToolProperty/config.jelly
  52. +31 −0 ...sources/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETToolProperty/config.properties
  53. +32 −0 ...rces/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETToolProperty/config_de.properties
  54. +3 −0 src/main/resources/de/tracetronic/jenkins/plugins/ecutest/tool/installation/Messages.properties
  55. +3 −0 src/main/resources/de/tracetronic/jenkins/plugins/ecutest/tool/installation/Messages_de.properties
  56. +59 −0 src/test/java/de/tracetronic/jenkins/plugins/ecutest/SystemTestBase.java
  57. +50 −22 src/test/java/de/tracetronic/jenkins/plugins/ecutest/report/atx/ATXPublisherST.java
  58. +49 −20 ...test/java/de/tracetronic/jenkins/plugins/ecutest/report/generator/ReportGeneratorPublisherST.java
  59. +51 −24 src/test/java/de/tracetronic/jenkins/plugins/ecutest/report/junit/JUnitPublisherST.java
  60. +47 −12 src/test/java/de/tracetronic/jenkins/plugins/ecutest/report/log/ETLogPublisherST.java
  61. +44 −12 src/test/java/de/tracetronic/jenkins/plugins/ecutest/report/trf/TRFPublisherST.java
  62. +28 −8 src/test/java/de/tracetronic/jenkins/plugins/ecutest/test/TestFolderBuilderST.java
  63. +28 −9 src/test/java/de/tracetronic/jenkins/plugins/ecutest/test/TestPackageBuilderST.java
  64. +28 −9 src/test/java/de/tracetronic/jenkins/plugins/ecutest/test/TestProjectBuilderST.java
  65. +28 −11 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/StartETBuilderST.java
  66. +29 −9 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/StartTSBuilderST.java
  67. +23 −9 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/StopETBuilderST.java
  68. +23 −8 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/StopTSBuilderST.java
  69. +45 −10 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETInstallationST.java
  70. +15 −3 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETInstallationTest.java
  71. +85 −0 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETToolPropertyST.java
  72. +60 −0 src/test/java/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETToolPropertyTest.java
  73. +92 −0 src/test/java/de/tracetronic/jenkins/plugins/ecutest/wrapper/com/ETComProgIdTest.java
  74. +0 −60 ...st/resources/de/tracetronic/jenkins/plugins/ecutest/tool/installation/ETInstallationST/config.xml
  75. +35 −0 ...racetronic/jenkins/plugins/ecutest/tool/installation/ETInstallationST/testInstallation/config.xml
  76. +10 −0 ...onST/testInstallation/de.tracetronic.jenkins.plugins.ecutest.tool.installation.ETInstallation.xml
  77. +35 −0 ...c/jenkins/plugins/ecutest/tool/installation/ETInstallationST/testInstallationMigration/config.xml
  78. +1 −1 ...nST/{ → testInstallationMigration}/de.tracetronic.jenkins.plugins.ecutest.tool.StartETBuilder.xml
  79. +35 −0 ...ns/plugins/ecutest/tool/installation/ETInstallationST/testInstallationWithCustomProgId/config.xml
  80. +14 −0 ...ationWithCustomProgId/de.tracetronic.jenkins.plugins.ecutest.tool.installation.ETInstallation.xml
  81. +35 −0 ...lugins/ecutest/tool/installation/ETInstallationST/testInstallationWithoutConfiguration/config.xml
@@ -1,60 +1,91 @@
#!groovy

/* Required Jenkins plugins:
- https://wiki.jenkins-ci.org/display/JENKINS/Timestamper
- https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins
- https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/FindBugs+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/DRY+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/Task+Scanner+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/Javadoc+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin
*/

// Only keep the 10 most recent builds
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '10']]])

// Pipeline steps
timestamps {
node {
checkout scm

def mvnHome = tool 'M3'
env.JAVA_HOME = tool 'JDK7'
stage('Checkout') {
checkout scm
}

if (isUnix()) {
stage 'Build'
sh "${mvnHome}/bin/mvn -B -e -V -U clean package -DskipTests"
stage('Build') {
mvn 'clean package -B -V -U -e -DskipTests'
}

stage 'Static Code Analysis'
sh "${mvnHome}/bin/mvn -B -e checkstyle:check pmd:check pmd:cpd-check findbugs:check"
stage('Static Code Analysis') {
mvn 'checkstyle:check pmd:check pmd:cpd-check findbugs:check -B -e'
step([$class: 'CheckStylePublisher', pattern: 'target/checkstyle-result.xml'])
step([$class: 'FindBugsPublisher', pattern: 'target/findbugsXml.xml'])
step([$class: 'PmdPublisher', pattern: 'target/pmd.xml'])
step([$class: 'DryPublisher', pattern: 'target/cpd.xml'])
step([$class: 'TasksPublisher', high: 'FIXME', low: '', normal: 'TODO', pattern: 'src/**/*.java'])
}

stage 'Documentation'
sh "${mvnHome}/bin/mvn -B -e javadoc:javadoc"
stage('Documentation') {
mvn 'javadoc:javadoc -B -e'
step([$class: 'JavadocArchiver', javadocDir: 'target/site/apidocs', keepAll: false])
}

stage 'Unit Tests'
sh "${mvnHome}/bin/mvn -B -e test-compile jacoco:prepare-agent surefire:test"
step([$class: 'JUnitResultArchiver', testResults: 'target/surefire-reports/*.xml'])
stage('Unit Tests') {
mvn 'test-compile jacoco:prepare-agent surefire:test -B -e'
step([$class: 'JUnitResultArchiver', testResults: 'target/surefire-reports/TEST-*.xml'])
}

stage 'Code Coverage'
stage('Code Coverage') {
step([$class: 'JacocoPublisher', execPattern: 'target/jacoco.exec', exclusionPattern: '**/Messages.class'])
}

stage 'Archive Artifacts'
step([$class: 'ArtifactArchiver', artifacts: 'target/ecutest.hpi', fingerprint: true])
} else {
stage 'Build'
bat "${mvnHome}\\bin\\mvn -B -e -V -U clean package -DskipTests"

stage 'Static Code Analysis'
bat "${mvnHome}\\bin\\mvn -B -e checkstyle:check pmd:check pmd:cpd-check findbugs:check"
step([$class: 'CheckStylePublisher', pattern: 'target/checkstyle-result.xml'])
step([$class: 'FindBugsPublisher', pattern: 'target/findbugsXml.xml'])
step([$class: 'PmdPublisher', pattern: 'target/pmd.xml'])
step([$class: 'DryPublisher', pattern: 'target/cpd.xml'])
step([$class: 'TasksPublisher', high: 'FIXME', low: '', normal: 'TODO', pattern: 'src/**/*.java'])
stage('Archive Artifacts') {
step([$class: 'ArtifactArchiver', artifacts: 'target/*.hpi,target/*.jpi', fingerprint: true])
}
}
}

stage 'Documentation'
bat "${mvnHome}\\bin\\mvn -B -e javadoc:javadoc"
step([$class: 'JavadocArchiver', javadocDir: 'target/site/apidocs', keepAll: false])
// Run Maven from tool "mvn"
void mvn(def args) {
// Get JDK tool installation
def jdkHome = tool name: 'JDK7', type: 'hudson.model.JDK'

stage 'Unit Tests'
bat "${mvnHome}\\bin\\mvn -B -e test-compile jacoco:prepare-agent surefire:test"
step([$class: 'JUnitResultArchiver', testResults: 'target/surefire-reports/*.xml'])
// Get Maven tool installation
def mvnHome = tool name: 'M3', type: 'hudson.tasks.Maven$MavenInstallation'

stage 'Code Coverage'
step([$class: 'JacocoPublisher', execPattern: 'target/jacoco.exec', exclusionPattern: '**/Messages.class'])
// Set JAVA_HOME, MAVEN_HOME and special PATH variables
List javaEnv = [
"PATH+JDK=${jdkHome}/bin",
"PATH+MVN=${mvnHome}/bin",
"JAVA_HOME=${jdkHome}",
"MAVEN_HOME=${mvnHome}",
// Additional variables needed by tests on machines
// that don't have global git user.name and user.email configured.
'GIT_COMMITTER_EMAIL=me@hatescake.com',
'GIT_COMMITTER_NAME=Hates',
'GIT_AUTHOR_NAME=Cake',
'GIT_AUTHOR_EMAIL=hates@cake.com',
'LOGNAME=hatescake'
]

stage 'Archive Artifacts'
step([$class: 'ArtifactArchiver', artifacts: 'target/ecutest.hpi', fingerprint: true])
// Call Maven within Java environment
withEnv(javaEnv) {
timeout(time: 60, unit: 'MINUTES') {
if (isUnix()) {
sh "${mvnHome}/bin/mvn ${args}"
} else {
bat "${mvnHome}\\bin\\mvn ${args}"
}
}
}
}
52 pom.xml
@@ -34,13 +34,13 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.14</version>
<version>2.19</version>
<relativePath />
</parent>

<groupId>de.tracetronic.jenkins.plugins</groupId>
<artifactId>ecutest</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.15-SNAPSHOT</version>
<packaging>hpi</packaging>

<name>TraceTronic ECU-TEST Plugin</name>
@@ -87,16 +87,20 @@
<icon-shim.version>2.0.3</icon-shim.version>
<junit.version>1.3</junit.version>
<job-dsl.version>1.37</job-dsl.version>
<structs.version>1.5</structs.version>

<!-- Static code analysis -->
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
<maven-pmd-plugin.version>3.6</maven-pmd-plugin.version>
<maven-pmd-plugin.version>3.7</maven-pmd-plugin.version>

<!-- Test scope -->
<equalsverifier.version>2.1.5</equalsverifier.version>
<mockito-core.version>1.10.19</mockito-core.version>
<workflow.version>1.4.2</workflow.version>
<equalsverifier.version>2.1.7</equalsverifier.version>
<mockito-core.version>2.2.21</mockito-core.version>
<jacoco.version>0.7.7.201606060606</jacoco.version>
<workflow-aggregator.version>1.4.3</workflow-aggregator.version>
<workflow-basic-steps.version>1.4.3</workflow-basic-steps.version>
<workflow-cps.version>1.4.3</workflow-cps.version>
<workflow-step-api.version>1.4.3</workflow-step-api.version>
<concurrency>2</concurrency>

<!-- JACOB -->
@@ -114,13 +118,13 @@
</repository>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

@@ -174,6 +178,26 @@
<version>${job-dsl.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>xstream</artifactId>
<version>1.4.7-jenkins-1</version>
<exclusions>
<exclusion>
<groupId>xmlpull</groupId>
<artifactId>xmlpull</artifactId>
</exclusion>
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3_min</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>${structs.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
@@ -195,19 +219,25 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-aggregator</artifactId>
<version>${workflow.version}</version>
<version>${workflow-aggregator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>${workflow-basic-steps.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>${workflow.version}</version>
<version>${workflow-cps.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>${workflow.version}</version>
<version>${workflow-step-api.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
@@ -41,6 +41,8 @@
import org.jenkins.ui.icon.IconSet;
import org.jenkins.ui.icon.IconType;

import de.tracetronic.jenkins.plugins.ecutest.report.atx.ATXPublisher.DescriptorImpl;

/**
* Main entry point to this plugin for the {@link Jenkins} instance.
*
@@ -56,12 +58,12 @@
/**
* Defines the maximum allowed ECU-TEST version supported by this plugin.
*/
public static final ToolVersion ET_MAX_VERSION = new ToolVersion(6, 4, 0, 0);
public static final ToolVersion ET_MAX_VERSION = new ToolVersion(6, 5, 0, 0);

/**
* Defines the TEST-GUIDE version that the provided ATX configuration is based on.
*/
public static final ToolVersion ATX_VERSION = new ToolVersion(1, 33, 0, 0);
public static final ToolVersion ATX_VERSION = new ToolVersion(1, 38, 0, 0);

/**
* Helper class to easily compare tool versions defined by major, minor, micro and qualifier version. Mainly used to
@@ -235,4 +237,17 @@ public void start() throws Exception {
);
}
}

@Override
public void postInitialize() throws Exception {
super.postInitialize();
final Jenkins instance = Jenkins.getInstance();
if (instance != null) {
// Synchronize current ATX configuration with the default one.
final DescriptorImpl descriptor = instance.getDescriptorByType(DescriptorImpl.class);
if (descriptor != null) {
descriptor.syncWithDefaultConfig();
}
}
}
}
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-2016 TraceTronic GmbH
* Copyright (c) 2015-2017 TraceTronic GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -103,7 +103,7 @@ protected VirtualFile getArchiveTargetDir(final File rootDir) {
* @return the last build with report artifacts or {@code null} if no proper build exists
*/
@CheckForNull
protected abstract Run<?, ?> getLastReportBuild(final Job<?, ?> project);
protected abstract Run<?, ?> getLastReportBuild(Job<?, ?> project);

@Override
public String getIconFileName() {
@@ -0,0 +1,68 @@
/**
* Copyright (c) 2015-2016 TraceTronic GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of TraceTronic GmbH nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package de.tracetronic.jenkins.plugins.ecutest.report;

import hudson.model.AbstractProject;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Publisher;
import hudson.tools.ToolInstallation;
import de.tracetronic.jenkins.plugins.ecutest.tool.installation.ETInstallation;

/**
* Common base descriptor class for all report related publisher descriptors implemented in this plugin.
*
* @author Christian Pönisch <christian.poenisch@tracetronic.de>
*/
public abstract class AbstractReportDescriptor extends BuildStepDescriptor<Publisher> {

/**
* Gets the tool installations.
*
* @return the installations
*/
public ETInstallation[] getToolInstallations() {
return getToolDescriptor().getInstallations();
}

/**
* Gets the tool descriptor holding the installations.
*
* @return the tool descriptor
*/
public ETInstallation.DescriptorImpl getToolDescriptor() {
return ToolInstallation.all().get(ETInstallation.DescriptorImpl.class);
}

@SuppressWarnings("rawtypes")
@Override
public boolean isApplicable(final Class<? extends AbstractProject> jobType) {
return true;
}
}

0 comments on commit e249323

Please sign in to comment.