Fixing build and test configuration

This commit is contained in:
Martin Stockhammer 2018-05-02 23:10:06 +02:00
parent 3732f2e072
commit 214bdc4360
4 changed files with 11 additions and 5 deletions

10
Jenkinsfile vendored
View File

@ -31,7 +31,7 @@ pipeline {
withMaven(maven: buildMvn, jdk: buildJdk, withMaven(maven: buildMvn, jdk: buildJdk,
mavenSettingsConfig: deploySettings, mavenSettingsConfig: deploySettings,
mavenLocalRepo: ".repository", mavenLocalRepo: ".repository",
options: [artifactsPublisher(disabled: true), junitPublisher(disabled: true, ignoreAttachments: false)] publisherStrategy='EXPLICIT'
) )
{ {
sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh" sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
@ -54,10 +54,16 @@ pipeline {
} }
post { post {
always { always {
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/target/surefire-reports/TEST-*.xml' junit testResults: '**/target/surefire-reports/TEST-*.xml'
} }
success { success {
archiveArtifacts '**/target/*.war,**/target/*-bin.zip' archiveArtifacts '**/target/*.war,**/target/*-bin.zip'
script {
def previousResult = currentBuild.previousBuild?.result
if (previousResult && previousResult != currentBuild.result) {
notifyBuild("Fixed")
}
}
} }
failure { failure {
notifyBuild("Build / Test failure") notifyBuild("Build / Test failure")

View File

@ -293,7 +293,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<systemPropertyVariables> <systemPropertyVariables>
<appserver.base>${project.build.directory}/test-repository</appserver.base> <appserver.base>${project.build.directory}/appserver-base</appserver.base>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -121,7 +121,7 @@ public class TestConfiguration
StringUtils.isNotEmpty(configuration.getArchivaRuntimeConfiguration().getDataDirectory())) { StringUtils.isNotEmpty(configuration.getArchivaRuntimeConfiguration().getDataDirectory())) {
return Paths.get(configuration.getArchivaRuntimeConfiguration().getDataDirectory()); return Paths.get(configuration.getArchivaRuntimeConfiguration().getDataDirectory());
} else { } else {
return getAppServerBaseDir().resolve(""); return getAppServerBaseDir().resolve("data");
} }
} }
} }

View File

@ -578,7 +578,7 @@ public class Maven2RepositoryMetadataResolverTest
public void testGetRootNamespaces() public void testGetRootNamespaces()
throws Exception throws Exception
{ {
assertEquals( Arrays.asList( "com", "org", "remotes"), storage.listRootNamespaces( TEST_REPO_ID, ALL ) ); assertEquals( Arrays.asList( "com", "org"), storage.listRootNamespaces( TEST_REPO_ID, ALL ) );
} }
@Test @Test