mirror of
https://github.com/corda/corda.git
synced 2024-12-20 05:28:21 +00:00
TM-80 Do not publish the junit zip file to Artifactory automatically. (#5667)
This functionality was only in place for debugging purposes, to switch it back on, set -Dpublish.junit=true in the Jenkinsfile.
This commit is contained in:
parent
6bf49bc4b7
commit
4a7a9a56be
@ -84,4 +84,8 @@ public class Properties {
|
||||
static String getTargetGitBranch() {
|
||||
return getProperty("git.target.branch").replace('/', '-');
|
||||
}
|
||||
|
||||
static boolean getPublishJunitTests() {
|
||||
return ! getProperty("publish.junit").isEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -204,11 +204,12 @@ public class TestDurationArtifacts {
|
||||
*/
|
||||
@NotNull
|
||||
public static Task createZipTask(@NotNull final Project project, @NotNull final String name, @Nullable final Task task) {
|
||||
final Task zipJunitTask = createJunitZipTask(project, name);
|
||||
final Task csvTask = createCsvTask(project, name);
|
||||
|
||||
if (Properties.getPublishJunitTests()) {
|
||||
final Task zipJunitTask = createJunitZipTask(project, name);
|
||||
csvTask.dependsOn(zipJunitTask);
|
||||
// For debugging - can be removed - this simply gathers junit xml and uploads them to artifactory
|
||||
// so that we can inspect them.
|
||||
}
|
||||
|
||||
if (task != null) {
|
||||
csvTask.dependsOn(task);
|
||||
|
@ -53,4 +53,11 @@ public class PropertiesTest {
|
||||
public void getTargetGitBranch() {
|
||||
Assert.assertEquals(targetBranch, Properties.getTargetGitBranch());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getPublishJunitTests() {
|
||||
Assert.assertFalse(Properties.getPublishJunitTests());
|
||||
System.setProperty("publish.junit", "true");
|
||||
Assert.assertTrue(Properties.getPublishJunitTests());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user