From 7c4795c1a9588aa75b85eac02a77916cae079c92 Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Wed, 13 Apr 2022 13:17:46 +0000 Subject: [PATCH 1/4] [Gradle Release Plugin] - new version commit: '5.7.1'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c705c80..b02c10c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=5.7.0 \ No newline at end of file +version=5.7.1 \ No newline at end of file From e0111e31d1bfdf62c0779fe273d2ac77f009b4e6 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Tue, 4 Oct 2022 09:33:02 +0300 Subject: [PATCH 2/4] EPMRPP-78476 || Add promote task --- .github/workflows/promote.yml | 101 ++++++++++++++++++++++++++++++++++ build.gradle | 1 + 2 files changed, 102 insertions(+) create mode 100644 .github/workflows/promote.yml diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml new file mode 100644 index 0000000..0174d39 --- /dev/null +++ b/.github/workflows/promote.yml @@ -0,0 +1,101 @@ +# Copyright 2021 EPAM Systems +# 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. + +name: Promote + +on: + workflow_dispatch: + inputs: + version: + description: 'Release version' + required: true + +env: + REPOSITORY_URL: 'https://maven.pkg.github.com' + UPSTREAM_REPOSITORY_URL: 'https://oss.sonatype.org' + PACKAGE_SUFFIXES: '-javadoc.jar,-javadoc.jar.asc,-sources.jar,-sources.jar.asc,.jar,.jar.asc,.pom,.pom.asc' + PACKAGE: 'com.epam.reportportal' + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Get variables + run: | + echo "ARTIFACT=`echo ${{ github.repository }} | cut -d/ -f2- | awk '{print tolower($0)}'`" >> $GITHUB_ENV + echo "PACKAGE_PATH=`echo ${{ env.PACKAGE }} | sed 's/\./\//g'`" >> $GITHUB_ENV + - name: Upload package + run: | + IFS=',' read -a files <<< '${{ env.PACKAGE_SUFFIXES }}' + for f in ${files[@]}; do + export URL="${{ env.REPOSITORY_URL }}/${{ github.repository }}/${PACKAGE_PATH}/${ARTIFACT}/${{ github.event.inputs.version }}/${ARTIFACT}-${{ github.event.inputs.version }}${f}" + echo "Downloading artifact: ${URL}" + curl -f -u ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} -s -O -L "${URL}" + done + files=($(ls)) + echo 'Files downloaded:' + echo "${files[@]}" + echo 'Bundle generation' + export BUNDLE_FILE="bundle.jar" + jar -cvf ${BUNDLE_FILE} "${files[@]}" + echo 'Bundle upload' + curl -f -u ${{ secrets.SONATYPE_USER }}:${{ secrets.SONATYPE_PASSWORD }} -L \ + --request POST '${{ env.UPSTREAM_REPOSITORY_URL }}/service/local/staging/bundle_upload' \ + --form "file=@${BUNDLE_FILE}" >response.json + response_type=`jq type response.json || echo ''` + if [ -z "$response_type" ]; then + echo 'ERROR: Response is not JSON!' 1>&2 + cat response.json 1>&2 + exit 1 + fi + repo=`jq -r '.repositoryUris[0]' response.json` + if [ -z "$repo" ]; then + echo 'Unable to upload bundle' 1>&2 + cat response.json 1>&2 + exit 1 + fi + echo "NEXUS_REPOSITORY=${repo}" >> $GITHUB_ENV + - name: Get repository variables + run: | + echo "NEXUS_REPOSITORY_NAME=`echo ${NEXUS_REPOSITORY} | sed -E 's/(.+)\/([^\/]+)$/\2/'`" >> $GITHUB_ENV + - name: Promote package + env: + ATTEMPTS: 60 + SLEEP_TIME: 10 + run: | + verified=false + for i in `seq 0 ${ATTEMPTS}`; do + sleep $SLEEP_TIME + curl -f -s -u ${{ secrets.SONATYPE_USER }}:${{ secrets.SONATYPE_PASSWORD }} -L \ + --header 'Accept: application/json' \ + ${{ env.UPSTREAM_REPOSITORY_URL }}/service/local/staging/repository/${NEXUS_REPOSITORY_NAME} >result.json + is_closed=`jq -r '.type' result.json` + is_transitioning=`jq -r '.transitioning' result.json` + echo "Current repository status: $is_closed; transitioning: $is_transitioning" + if [[ "$is_closed" == "closed" && "$is_transitioning" == "false" ]]; then + verified=true + break + fi + done + if $verified; then + echo "A bundle was verified, releasing" + curl -f -u ${{ secrets.SONATYPE_USER }}:${{ secrets.SONATYPE_PASSWORD }} -L \ + --header 'Content-Type: application/json' \ + --data-raw "{\"data\":{\"stagedRepositoryIds\":[\"${NEXUS_REPOSITORY_NAME}\"], \"description\":\"Releasing ${{ github.event.inputs.version }}\"}}" \ + --request POST ${{ env.UPSTREAM_REPOSITORY_URL }}/service/local/staging/bulk/promote + else + echo 'Verification failed, please check the bundle' 1>&2 + exit 1 + fi diff --git a/build.gradle b/build.gradle index c399f00..83f08a5 100644 --- a/build.gradle +++ b/build.gradle @@ -72,6 +72,7 @@ jar { } shadowJar { + archiveClassifier.set(null) zip64 true dependencies { include(dependency('com.saucelabs:saucerest:1.0.43')) From c269cd9da9bdb03fc233cd20afd3716cf53957f1 Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Tue, 4 Oct 2022 09:40:13 +0000 Subject: [PATCH 3/4] [Gradle Release Plugin] - new version commit: '5.7.2'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b02c10c..93e2ef0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=5.7.1 \ No newline at end of file +version=5.7.2 \ No newline at end of file From 569ac037027493a8b50ac0bebf7ce722e8df385c Mon Sep 17 00:00:00 2001 From: Pavel Bortnik Date: Wed, 20 Dec 2023 00:38:28 +0300 Subject: [PATCH 4/4] rc/5.11.0 || Update release version --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 4 ++-- build.gradle | 21 ++++++------------ gradle.properties | 2 +- 4 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/build.yml 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