From fceb01cab6b0cdc2d62271d2bc7371558eaeac3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVitaly=E2=80=9D?= Date: Tue, 29 Nov 2022 10:01:39 +0300 Subject: [PATCH 1/5] Release files update --- .github/release-drafter.yml | 15 ++++++++++--- .github/workflows/release-draft.yml | 2 +- .github/workflows/release-publish.yml | 11 +++------- allure-teamcity-server/build.gradle | 19 ++++++++++++++-- gradle/bintray.gradle | 31 --------------------------- gradle/release.gradle | 2 -- 6 files changed, 33 insertions(+), 47 deletions(-) delete mode 100644 gradle/bintray.gradle diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 2c07ef3..b283906 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -2,11 +2,20 @@ name-template: '$NEXT_MINOR_VERSION' tag-template: '$NEXT_MINOR_VERSION' categories: - title: '🚀 New Features' - label: 'type:new feature' + labels: + - 'type:new feature' - title: '🔬 Improvements' - label: 'type:enhancement' + labels: + - 'type:improvement' - title: '🐞 Bug Fixes' - label: 'type:bug' + labels: + - 'type:bug' + - title: '⬆️ Dependency Updates' + labels: + - 'type:dependencies' + - title: '👻 Internal changes' + labels: + - 'type:internal' change-template: '* $TITLE (via #$NUMBER) - @$AUTHOR' template: | diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index 363a310..23afcbe 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -3,7 +3,7 @@ name: Release Draft on: push: branches: - - master + - 'master' jobs: update_draft_release: diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 8684230..deef818 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -15,12 +15,7 @@ jobs: java-version: 1.8 - name: "Gradle Build" run: ./gradlew installTeamcity2017 build -Pversion=${GITHUB_REF:10} - - name: "Upload binaries" - uses: actions/upload-release-asset@v1.0.1 + - name: "Gradle Publish to Jetbrains" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: allure-teamcity-server/build/distributions/allure-teamcity.zip - asset_name: allure-teamcity.zip - asset_content_type: application/octet-stream + JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_TOKEN }} + run: ./gradlew :allure-ee-teamcity-server:publishPlugin -Pversion=${GITHUB_REF:10} diff --git a/allure-teamcity-server/build.gradle b/allure-teamcity-server/build.gradle index 05491a0..22d4137 100644 --- a/allure-teamcity-server/build.gradle +++ b/allure-teamcity-server/build.gradle @@ -1,12 +1,27 @@ apply plugin: "com.github.rodm.teamcity-server" +apply plugin: "com.github.rodm.teamcity-environments" apply from: "${gradleScriptDir}/bintray.gradle" teamcity { version = teamcityVersion server { - descriptor = project.file('teamcity-plugin.xml') - tokens = [Version: project.version] + descriptor { + name = project.parent.name + displayName = 'Allure for TeamCity' + version = project.version + + description = 'Plugin adds support for generate Allure report based on tests results' + + vendorName = 'qameta' + vendorUrl = 'https://qameta.io' + email = 'team@qameta.io' + + useSeparateClassloader = true + } + publish { + token = System.getenv("JETBRAINS_TOKEN") + } } environments { diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle deleted file mode 100644 index 426a33b..0000000 --- a/gradle/bintray.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -bintray { - user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') - key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') - - configurations = ['archives'] - publish = true - - pkg { - userOrg = 'qameta' - repo = 'generic' - name = 'allure-teamcity' - desc = 'Allure Teamcity' - websiteUrl = 'https://github.com/allure-framework/allure-teamcity' - issueTrackerUrl = 'https://github.com/allure-framework/allure-teamcity' - vcsUrl = 'https://github.com/allure-framework/allure-teamcity.git' - licenses = ['Apache-2.0'] - - githubRepo = 'allure-framework/allure-teamcity' - githubReleaseNotesFile = 'README.md' - - version { - name = project.version - released = new Date() - gpg { - sign = true - } - } - } -} diff --git a/gradle/release.gradle b/gradle/release.gradle index 04d50c3..ba0c4e2 100644 --- a/gradle/release.gradle +++ b/gradle/release.gradle @@ -3,5 +3,3 @@ apply plugin: 'net.researchgate.release' release { tagTemplate = '${version}' } - -afterReleaseBuild.dependsOn bintrayUpload From faeea60d5582ef1695ed7e01fb2c2e9be33bbb9f Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Tue, 29 Nov 2022 11:34:28 +0300 Subject: [PATCH 2/5] fix build --- build.gradle | 3 --- gradle/release.gradle | 5 ----- 2 files changed, 8 deletions(-) delete mode 100644 gradle/release.gradle diff --git a/build.gradle b/build.gradle index a24991d..97a9044 100644 --- a/build.gradle +++ b/build.gradle @@ -21,9 +21,6 @@ ext { "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=50055" } -apply from: "${gradleScriptDir}/bintray.gradle" -apply from: "${gradleScriptDir}/release.gradle" - configure(rootProject) { description = "Allure for TeamCity" diff --git a/gradle/release.gradle b/gradle/release.gradle deleted file mode 100644 index ba0c4e2..0000000 --- a/gradle/release.gradle +++ /dev/null @@ -1,5 +0,0 @@ -apply plugin: 'net.researchgate.release' - -release { - tagTemplate = '${version}' -} From ed6e7a4e281920ff94f864530721961e69911ee2 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Tue, 29 Nov 2022 11:36:36 +0300 Subject: [PATCH 3/5] update --- allure-teamcity-server/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/allure-teamcity-server/build.gradle b/allure-teamcity-server/build.gradle index 22d4137..e4ab0c2 100644 --- a/allure-teamcity-server/build.gradle +++ b/allure-teamcity-server/build.gradle @@ -1,8 +1,6 @@ apply plugin: "com.github.rodm.teamcity-server" apply plugin: "com.github.rodm.teamcity-environments" -apply from: "${gradleScriptDir}/bintray.gradle" - teamcity { version = teamcityVersion server { From 2b494442dd5800b01b187e922962f10797e66a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVitaly=E2=80=9D?= Date: Tue, 29 Nov 2022 14:41:18 +0300 Subject: [PATCH 4/5] fix build problems --- allure-teamcity-agent/build.gradle | 25 ++++--- allure-teamcity-common/build.gradle | 2 +- .../allure/teamcity/AllureConstants.java | 4 +- allure-teamcity-server/build.gradle | 13 ++-- build.gradle | 74 ++++++++++++++----- 5 files changed, 78 insertions(+), 40 deletions(-) diff --git a/allure-teamcity-agent/build.gradle b/allure-teamcity-agent/build.gradle index 9829e8b..5ce92c7 100644 --- a/allure-teamcity-agent/build.gradle +++ b/allure-teamcity-agent/build.gradle @@ -2,9 +2,11 @@ apply plugin: "com.github.rodm.teamcity-agent" teamcity { version = teamcityVersion - descriptor { - pluginDeployment { - useSeparateClassloader = true + agent { + descriptor { + pluginDeployment { + useSeparateClassloader = true + } } } } @@ -17,14 +19,15 @@ agentPlugin { dependencies { compile project(':allure-teamcity-common') - compile 'commons-io:commons-io:2.7' - compile 'org.apache.commons:commons-lang3:3.4' - compile 'commons-logging:commons-logging:1.1.3' - compile 'commons-httpclient:commons-httpclient:3.1' - compile 'org.apache.commons:commons-compress:1.16.1' + compile 'commons-httpclient:commons-httpclient' + compile 'commons-logging:commons-logging' - provided 'com.intellij:openapi:7.0.3' - provided "org.jetbrains.teamcity:agent-api:${teamcityVersion}" - provided "org.jetbrains.teamcity.internal:agent:${teamcityVersion}" + compile 'org.apache.commons:commons-compress' + compile 'org.apache.commons:commons-io' + compile 'org.apache.commons:commons-lang3' + + provided 'com.intellij:openapi' + provided "org.jetbrains.teamcity:agent-api" + provided "org.jetbrains.teamcity.internal:agent" } diff --git a/allure-teamcity-common/build.gradle b/allure-teamcity-common/build.gradle index 37f7cca..aaede98 100644 --- a/allure-teamcity-common/build.gradle +++ b/allure-teamcity-common/build.gradle @@ -6,5 +6,5 @@ teamcity { } dependencies { - compile 'com.fasterxml.jackson.core:jackson-databind:2.7.2' + compile 'com.fasterxml.jackson.core:jackson-databind' } \ No newline at end of file diff --git a/allure-teamcity-common/src/main/java/io/qameta/allure/teamcity/AllureConstants.java b/allure-teamcity-common/src/main/java/io/qameta/allure/teamcity/AllureConstants.java index ba2a48f..356c9c3 100644 --- a/allure-teamcity-common/src/main/java/io/qameta/allure/teamcity/AllureConstants.java +++ b/allure-teamcity-common/src/main/java/io/qameta/allure/teamcity/AllureConstants.java @@ -53,8 +53,8 @@ public final class AllureConstants { */ static final String ALLURE_ARTIFACT_SUMMARY_LOCATION = ALLURE_ARTIFACT_META_LOCATION + "summary.json"; - private static final String ALLURE_COMMANDLINE_MAVEN_URL = "http://central.maven.org/" + - "maven2/io/qameta/allure/allure-commandline/"; + private static final String ALLURE_COMMANDLINE_MAVEN_URL = "https://repo.maven.apache.org/maven2/" + + "io/qameta/allure/allure-commandline/"; static final String ALLURE_COMMANDLINE_MAVEN_METADATA_URL = ALLURE_COMMANDLINE_MAVEN_URL + "maven-metadata.xml"; static final String ALLURE_COMMANDLINE_MAVEN_FILENAME = "allure-commandline-%1$s.zip"; diff --git a/allure-teamcity-server/build.gradle b/allure-teamcity-server/build.gradle index e4ab0c2..160b7bc 100644 --- a/allure-teamcity-server/build.gradle +++ b/allure-teamcity-server/build.gradle @@ -41,16 +41,17 @@ serverPlugin { //configurations.archives.artifacts.removeAll { it.archiveTask.is jar } dependencies { - def teamcityFullDir = "$teamcityDir/TeamCity-2017.1.5" - agent project(path: ':allure-teamcity-agent', configuration: 'plugin') + agent project(path: ':allure-teamcity-agent', configuration: 'plugin') compile project(':allure-teamcity-common') - compile 'commons-io:commons-io:2.7' - compile 'org.apache.commons:commons-lang3:3.4' + compile 'org.apache.commons:commons-io' + compile 'org.apache.commons:commons-lang3' - provided 'javax.servlet:jstl:1.1.2' - provided "org.jetbrains.teamcity.internal:server:$teamcityVersion" + provided 'javax.servlet:jstl' + provided 'org.jetbrains.teamcity.internal:server' + + def teamcityFullDir = "$teamcityDir/TeamCity-2017.1.5" provided files("${teamcityFullDir}/webapps/ROOT/WEB-INF/lib/server-tools.jar") provided files("${teamcityFullDir}/webapps/ROOT/WEB-INF/lib/common-tools.jar") } diff --git a/build.gradle b/build.gradle index 97a9044..45041a0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,57 +1,91 @@ buildscript { repositories { - maven { - url 'https://plugins.gradle.org/m2/' - } + maven { url 'https://plugins.gradle.org/m2/' } } dependencies { - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' - classpath 'com.github.rodm:gradle-teamcity-plugin:1.0' - classpath 'net.researchgate:gradle-release:2.6.0' + classpath 'io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE' + classpath 'com.github.rodm:gradle-teamcity-plugin:1.2.2' + classpath 'net.researchgate:gradle-release:2.7.0' } } ext { teamcityVersion = '2017.1' - gradleScriptDir = "${rootProject.projectDir}/gradle" teamcityDir = "${rootProject.projectDir}/.teamcity" serverOpts = "-DTC.res.disableAll=true " + "-Dteamcity.development.mode=true " + "-Dteamcity.development.shadowCopyClasses=true " + "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=50055" + + gradleScriptDir = "${rootProject.projectDir}/gradle" } +group = 'io.qameta.allure' +version = version +description = 'Allure for TeamCity' + configure(rootProject) { - description = "Allure for TeamCity" + apply from: "${gradleScriptDir}/release.gradle" task build() { } + afterReleaseBuild.dependsOn(":allure-ee-teamcity-server:publishPlugin") } tasks.withType(Wrapper.class) { gradleVersion = '6.4' } -allprojects { - group = 'io.qameta.allure' - version = version -} - -subprojects { - apply plugin: "java" +configure(subprojects) { + apply plugin: 'java' + apply plugin: 'io.spring.dependency-management' - repositories { - jcenter() - mavenCentral() - maven { url = "https://download.jetbrains.com/teamcity-repository" } + compileJava { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + options.encoding = 'UTF-8' } - compileJava { + compileTestJava { sourceCompatibility = 1.8 targetCompatibility = 1.8 options.encoding = 'UTF-8' + options.compilerArgs += '-parameters' } + dependencyManagement { + dependencies { + + dependency 'javax.servlet:jstl:1.1.2' + dependency 'org.zeroturnaround:zt-zip:1.12' + + dependency 'org.apache.commons:commons-compress:1.16.1' + dependency 'org.apache.commons:commons-lang3:3.4' + dependency 'org.apache.commons:commons-io:1.3.2' + dependency 'org.apache.maven:maven-artifact:3.6.3' + dependency 'commons-logging:commons-logging:1.1.3' + dependency 'commons-httpclient:commons-httpclient:3.1' + + dependency 'com.intellij:openapi:7.0.3' + dependency "org.jetbrains.teamcity:agent-api:$teamcityVersion" + dependency "org.jetbrains.teamcity.internal:agent:$teamcityVersion" + dependency "org.jetbrains.teamcity.internal:server:$teamcityVersion" + + dependency 'com.fasterxml.jackson.core:jackson-databind:2.7.2' + } + } + + repositories { + mavenLocal() + jcenter() + maven { url 'https://download.jetbrains.com/teamcity-repository' } + } +} + +configurations.all { + resolutionStrategy { + force 'xml-apis:xml-apis:1.4.01' + } } From b99266a4c6174b2f961f5e782b8fcd9673a66cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVitaly=E2=80=9D?= Date: Tue, 29 Nov 2022 14:58:23 +0300 Subject: [PATCH 5/5] restore file --- gradle/release.gradle | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 gradle/release.gradle diff --git a/gradle/release.gradle b/gradle/release.gradle new file mode 100644 index 0000000..ba0c4e2 --- /dev/null +++ b/gradle/release.gradle @@ -0,0 +1,5 @@ +apply plugin: 'net.researchgate.release' + +release { + tagTemplate = '${version}' +}