From 7d2a47839c607bd586a932826f05156683e2fcb4 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 2 Jul 2017 16:34:56 +0300 Subject: [PATCH 1/4] add allure --- Jenkinsfile | 1 + build.gradle | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52acefc6d..5d1716a94 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,6 +42,7 @@ pipeline { } failure { + allure results: [[path: '**/build/allure-results']] slackSend message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} failed (<${env.BUILD_URL}|Open>)", color: 'danger', teamDomain: 'qameta', channel: 'allure', tokenCredentialId: 'allure-channel' } diff --git a/build.gradle b/build.gradle index dc0ffb149..e45b06194 100644 --- a/build.gradle +++ b/build.gradle @@ -10,6 +10,7 @@ buildscript { classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4' classpath 'net.researchgate:gradle-release:2.6.0' classpath 'ru.vyarus:gradle-quality-plugin:2.2.0' + classpath "io.qameta.allure:allure-gradle:2.3" } } @@ -42,8 +43,11 @@ subprojects { project -> version = version apply plugin: 'java' + apply plugin: 'io.qameta.allure' apply plugin: 'io.spring.dependency-management' - + + apply from: "${gradleScriptDir}/maven-publish.gradle" + compileJava.dependsOn(processResources) compileJava { @@ -92,8 +96,6 @@ subprojects { project -> } } - apply from: "${gradleScriptDir}/maven-publish.gradle" - task sourceJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allJava @@ -118,6 +120,12 @@ subprojects { project -> mavenLocal() } + allure { + version = '2.2.1' + aspectjweaver = true + autoconfigure = true + } + test { maxParallelForks = 10 afterTest { desc, result -> From 1aa87d2aef4568f192edfa15bb9ef4c7f00170b6 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 2 Jul 2017 16:35:27 +0300 Subject: [PATCH 2/4] always build allure --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d1716a94..700754cd2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,11 +38,11 @@ pipeline { } post { always { + allure results: [[path: '**/build/allure-results']] deleteDir() } failure { - allure results: [[path: '**/build/allure-results']] slackSend message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} failed (<${env.BUILD_URL}|Open>)", color: 'danger', teamDomain: 'qameta', channel: 'allure', tokenCredentialId: 'allure-channel' } From a4e5ca54a51d15dba5dac47e4a104d112a85b5a4 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 2 Jul 2017 16:41:22 +0300 Subject: [PATCH 3/4] turn off autoconfig --- build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e45b06194..f8c4836ef 100644 --- a/build.gradle +++ b/build.gradle @@ -122,8 +122,7 @@ subprojects { project -> allure { version = '2.2.1' - aspectjweaver = true - autoconfigure = true + autoconfigure = false } test { From 9cf309fba0f8dedbc6f79122cdd6f1f692100dbd Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 2 Jul 2017 19:44:21 +0300 Subject: [PATCH 4/4] use singlequote --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f8c4836ef..3d5eaf46d 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4' classpath 'net.researchgate:gradle-release:2.6.0' classpath 'ru.vyarus:gradle-quality-plugin:2.2.0' - classpath "io.qameta.allure:allure-gradle:2.3" + classpath 'io.qameta.allure:allure-gradle:2.3' } }