From 54480e52a50e58e582c9404950cd74891ff90ae4 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 30 Apr 2023 12:51:32 +0300 Subject: [PATCH 01/13] fix version output (via #305) --- .github/workflows/release.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4047763..08e6887 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,18 +14,14 @@ jobs: distribution: 'zulu' java-version: '8' cache: 'maven' - - run: echo "::set-output name=name::${GITHUB_REF:10}" - id: version - - name: Update Version - run: ./mvnw versions:set -DnewVersion=${{ steps.version.outputs.name }} - - name: Build Package - run: ./mvnw package - - name: Upload Package - uses: actions/upload-release-asset@v1 + - run: echo "VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV + - run: ./mvnw versions:set -DnewVersion=${{ env.VERSION }} + - run: ./mvnw package + - uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ./target/allure-bamboo-${{ steps.version.outputs.name }}.jar - asset_name: allure-bamboo-${{ steps.version.outputs.name }}.jar + asset_path: ./target/allure-bamboo-${{ env.VERSION }}.jar + asset_name: allure-bamboo-${{ env.VERSION }}.jar asset_content_type: application/octet-stream From f1f491671a210b024421ed297af58d3c03dba45d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 12:57:45 +0300 Subject: [PATCH 02/13] Bump jackson-dataformat-yaml from 2.14.2 to 2.15.2 (#308) Bumps [jackson-dataformat-yaml](https://github.com/FasterXML/jackson-dataformats-text) from 2.14.2 to 2.15.2. - [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.14.2...jackson-dataformats-text-2.15.2) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 84d0a15..6a9efa0 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml - 2.14.2 + 2.15.2 provided From ef9d4a257baa0a1f78460b814e954f5b24666e7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:23:40 +0300 Subject: [PATCH 03/13] Bump slf4j.version from 1.7.36 to 2.0.7 (#299) Bumps `slf4j.version` from 1.7.36 to 2.0.7. Updates `slf4j-api` from 1.7.36 to 2.0.7 - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.7) Updates `slf4j-reload4j` from 1.7.36 to 2.0.7 - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.7) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-major - dependency-name: org.slf4j:slf4j-reload4j dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6a9efa0..88d4e6a 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ 2.0.2 1.2.13 ${project.groupId}.${project.artifactId} - 1.7.36 + 2.0.7 1.8 1.8 1.8 From 46730ec8a3a7f81bc373630629f6f4c7553a312e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:24:17 +0300 Subject: [PATCH 04/13] Bump atlassian-template-renderer-api from 1.0.5 to 5.0.4 (#301) Bumps [atlassian-template-renderer-api](https://bitbucket.org/atlassian/atlassian-template-renderer) from 1.0.5 to 5.0.4. - [Changelog](https://bitbucket.org/atlassian/atlassian-template-renderer/src/master/CHANGELOG.md) - [Commits](https://bitbucket.org/atlassian/atlassian-template-renderer/branches/compare/atlassian-template-renderer-5.0.4..atlassian-template-renderer-1.0.5) --- updated-dependencies: - dependency-name: com.atlassian.templaterenderer:atlassian-template-renderer-api dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 88d4e6a..6c7e61c 100644 --- a/pom.xml +++ b/pom.xml @@ -122,7 +122,7 @@ com.atlassian.templaterenderer atlassian-template-renderer-api - 1.0.5 + 5.0.4 provided From 52cfb84b4d1692e5e68790b271675a704186d090 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:24:48 +0300 Subject: [PATCH 05/13] Bump spotbugs-maven-plugin from 4.7.3.3 to 4.7.3.5 (#309) Bumps [spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.7.3.3 to 4.7.3.5. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.7.3.3...spotbugs-maven-plugin-4.7.3.5) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c7e61c..0d0e422 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.3 + 4.7.3.5 .mvn/quality-configs/spotbugs/include.xml .mvn/quality-configs/spotbugs/exclude.xml From 0d984e0ba5c0433d7bf6dbb3684e4887888868eb Mon Sep 17 00:00:00 2001 From: ARUS2023 <145485937+ARUS2023@users.noreply.github.com> Date: Thu, 19 Oct 2023 05:26:06 -0500 Subject: [PATCH 06/13] Removed 1 unnecessary stubbing in AllureExecutableProviderTest.java (#313) --- .../bamboo/AllureExecutableProviderTest.java | 24 ----- .../SecondAllureExecutableProviderTest.java | 90 +++++++++++++++++++ 2 files changed, 90 insertions(+), 24 deletions(-) create mode 100644 src/test/java/io/qameta/allure/bamboo/SecondAllureExecutableProviderTest.java diff --git a/src/test/java/io/qameta/allure/bamboo/AllureExecutableProviderTest.java b/src/test/java/io/qameta/allure/bamboo/AllureExecutableProviderTest.java index d104320..e41d61d 100644 --- a/src/test/java/io/qameta/allure/bamboo/AllureExecutableProviderTest.java +++ b/src/test/java/io/qameta/allure/bamboo/AllureExecutableProviderTest.java @@ -28,8 +28,6 @@ import static io.qameta.allure.bamboo.AllureExecutableProvider.DEFAULT_VERSION; import static io.qameta.allure.bamboo.AllureExecutableProvider.getAllureSubDir; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -95,28 +93,6 @@ public void itShouldProvideTheGivenVersionWithMilestone() throws Exception { verify(downloader).downloadAndExtractAllureTo(binaryDir, "2.0-BETA4"); } - @Test - public void itShouldProvideExecutableForUnix() throws Exception { - when(cmdLine.hasCommand(allureCmdPath.toString())).thenReturn(true); - when(cmdLine.isWindows()).thenReturn(false); - - final Optional res = provide("Allure 2.0-BETA5"); - - assertThat(res.isPresent(), equalTo(true)); - assertThat(res.get().getCmdPath(), equalTo(allureCmdPath)); - } - - @Test - public void itShouldProvideExecutableForWindows() throws Exception { - when(cmdLine.hasCommand(allureBatCmdPath.toString())).thenReturn(true); - when(cmdLine.isWindows()).thenReturn(true); - - final Optional res = provide(ALLURE_2_0_0); - - assertThat(res.isPresent(), equalTo(true)); - assertThat(res.get().getCmdPath(), equalTo(allureBatCmdPath)); - } - private Optional provide(String executableName) { when(executablesManager.getExecutableByName(executableName)).thenReturn(Optional.of(homeDir)); return provider.provide(config, executableName); diff --git a/src/test/java/io/qameta/allure/bamboo/SecondAllureExecutableProviderTest.java b/src/test/java/io/qameta/allure/bamboo/SecondAllureExecutableProviderTest.java new file mode 100644 index 0000000..08a2993 --- /dev/null +++ b/src/test/java/io/qameta/allure/bamboo/SecondAllureExecutableProviderTest.java @@ -0,0 +1,90 @@ +/* + * Copyright 2016-2023 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.bamboo; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoRule; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Optional; + +import static io.qameta.allure.bamboo.AllureExecutableProvider.getAllureSubDir; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.when; +import static org.mockito.junit.MockitoJUnit.rule; + +public class SecondAllureExecutableProviderTest { + + private static final String ALLURE_2_0_0 = "Allure 2.0.0"; + private static final String EXECUTABLE_NAME_2_0_0 = "2.0.0"; + private static final String BIN = "bin"; + private final String homeDir = "/home/allure"; + private final String binaryDir = Paths.get(this.homeDir, getAllureSubDir()).toString(); + + @Rule + public MockitoRule mockitoRule = rule(); + @Mock + private BambooExecutablesManager executablesManager; + @Mock + private AllureDownloader downloader; + @Mock + private AllureCommandLineSupport cmdLine; + @InjectMocks + private AllureExecutableProvider provider; + private AllureGlobalConfig config; + private Path allureCmdPath; + private Path allureBatCmdPath; + + @Before + public void setUp() throws Exception { + config = new AllureGlobalConfig(); + allureCmdPath = Paths.get(binaryDir, BIN, "allure"); + allureBatCmdPath = Paths.get(binaryDir, BIN, "allure.bat"); + } + + @Test + public void itShouldProvideExecutableForUnix() throws Exception { + when(cmdLine.hasCommand(allureCmdPath.toString())).thenReturn(true); + when(cmdLine.isWindows()).thenReturn(false); + + final Optional res = provide("Allure 2.0-BETA5"); + + assertThat(res.isPresent(), equalTo(true)); + assertThat(res.get().getCmdPath(), equalTo(allureCmdPath)); + } + + @Test + public void itShouldProvideExecutableForWindows() throws Exception { + when(cmdLine.hasCommand(allureBatCmdPath.toString())).thenReturn(true); + when(cmdLine.isWindows()).thenReturn(true); + + final Optional res = provide(ALLURE_2_0_0); + + assertThat(res.isPresent(), equalTo(true)); + assertThat(res.get().getCmdPath(), equalTo(allureBatCmdPath)); + } + + private Optional provide(String executableName) { + when(executablesManager.getExecutableByName(executableName)).thenReturn(Optional.of(homeDir)); + return provider.provide(config, executableName); + } +} From 502f4943c4415f34686859d0d291dda4ad17544c Mon Sep 17 00:00:00 2001 From: ARUS2023 <145485937+ARUS2023@users.noreply.github.com> Date: Thu, 19 Oct 2023 05:26:32 -0500 Subject: [PATCH 07/13] Removed 1 unnecessary stubbing in AllureExecutableTest.java (#314) --- .../java/io/qameta/allure/bamboo/AllureExecutableTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/java/io/qameta/allure/bamboo/AllureExecutableTest.java b/src/test/java/io/qameta/allure/bamboo/AllureExecutableTest.java index 92143ee..492a467 100644 --- a/src/test/java/io/qameta/allure/bamboo/AllureExecutableTest.java +++ b/src/test/java/io/qameta/allure/bamboo/AllureExecutableTest.java @@ -26,7 +26,6 @@ import static com.google.common.io.Files.createTempDir; import static java.util.Collections.singleton; -import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.junit.MockitoJUnit.rule; @@ -53,8 +52,6 @@ public void setUp() throws Exception { executable = new AllureExecutable(path, cmdLine); fromDir = createTempDir().toPath(); toDir = createTempDir().toPath(); - when(cmdLine.parseGenerateOutput(anyString())) - .thenReturn(new AllureGenerateResult("", true)); } @Test From 4d64e6f7704026583ab36f604c75119b289da903 Mon Sep 17 00:00:00 2001 From: Vitalii Bragin Date: Thu, 19 Oct 2023 17:56:08 +0300 Subject: [PATCH 08/13] Fix version 9 (#322) * remove provided scope * change bamboo version --- pom.xml | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 0d0e422..7c1bb80 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 io.qameta.allure allure-bamboo - 1.16.0-SNAPSHOT + 1.17.0-SNAPSHOT Allure for Bamboo Allure reports right in deployment plans in Bamboo atlassian-plugin @@ -17,7 +17,7 @@ 2.2.0 8.1.1 - 8.1.1 + 9.0.4 ${bamboo.version} 2.0.2 1.2.13 @@ -51,13 +51,11 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml 2.15.2 - provided com.fasterxml.jackson.core jackson-databind 2.14.2 - provided com.atlassian.bamboo @@ -376,26 +374,6 @@ - - org.owasp - dependency-check-maven - 8.2.1 - - true - - https://dcapt-downloads.s3.amazonaws.com/atlassian-security-scanner-dc-apps-suppressions.xml - - - - - validate - validate - - check - - - - com.atlassian.maven.plugins bamboo-maven-plugin From 6ec4de50d6867026c2d74beb3068ffd84040216a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:08:11 +0300 Subject: [PATCH 09/13] Bump slf4j.version from 2.0.7 to 2.0.9 (#317) Bumps `slf4j.version` from 2.0.7 to 2.0.9. Updates `org.slf4j:slf4j-api` from 2.0.7 to 2.0.9 Updates `org.slf4j:slf4j-reload4j` from 2.0.7 to 2.0.9 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.slf4j:slf4j-reload4j dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c1bb80..7a22fe8 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ 2.0.2 1.2.13 ${project.groupId}.${project.artifactId} - 2.0.7 + 2.0.9 1.8 1.8 1.8 From 305923718c7c9b1c9f0544b97214c8db126ae855 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:08:41 +0300 Subject: [PATCH 10/13] Bump com.fasterxml.jackson.core:jackson-databind from 2.14.2 to 2.15.3 (#321) Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.14.2 to 2.15.3. - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7a22fe8..a8aeade 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ com.fasterxml.jackson.core jackson-databind - 2.14.2 + 2.15.3 com.atlassian.bamboo From 6a180a041ac406579ef148ffd417a588c0d4ccd3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:09:13 +0300 Subject: [PATCH 11/13] Bump org.apache.maven.plugins:maven-compiler-plugin from 3.8.1 to 3.11.0 (#320) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8aeade..ca344ca 100644 --- a/pom.xml +++ b/pom.xml @@ -390,7 +390,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 ${compiler.version} ${compiler.version} From cb35b072ceacb3a46e9082e59eba4a04f8df4e86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:09:37 +0300 Subject: [PATCH 12/13] Bump com.github.spotbugs:spotbugs-maven-plugin from 4.7.3.5 to 4.7.3.6 (#319) Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.7.3.5 to 4.7.3.6. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.7.3.5...spotbugs-maven-plugin-4.7.3.6) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca344ca..0f07e49 100644 --- a/pom.xml +++ b/pom.xml @@ -358,7 +358,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.5 + 4.7.3.6 .mvn/quality-configs/spotbugs/include.xml .mvn/quality-configs/spotbugs/exclude.xml From 6a6dd097fa8ddd346693f55b4e49ed5bb2dc8e13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:16:25 +0300 Subject: [PATCH 13/13] Bump com.atlassian.maven.plugins:bamboo-maven-plugin (#318) Bumps com.atlassian.maven.plugins:bamboo-maven-plugin from 8.1.1 to 8.11.4. --- updated-dependencies: - dependency-name: com.atlassian.maven.plugins:bamboo-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f07e49..1115e9f 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 2.2.0 - 8.1.1 + 8.11.4 9.0.4 ${bamboo.version} 2.0.2