From b782b29f45e1720481f2c853eb9a03cd13bc11cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 13:48:03 +0300 Subject: [PATCH 01/23] bump tika-core from 1.25 to 1.26 (via #549) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index c0b0e101b..b46c3b0a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -91,7 +91,7 @@ configure(subprojects) { dependency("io.github.glytching:junit-extensions:2.4.0") dependency("org.apache.commons:commons-lang3:3.12.0") dependency("org.apache.httpcomponents:httpclient:4.5.13") - dependency("org.apache.tika:tika-core:1.25") + dependency("org.apache.tika:tika-core:1.26") dependency("org.aspectj:aspectjrt:1.9.6") dependency("org.aspectj:aspectjweaver:1.9.6") dependency("org.assertj:assertj-core:3.19.0") From 1b4e832b912edcc2b11666031b3c9833cc609f71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 15:52:08 +0300 Subject: [PATCH 02/23] bump joor-java-8 from 0.9.13 to 0.9.14 (via #558) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index b46c3b0a8..4bb4fe901 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -98,7 +98,7 @@ configure(subprojects) { dependency("org.codehaus.groovy:groovy-all:2.5.13") dependency("org.freemarker:freemarker:2.3.31") dependency("org.jboss.resteasy:resteasy-client:4.6.0.Final") - dependency("org.jooq:joor-java-8:0.9.13") + dependency("org.jooq:joor-java-8:0.9.14") dependency("org.mock-server:mockserver-netty:5.11.2") dependency("org.mockito:mockito-core:3.8.0") dependencySet("org.slf4j:1.7.30") { From 676679117b9f4baffc4890ea766e0b14fa4af2b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 18:22:20 +0300 Subject: [PATCH 03/23] bump mockito-core from 3.8.0 to 3.9.0 (via #557) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4bb4fe901..d65ab03ee 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -100,7 +100,7 @@ configure(subprojects) { dependency("org.jboss.resteasy:resteasy-client:4.6.0.Final") dependency("org.jooq:joor-java-8:0.9.14") dependency("org.mock-server:mockserver-netty:5.11.2") - dependency("org.mockito:mockito-core:3.8.0") + dependency("org.mockito:mockito-core:3.9.0") dependencySet("org.slf4j:1.7.30") { entry("slf4j-api") entry("slf4j-nop") From 142a4bb27bf5c579cc7b0cc1d1381ecf976005ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 12:12:48 +0300 Subject: [PATCH 04/23] bump jackson-bom from 2.12.2 to 2.12.3 (via #561) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d65ab03ee..2a4a6bd55 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -78,7 +78,7 @@ configure(subprojects) { configure { imports { - mavenBom("com.fasterxml.jackson:jackson-bom:2.12.2") + mavenBom("com.fasterxml.jackson:jackson-bom:2.12.3") mavenBom("org.junit:junit-bom:5.7.1") } dependencies { From 8bbd2d86cdfb7271af1f37848cbdcb2e447ed89e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 12:13:33 +0300 Subject: [PATCH 05/23] bump spotless-plugin-gradle from 5.11.1 to 5.12.1 (via #562) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2a4a6bd55..e2ec9141c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath("com.diffplug.spotless:spotless-plugin-gradle:5.11.1") + classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.1") classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5") classpath("io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE") classpath("ru.vyarus:gradle-quality-plugin:4.5.0") From c8bba0f7afd1f3269ff96300927db023fcd33346 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Apr 2021 15:12:41 +0300 Subject: [PATCH 06/23] bump selenide from 5.20.1 to 5.20.2 (via #564) --- allure-selenide/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allure-selenide/build.gradle.kts b/allure-selenide/build.gradle.kts index 2d4890884..7a2de87e5 100644 --- a/allure-selenide/build.gradle.kts +++ b/allure-selenide/build.gradle.kts @@ -2,7 +2,7 @@ description = "Allure Selenide Integration" val agent: Configuration by configurations.creating -val selenideVersion = "5.20.1" +val selenideVersion = "5.20.2" dependencies { agent("org.aspectj:aspectjweaver") From a1a870bcb87e3f6559988dd4ac8e30574d7e1a2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Apr 2021 12:55:45 +0300 Subject: [PATCH 07/23] bump selenide from 5.20.2 to 5.20.3 (via #566) --- allure-selenide/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allure-selenide/build.gradle.kts b/allure-selenide/build.gradle.kts index 7a2de87e5..61aa0de8c 100644 --- a/allure-selenide/build.gradle.kts +++ b/allure-selenide/build.gradle.kts @@ -2,7 +2,7 @@ description = "Allure Selenide Integration" val agent: Configuration by configurations.creating -val selenideVersion = "5.20.2" +val selenideVersion = "5.20.3" dependencies { agent("org.aspectj:aspectjweaver") From a0d78609a6ca909d5c32b7156231266d6df06e3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Apr 2021 13:06:22 +0300 Subject: [PATCH 08/23] bump spring-web from 5.3.5 to 5.3.6 (via #563) --- allure-spring-web/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allure-spring-web/build.gradle.kts b/allure-spring-web/build.gradle.kts index edd5d70a7..754716507 100644 --- a/allure-spring-web/build.gradle.kts +++ b/allure-spring-web/build.gradle.kts @@ -2,7 +2,7 @@ description = "Allure Spring Web Integration" val agent: Configuration by configurations.creating -val springWebVersion = "5.3.5" +val springWebVersion = "5.3.6" dependencies { agent("org.aspectj:aspectjweaver") From 2d7c38c17cab5725a83db285d7f0bcf3c09dce17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Apr 2021 13:09:09 +0300 Subject: [PATCH 09/23] bump spotless-plugin-gradle from 5.12.1 to 5.12.2 (via #565) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index e2ec9141c..5873ca756 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.1") + classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.2") classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5") classpath("io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE") classpath("ru.vyarus:gradle-quality-plugin:4.5.0") From 5ed4d7708355ac6acf40967329016d4acb503b6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 17:37:31 +0300 Subject: [PATCH 10/23] bump selenide from 5.20.3 to 5.20.4 (via #569) --- allure-selenide/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allure-selenide/build.gradle.kts b/allure-selenide/build.gradle.kts index 61aa0de8c..c0b0b4e32 100644 --- a/allure-selenide/build.gradle.kts +++ b/allure-selenide/build.gradle.kts @@ -2,7 +2,7 @@ description = "Allure Selenide Integration" val agent: Configuration by configurations.creating -val selenideVersion = "5.20.3" +val selenideVersion = "5.20.4" dependencies { agent("org.aspectj:aspectjweaver") From 6cd8d2b6c0b699581ee83d2d4e3ae7f3c5a19a1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 17:41:29 +0300 Subject: [PATCH 11/23] bump spotless-plugin-gradle from 5.12.2 to 5.12.4 (via #568) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5873ca756..ed03769e5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.2") + classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.4") classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5") classpath("io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE") classpath("ru.vyarus:gradle-quality-plugin:4.5.0") From 12b8631010981e33f0ec2e5b6268b5245dffb60b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 17:42:02 +0300 Subject: [PATCH 12/23] bump actions/setup-java from v1 to v2 (via #555) --- .github/workflows/build.yaml | 8 +++++--- .github/workflows/release.yaml | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f1870eb9f..f3bb57f3f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,9 +17,10 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'zulu' + java-version: 8.0.x - name: Build with Gradle run: ./gradlew build build_11: @@ -28,8 +29,9 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'zulu' java-version: 11.0.x - name: Build with Gradle run: ./gradlew build diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1df69505c..0a72b1b46 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,9 +10,10 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'zulu' + java-version: 8.0.x - name: "Gradle Build" run: ./gradlew build -Pversion=${GITHUB_REF:10} - name: "Gradle Publish to Bintray" From 0dc499624459218621e1723cba5f3e1b970d7b23 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Thu, 29 Apr 2021 15:00:24 +0300 Subject: [PATCH 13/23] release to central (via #542) --- .github/workflows/{build.yaml => build.yml} | 4 +- .github/workflows/publish.yml | 34 ++++++++ .github/workflows/release.yaml | 23 ----- .github/workflows/release.yml | 18 ++++ allure-junit-platform/build.gradle.kts | 15 ++-- allure-junit5/build.gradle.kts | 13 +-- allure-model/build.gradle.kts | 2 +- allure-testng/build.gradle.kts | 15 ++-- build.gradle.kts | 93 ++++++++++++++------- gradle/bintray.gradle | 31 ------- gradle/maven-publish.gradle | 55 ------------ 11 files changed, 139 insertions(+), 164 deletions(-) rename .github/workflows/{build.yaml => build.yml} (90%) create mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/release.yaml create mode 100644 .github/workflows/release.yml delete mode 100644 gradle/bintray.gradle delete mode 100644 gradle/maven-publish.gradle diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yml similarity index 90% rename from .github/workflows/build.yaml rename to .github/workflows/build.yml index f3bb57f3f..7334f99ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: name: "Build JDK 1.8" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v2 with: @@ -27,7 +27,7 @@ jobs: name: "Build JDK 11" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v2 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..f1e628065 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: 8.0.x + - name: Set up GPG + run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg + env: + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + - name: "Gradle Build" + run: ./gradlew build -Pversion=${GITHUB_REF:10} + - name: "Gradle Publish" + run: | + ./gradlew publishToSonatype -Pversion=${GITHUB_REF:10} \ + -Psigning.keyId=${GPG_KEY_ID} \ + -Psigning.password=${GPG_PASSPHRASE} \ + -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg + env: + ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} + ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 0a72b1b46..000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Release - -on: - release: - types: [published] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - - name: Set up JDK - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 8.0.x - - name: "Gradle Build" - run: ./gradlew build -Pversion=${GITHUB_REF:10} - - name: "Gradle Publish to Bintray" - env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} - run: ./gradlew bintrayUpload -Pversion=${GITHUB_REF:10} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..ed630f050 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release + +on: + workflow_dispatch: + inputs: + releaseVersion: + description: "The release version in .. format" + required: true + nextVersion: + description: "The next version in . format WITHOUT SNAPSHOT SUFFIX" + required: true + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + diff --git a/allure-junit-platform/build.gradle.kts b/allure-junit-platform/build.gradle.kts index a4b970826..417709e6b 100644 --- a/allure-junit-platform/build.gradle.kts +++ b/allure-junit-platform/build.gradle.kts @@ -40,14 +40,15 @@ tasks.test { } } -val spiOffJar by tasks.creating(Jar::class) { +val spiOffJar: Jar by tasks.creating(Jar::class) { from(sourceSets.getByName("main").output) - classifier = "spi-off" + archiveClassifier.set("spi-off") } -val spiOff by configurations.creating { - extendsFrom(configurations.getByName("compile")) +publishing { + publications { + named("maven") { + artifact(spiOffJar) + } + } } - -artifacts.add("archives", spiOffJar) -artifacts.add("spiOff", spiOffJar) diff --git a/allure-junit5/build.gradle.kts b/allure-junit5/build.gradle.kts index 91499fd26..0b63accf3 100644 --- a/allure-junit5/build.gradle.kts +++ b/allure-junit5/build.gradle.kts @@ -38,15 +38,16 @@ tasks.test { } } -val spiOffJar by tasks.creating(Jar::class) { +val spiOffJar: Jar by tasks.creating(Jar::class) { from(sourceSets.getByName("main").output) archiveClassifier.set("spi-off") } -val spiOff by configurations.creating { - extendsFrom(configurations.getByName("compile")) +publishing { + publications { + named("maven") { + artifact(spiOffJar) + } + } } -artifacts.add("archives", spiOffJar) -artifacts.add("spiOff", spiOffJar) - diff --git a/allure-model/build.gradle.kts b/allure-model/build.gradle.kts index 507dfdf45..9b5fb34fd 100644 --- a/allure-model/build.gradle.kts +++ b/allure-model/build.gradle.kts @@ -4,7 +4,7 @@ val agent: Configuration by configurations.creating dependencies { agent("org.aspectj:aspectjweaver") - implementation("com.fasterxml.jackson.core:jackson-databind") + implementation("com.fasterxml.jackson.core:jackson-databind:2.12.2") testImplementation("io.github.benas:random-beans") testImplementation("org.assertj:assertj-core") testImplementation("org.junit.jupiter:junit-jupiter-api") diff --git a/allure-testng/build.gradle.kts b/allure-testng/build.gradle.kts index c48c6d44c..f6b2d0107 100644 --- a/allure-testng/build.gradle.kts +++ b/allure-testng/build.gradle.kts @@ -39,14 +39,15 @@ tasks.test { } } -val spiOffJar by tasks.creating(Jar::class) { +val spiOffJar: Jar by tasks.creating(Jar::class) { from(sourceSets.getByName("main").output) - classifier = "spi-off" + archiveClassifier.set("spi-off") } -val spiOff by configurations.creating { - extendsFrom(configurations.getByName("compile")) +publishing { + publications { + named("maven") { + artifact(spiOffJar) + } + } } - -artifacts.add("archives", spiOffJar) -artifacts.add("spiOff", spiOffJar) diff --git a/build.gradle.kts b/build.gradle.kts index ed03769e5..b495319c7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,5 @@ import com.diffplug.gradle.spotless.SpotlessExtension -import io.qameta.allure.gradle.AllureExtension import io.qameta.allure.gradle.task.AllureReport -import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension -import org.gradle.jvm.tasks.Jar import ru.vyarus.gradle.plugin.quality.QualityExtension buildscript { @@ -14,8 +11,6 @@ buildscript { dependencies { classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.4") - classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5") - classpath("io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE") classpath("ru.vyarus:gradle-quality-plugin:4.5.0") } } @@ -37,7 +32,10 @@ tasks.withType(Wrapper::class) { plugins { java `java-library` - id("net.researchgate.release") version "2.8.1" + `maven-publish` + signing + id("io.spring.dependency-management") version "1.0.11.RELEASE" + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("io.qameta.allure") version "2.8.1" } @@ -50,33 +48,32 @@ tasks.withType(JavaCompile::class) { options.encoding = "UTF-8" } -release { - tagTemplate = "\${version}" -} - -val afterReleaseBuild by tasks.existing - configure(listOf(rootProject)) { description = "Allure Java" group = "io.qameta.allure" } +nexusPublishing { + repositories { + sonatype() + } +} + configure(subprojects) { val project = this group = "io.qameta.allure" version = version apply(plugin = "java") + apply(plugin = "signing") apply(plugin = "java-library") - apply(plugin = "maven") - apply(plugin = "io.spring.dependency-management") + apply(plugin = "maven-publish") + apply(plugin = "io.qameta.allure") apply(plugin = "ru.vyarus.quality") apply(plugin = "com.diffplug.spotless") - apply(plugin = "io.qameta.allure") - apply(from = "$gradleScriptDir/bintray.gradle") - apply(from = "$gradleScriptDir/maven-publish.gradle") + apply(plugin = "io.spring.dependency-management") - configure { + dependencyManagement { imports { mavenBom("com.fasterxml.jackson:jackson-bom:2.12.3") mavenBom("org.junit:junit-bom:5.7.1") @@ -206,31 +203,63 @@ configure(subprojects) { encoding("UTF-8") } - configure { + allure { autoconfigure = false aspectjweaver = false } - val sourceJar by tasks.creating(Jar::class) { - from(sourceSets.getByName("main").allSource) - archiveClassifier.set("sources") - } - - val javadocJar by tasks.creating(Jar::class) { - from(tasks.getByName("javadoc")) - archiveClassifier.set("javadoc") + java { + withJavadocJar() + withSourcesJar() } tasks.withType(Javadoc::class) { (options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") } - artifacts.add("archives", sourceJar) - artifacts.add("archives", javadocJar) + publishing { + publications { + create("maven") { + from(components["java"]) + suppressAllPomMetadataWarnings() + pom { + name.set(project.name) + description.set("Module ${project.name} of Allure Framework.") + url.set("https://github.com/allure-framework/allure-java") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("baev") + name.set("Dmitry Baev") + email.set("dmitry.baev@qameta.io") + } + developer { + id.set("eroshenkoam") + name.set("Artem Eroshenko") + email.set("artem.eroshenko@qameta.io") + } + } + scm { + developerConnection.set("scm:git:git://github.com/allure-framework/allure-java") + connection.set("scm:git:git://github.com/allure-framework/allure-java") + url.set("https://github.com/allure-framework/allure-java") + } + issueManagement { + system.set("GitHub Issues") + url.set("https://github.com/allure-framework/allure-java/issues") + } + } + } + } + } - val bintrayUpload by tasks.existing - afterReleaseBuild { - dependsOn(bintrayUpload) + signing { + sign(publishing.publications["maven"]) } repositories { diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle deleted file mode 100644 index 60e005f04..000000000 --- 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 = 'maven' - name = 'allure-java' - desc = 'Allure Java integrations' - websiteUrl = 'https://github.com/allure-framework/allure-java' - issueTrackerUrl = 'https://github.com/allure-framework/allure-java' - vcsUrl = 'https://github.com/allure-framework/allure-java.git' - licenses = ['Apache-2.0'] - - githubRepo = 'allure-framework/allure-java' - githubReleaseNotesFile = 'README.md' - - version { - name = project.version - released = new Date() - gpg { - sign = true - } - } - } -} diff --git a/gradle/maven-publish.gradle b/gradle/maven-publish.gradle deleted file mode 100644 index 7543a22be..000000000 --- a/gradle/maven-publish.gradle +++ /dev/null @@ -1,55 +0,0 @@ -apply plugin: 'maven' - -install { - repositories.mavenInstaller { - customizePom(pom, project) - } -} - -def customizePom(pom, gradleProject) { - pom.whenConfigured { generatedPom -> - // eliminate testng-scoped dependencies (no need in maven central poms) - generatedPom.dependencies.removeAll { dep -> - dep.scope == "test" - } - - // sort to make pom dependencies order consistent to ease comparison of older poms - generatedPom.dependencies = generatedPom.dependencies.sort { dep -> - "$dep.scope:$dep.groupId:$dep.artifactId" - } - - // add all items necessary for maven central publication - generatedPom.project { - name = gradleProject.description - description = gradleProject.description - url = "https://github.com/allure-framework/allure-java" - organization { - name = "Qameta IO" - url = "https://qameta.io" - } - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' - } - } - scm { - url = 'https://github.com/allure-framework/allure-java' - connection = 'scm:git:git://github.com/allure-framework/allure-java' - developerConnection = 'scm:git:git://github.com/allure-framework/allure-java' - } - developers { - developer { - id = 'baev' - name = 'Dmitry Baev' - email = 'baev@qameta.io' - } - } - issueManagement { - system = 'Github Issues' - url = 'https://github.com/allure-framework/allure-java/issues' - } - } - } -} From 8f9880f25ad1dec9401c81b6d85291b52e8a83ca Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Fri, 30 Apr 2021 19:05:59 +0300 Subject: [PATCH 14/23] fix junit5 filter (via #571) --- .../AllurePostDiscoveryFilter.java | 2 +- .../AllureJunitPlatformTestUtils.java | 13 +- .../AllurePostDiscoveryFilterTest.java | 144 +++++++++++------- .../features/FilterParameterizedTests.java | 50 ++++++ .../features/FilterSimpleTests.java | 46 ++++++ 5 files changed, 196 insertions(+), 59 deletions(-) create mode 100644 allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterParameterizedTests.java create mode 100644 allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterSimpleTests.java diff --git a/allure-junit-platform/src/main/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilter.java b/allure-junit-platform/src/main/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilter.java index e43a76230..c66e592de 100644 --- a/allure-junit-platform/src/main/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilter.java +++ b/allure-junit-platform/src/main/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilter.java @@ -56,7 +56,7 @@ public FilterResult apply(final TestDescriptor object) { if (Objects.isNull(testPlan)) { return FilterResult.included("test plan is empty"); } - if (!object.isTest()) { + if (!object.getChildren().isEmpty()) { return FilterResult.included("filter only applied for tests"); } diff --git a/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllureJunitPlatformTestUtils.java b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllureJunitPlatformTestUtils.java index b8d76cd08..b26897f22 100644 --- a/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllureJunitPlatformTestUtils.java +++ b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllureJunitPlatformTestUtils.java @@ -22,11 +22,11 @@ import io.qameta.allure.aspects.StepsAspects; import io.qameta.allure.test.AllureResults; import io.qameta.allure.test.AllureResultsWriterStub; +import io.qameta.allure.testfilter.TestPlan; import org.junit.platform.engine.discovery.ClassSelector; import org.junit.platform.engine.discovery.DiscoverySelectors; import org.junit.platform.launcher.Launcher; import org.junit.platform.launcher.LauncherDiscoveryRequest; -import org.junit.platform.launcher.TestPlan; import org.junit.platform.launcher.core.LauncherConfig; import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder; import org.junit.platform.launcher.core.LauncherFactory; @@ -44,6 +44,11 @@ private AllureJunitPlatformTestUtils() { @Step("Run classes {classes}") public static AllureResults runClasses(final Class... classes) { + return runClasses(null, classes); + } + + @Step("Run classes {classes}") + public static AllureResults runClasses(final TestPlan testPlan, final Class... classes) { final AllureResultsWriterStub writerStub = new AllureResultsWriterStub(); final AllureLifecycle lifecycle = new AllureLifecycle(writerStub); @@ -52,6 +57,7 @@ public static AllureResults runClasses(final Class... classes) { .toArray(ClassSelector[]::new); final LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder.request() + .filters(new AllurePostDiscoveryFilter(testPlan)) .selectors(classSelectors) .build(); @@ -77,8 +83,9 @@ public static AllureResults runClasses(final Class... classes) { } @Step("Build test plan for {classes}") - public static TestPlan buildPlan(final io.qameta.allure.testfilter.TestPlan testPlan, - final Class... classes) { + public static org.junit.platform.launcher.TestPlan buildPlan( + final io.qameta.allure.testfilter.TestPlan testPlan, + final Class... classes) { final ClassSelector[] classSelectors = Stream.of(classes) .map(DiscoverySelectors::selectClass) .toArray(ClassSelector[]::new); diff --git a/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilterTest.java b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilterTest.java index e03a1ec0b..2f7dfc144 100644 --- a/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilterTest.java +++ b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/AllurePostDiscoveryFilterTest.java @@ -15,16 +15,16 @@ */ package io.qameta.allure.junitplatform; -import io.qameta.allure.junitplatform.features.PassedTests; -import io.qameta.allure.junitplatform.features.TestsWithAllureId; +import io.qameta.allure.junitplatform.features.FilterParameterizedTests; +import io.qameta.allure.junitplatform.features.FilterSimpleTests; +import io.qameta.allure.test.AllureResults; +import io.qameta.allure.testfilter.TestPlan; import io.qameta.allure.testfilter.TestPlanV1_0; import org.junit.jupiter.api.Test; -import org.junit.platform.launcher.TestIdentifier; -import org.junit.platform.launcher.TestPlan; import java.util.Arrays; -import static io.qameta.allure.junitplatform.AllureJunitPlatformTestUtils.buildPlan; +import static io.qameta.allure.junitplatform.AllureJunitPlatformTestUtils.runClasses; import static org.assertj.core.api.Assertions.assertThat; /** @@ -34,79 +34,113 @@ public class AllurePostDiscoveryFilterTest { @Test void shouldRunAllTestsIfNoTestPlanProvided() { - final TestPlan testPlan = buildPlan(null, PassedTests.class); + final AllureResults results = runClasses(FilterSimpleTests.class); - final long testsCount = testPlan.countTestIdentifiers(TestIdentifier::isTest); + assertThat(results.getTestResults()) + .hasSize(3); + } + + @Test + void shouldRunAllParameterizedTestsIfNoTestPlanProvided() { + final AllureResults results = runClasses(FilterParameterizedTests.class); - assertThat(testsCount) - .isEqualTo(3); + assertThat(results.getTestResults()) + .hasSize(6); } @Test void shouldRunAllTestsIfEmptyTestPlanProvided() { - final TestPlan testPlan = buildPlan(new TestPlanV1_0(), PassedTests.class); - - final long testsCount = testPlan.countTestIdentifiers(TestIdentifier::isTest); + final AllureResults results = runClasses(new TestPlanV1_0(), FilterSimpleTests.class); + assertThat(results.getTestResults()) + .hasSize(3); + } - assertThat(testsCount) - .isEqualTo(3); + @Test + void shouldRunAllParameterizedTestsIfEmptyTestPlanProvided() { + final AllureResults results = runClasses(new TestPlanV1_0(), FilterParameterizedTests.class); + assertThat(results.getTestResults()) + .hasSize(6); } @Test void shouldFilterTestCasesByFullName() { - final TestPlan testPlan = buildPlan( - new TestPlanV1_0().setTests(Arrays.asList( - new TestPlanV1_0.TestCase() - .setSelector("io.qameta.allure.junitplatform.features.PassedTests.second"), - new TestPlanV1_0.TestCase() - .setSelector("io.qameta.allure.junitplatform.features.PassedTests.first") - )), - PassedTests.class + final TestPlan testPlan = new TestPlanV1_0().setTests(Arrays.asList( + new TestPlanV1_0.TestCase() + .setSelector(String.format("%s.second", FilterSimpleTests.class.getCanonicalName())), + new TestPlanV1_0.TestCase() + .setSelector(String.format("%s.first", FilterSimpleTests.class.getCanonicalName()))) ); - final long testsCount = testPlan.countTestIdentifiers(TestIdentifier::isTest); + final AllureResults results = runClasses(testPlan, FilterSimpleTests.class); + assertThat(results.getTestResults()) + .hasSize(2); + } - assertThat(testsCount) - .isEqualTo(2); + @Test + void shouldFilterParameterizedTestCasesByFullName() { + final TestPlan testPlan = new TestPlanV1_0().setTests(Arrays.asList( + new TestPlanV1_0.TestCase() + .setSelector(String.format("%s.second", FilterParameterizedTests.class.getCanonicalName())), + new TestPlanV1_0.TestCase() + .setSelector(String.format("%s.first", FilterParameterizedTests.class.getCanonicalName())) + )); + + final AllureResults results = runClasses(testPlan, FilterParameterizedTests.class); + assertThat(results.getTestResults()) + .hasSize(4); } @Test void shouldFilterTestCasesByUniqueId() { - final TestPlan testPlan = buildPlan( - new TestPlanV1_0().setTests(Arrays.asList( - new TestPlanV1_0.TestCase() - .setSelector("[engine:junit-jupiter]/[class:io.qameta.allure.junitplatform.features.PassedTests]/[method:second()]"), - new TestPlanV1_0.TestCase() - .setSelector("[engine:junit-jupiter]/[class:io.qameta.allure.junitplatform.features.PassedTests]/[method:third()]") - )), - PassedTests.class - ); - - final long testsCount = testPlan.countTestIdentifiers(TestIdentifier::isTest); - - assertThat(testsCount) - .isEqualTo(2); + final TestPlan testPlan = new TestPlanV1_0().setTests(Arrays.asList( + new TestPlanV1_0.TestCase() + .setSelector(testId(FilterSimpleTests.class, "first")), + new TestPlanV1_0.TestCase() + .setSelector(testId(FilterSimpleTests.class, "third")) + )); + + final AllureResults results = runClasses(testPlan, FilterSimpleTests.class); + assertThat(results.getTestResults()) + .hasSize(2); } @Test void shouldFilterTestCasesByAllureId() { - final TestPlan testPlan = buildPlan( - new TestPlanV1_0().setTests(Arrays.asList( - new TestPlanV1_0.TestCase() - .setId("32"), - new TestPlanV1_0.TestCase() - .setId("34"), - new TestPlanV1_0.TestCase() - .setId("41"), - new TestPlanV1_0.TestCase() - .setId("48") - )), - TestsWithAllureId.class - ); + final TestPlan testPlan = new TestPlanV1_0().setTests(Arrays.asList( + new TestPlanV1_0.TestCase() + .setId("10"), + new TestPlanV1_0.TestCase() + .setId("20"), + new TestPlanV1_0.TestCase() + .setId("30") + )); + + final AllureResults results = runClasses(testPlan, FilterSimpleTests.class); + assertThat(results.getTestResults()) + .hasSize(2); + } + + @Test + void shouldFilterParameterizedTestCasesByAllureId() { + final TestPlan testPlan = new TestPlanV1_0().setTests(Arrays.asList( + new TestPlanV1_0.TestCase() + .setId("10"), + new TestPlanV1_0.TestCase() + .setId("20") + )); + + final AllureResults results = runClasses(testPlan, FilterParameterizedTests.class); + assertThat(results.getTestResults()) + .hasSize(4); + } - final long testsCount = testPlan.countTestIdentifiers(TestIdentifier::isTest); - assertThat(testsCount) - .isEqualTo(3); + private String testId(final Class testClass, String method) { + return String.format("[engine:%s]/[class:%s]/[method:%s()]", + "junit-jupiter", + testClass.getCanonicalName(), + method); } + + } diff --git a/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterParameterizedTests.java b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterParameterizedTests.java new file mode 100644 index 000000000..f7bf17ad1 --- /dev/null +++ b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterParameterizedTests.java @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Qameta Software OÜ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.qameta.allure.junitplatform.features; + +import io.qameta.allure.AllureId; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +/** + * @author charlie (Dmitry Baev). + */ +public class FilterParameterizedTests { + + @BeforeAll + static void doNothing() { + + } + + @AllureId("10") + @ParameterizedTest + @ValueSource(strings = {"a", "b"}) + void first(String value) { + } + + @AllureId("20") + @ParameterizedTest + @ValueSource(strings = {"a", "b"}) + void second(String value) { + } + + @ParameterizedTest + @ValueSource(strings = {"a", "b"}) + void third(String value) { + } + +} diff --git a/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterSimpleTests.java b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterSimpleTests.java new file mode 100644 index 000000000..11ee50512 --- /dev/null +++ b/allure-junit-platform/src/test/java/io/qameta/allure/junitplatform/features/FilterSimpleTests.java @@ -0,0 +1,46 @@ +/* + * Copyright 2019 Qameta Software OÜ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.qameta.allure.junitplatform.features; + +import io.qameta.allure.AllureId; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +/** + * @author charlie (Dmitry Baev). + */ +public class FilterSimpleTests { + + @BeforeAll + static void doNothing(){ + + } + + @Test + @AllureId("10") + void first() { + } + + @Test + @AllureId("20") + void second() { + } + + @Test + void third() { + } + +} From 150dc2cf545745ae4bbdce61f28b2076d0631c54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 19:06:23 +0300 Subject: [PATCH 15/23] bump spotbugs from 3.1.12 to 4.2.3 (via #573) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index b495319c7..e71783c58 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -156,7 +156,7 @@ configure(subprojects) { if (spotbugs != null) { dependencies { spotbugs("org.slf4j:slf4j-simple") - spotbugs("com.github.spotbugs:spotbugs:3.1.12") + spotbugs("com.github.spotbugs:spotbugs:4.2.3") } } } From 2d19782c2020c734c1d16ddd5b843af688cb0f28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 19:06:45 +0300 Subject: [PATCH 16/23] bump jackson-databind from 2.12.2 to 2.12.3 (via #572) --- allure-model/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allure-model/build.gradle.kts b/allure-model/build.gradle.kts index 9b5fb34fd..5d8287fdf 100644 --- a/allure-model/build.gradle.kts +++ b/allure-model/build.gradle.kts @@ -4,7 +4,7 @@ val agent: Configuration by configurations.creating dependencies { agent("org.aspectj:aspectjweaver") - implementation("com.fasterxml.jackson.core:jackson-databind:2.12.2") + implementation("com.fasterxml.jackson.core:jackson-databind:2.12.3") testImplementation("io.github.benas:random-beans") testImplementation("org.assertj:assertj-core") testImplementation("org.junit.jupiter:junit-jupiter-api") From a222e0bc6328629f05707ab44965840b9015d50d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 14:08:09 +0300 Subject: [PATCH 17/23] bump gradle-quality-plugin from 4.5.0 to 4.6.0 (via #575) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index e71783c58..3cf7c43d0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ buildscript { dependencies { classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.4") - classpath("ru.vyarus:gradle-quality-plugin:4.5.0") + classpath("ru.vyarus:gradle-quality-plugin:4.6.0") } } From 97620611a9a6c85fcbdb13bff13dc7285ecff8de Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 10 May 2021 14:31:49 +0300 Subject: [PATCH 18/23] bump release action --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed630f050..edb26b5d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,4 +15,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 + - name: "Set release version in gradle.properties file" + run: | + sed -i -e '/version=/s/.*/version=${{ inputs.releaseVersion }}/g' gradle.properties + cat gradle.properties + - name: "Set next development version in gradle.properties file" + run: | + sed -i -e '/version=/s/.*/version=${{ inputs.nextVersion }}-SNAPSHOT/g' gradle.properties + cat gradle.properties + From 854e43af0f10c45689755d7b65f79d9e2550468c Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 10 May 2021 14:35:24 +0300 Subject: [PATCH 19/23] fix inputs variable --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index edb26b5d9..23fe91550 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,11 +17,11 @@ jobs: - uses: actions/checkout@v2.3.4 - name: "Set release version in gradle.properties file" run: | - sed -i -e '/version=/s/.*/version=${{ inputs.releaseVersion }}/g' gradle.properties + sed -i -e '/version=/s/.*/version=${{ github.event.inputs.releaseVersion }}/g' gradle.properties cat gradle.properties - name: "Set next development version in gradle.properties file" run: | - sed -i -e '/version=/s/.*/version=${{ inputs.nextVersion }}-SNAPSHOT/g' gradle.properties + sed -i -e '/version=/s/.*/version=${{ github.event.inputs.nextVersion }}-SNAPSHOT/g' gradle.properties cat gradle.properties From 65a8bfba1deab07592a09bb1107e2fd26c6cd8d0 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 10 May 2021 14:48:01 +0300 Subject: [PATCH 20/23] set up release workflow --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23fe91550..f8ef4416e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,40 @@ jobs: triage: runs-on: ubuntu-latest steps: + - name: "check releaseVersion" + run: echo "${{ github.event.inputs.releaseVersion }}" | grep -Eq "^\d+\.\d+\.\d+$" + + - name: "check nextVersion" + run: echo "${{ github.event.inputs.nextVersion }}" | grep -Eq "^\d+\.\d+$" + - uses: actions/checkout@v2.3.4 + with: + token: ${{ secrets.QAMETA_CI }} + + - name: Configure CI Git User + run: | + git config --global user.name qameta-ci + git config --global user.email qameta-ci@qameta.io + - name: "Set release version in gradle.properties file" run: | sed -i -e '/version=/s/.*/version=${{ github.event.inputs.releaseVersion }}/g' gradle.properties cat gradle.properties + + - name: "Commit release version and create tag" + run: | + git commit -am "release ${{ github.event.inputs.releaseVersion }}" + git tag ${{ github.event.inputs.releaseVersion }} + git push origin ${{ github.event.inputs.releaseVersion }} + - name: "Set next development version in gradle.properties file" run: | sed -i -e '/version=/s/.*/version=${{ github.event.inputs.nextVersion }}-SNAPSHOT/g' gradle.properties cat gradle.properties + - name: "Commit next development version and push it" + run: | + git commit -am "set next development version ${{ github.event.inputs.releaseVersion }}" + git push origin master + From d54a8a9aebc9c47b9a607152fd35f68a141004f1 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 10 May 2021 15:11:28 +0300 Subject: [PATCH 21/23] fix validations --- .github/workflows/release.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8ef4416e..fbfb94d1b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,17 +14,19 @@ jobs: triage: runs-on: ubuntu-latest steps: - - name: "check releaseVersion" - run: echo "${{ github.event.inputs.releaseVersion }}" | grep -Eq "^\d+\.\d+\.\d+$" + - name: "Check release version" + run: | + [ "${{ github.event.inputs.releaseVersion }}" '=~' '^[0-9]+\.[0-9]+\.[0-9]+$' ] - - name: "check nextVersion" - run: echo "${{ github.event.inputs.nextVersion }}" | grep -Eq "^\d+\.\d+$" + - name: "Check next version" + run: | + [ "${{ github.event.inputs.nextVersion }}" '=~' '^[0-9]+\.[0-9]+$' ] - uses: actions/checkout@v2.3.4 with: token: ${{ secrets.QAMETA_CI }} - - name: Configure CI Git User + - name: "Configure CI Git User" run: | git config --global user.name qameta-ci git config --global user.email qameta-ci@qameta.io From 761039390d54fe72b19eec7644b63b5a6978c902 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 10 May 2021 15:19:21 +0300 Subject: [PATCH 22/23] try to use expr for inputs validation --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbfb94d1b..47a3ff206 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,11 +16,11 @@ jobs: steps: - name: "Check release version" run: | - [ "${{ github.event.inputs.releaseVersion }}" '=~' '^[0-9]+\.[0-9]+\.[0-9]+$' ] + expr "${{ github.event.inputs.releaseVersion }}" : '[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*$' - name: "Check next version" run: | - [ "${{ github.event.inputs.nextVersion }}" '=~' '^[0-9]+\.[0-9]+$' ] + expr "${{ github.event.inputs.nextVersion }}" : '[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*$' - uses: actions/checkout@v2.3.4 with: From f6e13e4d3e6c3a2c4822054e9493a127813139d4 Mon Sep 17 00:00:00 2001 From: qameta-ci Date: Mon, 10 May 2021 12:20:02 +0000 Subject: [PATCH 23/23] release 2.13.10 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1022fe6b1..9ebd5e23f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.14-SNAPSHOT +version=2.13.10 org.gradle.daemon=true org.gradle.parallel=true