diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a508772 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build + +on: + pull_request: + push: + branches: + - master + - develop + paths-ignore: + - '.github/**' + - README.md + - gradle.properties + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup git credentials + uses: oleksiyrudenko/gha-git-credentials@v2 + with: + name: 'reportportal.io' + email: 'support@reportportal.io' + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build with Gradle + id: build + run: | + ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bcdf20e..d9c3aac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,8 @@ on: env: GH_USER_NAME: github.actor - SCRIPTS_VERSION: 5.7.0 - BOM_VERSION: 5.7.0 + SCRIPTS_VERSION: 5.10.0 + BOM_VERSION: 5.11.0 jobs: release: diff --git a/build.gradle b/build.gradle index 83f08a5..584e3ac 100644 --- a/build.gradle +++ b/build.gradle @@ -22,26 +22,17 @@ sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 repositories { - mavenCentral() maven { url "https://m2proxy.atlassian.com/repository/public" } - if (releaseMode) { - dependencyRepos.forEach { path -> - maven { - setUrl("https://maven.pkg.github.com/reportportal/${path}") - credentials { - username = findProperty("githubUserName") - password = findProperty("githubToken") - } - } - } - } else { + mavenCentral { url "https://repo1.maven.org/maven2" } + + if (!releaseMode) { maven { url 'https://jitpack.io' } } } dependencyManagement { imports { - mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + getProperty('bom.version') : 'com.github.reportportal:commons-bom:5.7.0') + mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + getProperty('bom.version') : 'com.epam.reportportal:commons-bom:5.11.0') } } @@ -50,8 +41,8 @@ dependencies { implementation 'com.epam.reportportal:plugin-api' annotationProcessor 'com.epam.reportportal:plugin-api' } else { - implementation 'com.github.reportportal:plugin-api:886ac55' - annotationProcessor 'com.github.reportportal:plugin-api:886ac55' + implementation 'com.epam.reportportal:plugin-api' + annotationProcessor 'com.epam.reportportal:plugin-api' } implementation 'com.saucelabs:saucerest:1.0.43' } diff --git a/gradle.properties b/gradle.properties index 93e2ef0..0cfca58 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=5.7.2 \ No newline at end of file +version=5.11.0 \ No newline at end of file diff --git a/src/main/java/com/epam/reportportal/saucelabs/SaucelabsExtension.java b/src/main/java/com/epam/reportportal/saucelabs/SaucelabsExtension.java index 7fb0067..73b0628 100644 --- a/src/main/java/com/epam/reportportal/saucelabs/SaucelabsExtension.java +++ b/src/main/java/com/epam/reportportal/saucelabs/SaucelabsExtension.java @@ -21,16 +21,15 @@ import com.epam.reportportal.extension.ReportPortalExtensionPoint; import com.google.common.collect.ImmutableMap; import com.saucelabs.saucerest.DataCenter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.Collectors; import org.jasypt.util.text.BasicTextEncryptor; import org.pf4j.Extension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Service; - -import java.util.*; -import java.util.function.Supplier; -import java.util.stream.Collectors; /** * @author Pavel Bortnik @@ -38,6 +37,8 @@ @Extension public class SaucelabsExtension implements ReportPortalExtensionPoint { + private static final String DOCUMENTATION_LINK_FIELD = "documentationLink"; + private static final String DOCUMENTATION_LINK = "https://reportportal.io/docs/plugins/SauceLabs"; static final String JOB_ID = "jobId"; private final Supplier>> pluginCommandMapping = new MemoizingSupplier<>(this::getCommands); @@ -56,6 +57,7 @@ public SaucelabsExtension() { public Map getPluginParams() { Map params = new HashMap<>(); params.put(ALLOWED_COMMANDS, new ArrayList<>(pluginCommandMapping.get().keySet())); + params.put(DOCUMENTATION_LINK_FIELD, DOCUMENTATION_LINK); params.put("dataCenters", Arrays.stream(DataCenter.values()).map(Enum::toString).collect(Collectors.toList())); return params; }