From 0822b6b75733ee375822d53ca1e833beaa0715dc Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Fri, 30 Sep 2022 23:32:13 +0300 Subject: [PATCH] Added bom --- .../feature-ci.yml => branch-ci.yml} | 19 ++- .github/workflows/for-library/release-ci.yml | 36 ----- .github/workflows/for-service/ci.yml | 26 ---- .github/workflows/pre-release-ci.yml | 57 ++++++++ .../master-ci.yml => release-ci.yml} | 49 ++++--- pom.xml | 133 ++++++++++++++---- 6 files changed, 206 insertions(+), 114 deletions(-) rename .github/workflows/{for-library/feature-ci.yml => branch-ci.yml} (73%) delete mode 100644 .github/workflows/for-library/release-ci.yml delete mode 100644 .github/workflows/for-service/ci.yml create mode 100644 .github/workflows/pre-release-ci.yml rename .github/workflows/{for-library/master-ci.yml => release-ci.yml} (52%) diff --git a/.github/workflows/for-library/feature-ci.yml b/.github/workflows/branch-ci.yml similarity index 73% rename from .github/workflows/for-library/feature-ci.yml rename to .github/workflows/branch-ci.yml index 8d17da3..b639968 100644 --- a/.github/workflows/for-library/feature-ci.yml +++ b/.github/workflows/branch-ci.yml @@ -1,19 +1,17 @@ -name: Feature Branch CI +name: Branch CI on: push: paths-ignore: - - 'charts/**' - '.github/workflows/**' - - 'README.md' + - '*.md' + - '*.txt' branches-ignore: - - 'master' - - 'develop' - 'release*' jobs: build: - name: Feature Branch CI + name: Branch CI runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -23,12 +21,13 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - name: Set up JDK + - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: - java-version: 17 - - name: Set up Maven - run: cp build.settings.xml ~/.m2/settings.xml + java-version: 1.8 + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN - name: Maven Build run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -Ddockerfile.skip=true -B -V env: diff --git a/.github/workflows/for-library/release-ci.yml b/.github/workflows/for-library/release-ci.yml deleted file mode 100644 index c86d0c3..0000000 --- a/.github/workflows/for-library/release-ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Release CI - -on: - release: - types: [published] - -jobs: - build: - name: Release CI - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 17 - - name: Set up Maven - run: cp build.settings.xml ~/.m2/settings.xml - - name: Deploy release version - run: | - release_version=${{ github.event.release.tag_name }} - echo Release version $release_version - mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false - mvn versions:commit - mvn clean deploy -B -V - env: - GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} - - name: Rollback release (remove tag) - if: failure() - run: git push origin :refs/tags/${{ github.event.release.tag_name }} diff --git a/.github/workflows/for-service/ci.yml b/.github/workflows/for-service/ci.yml deleted file mode 100644 index 284ce57..0000000 --- a/.github/workflows/for-service/ci.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: CI - -on: - push: - branches: [ '**' ] - pull_request: - branches: [ master ] - release: - types: [ published ] - -jobs: - ci: - name: CI - uses: scalecube/.github/.github/workflows/ci.yml@master - secrets: - ORGANIZATION_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} - HELM_REGISTRY_URL: ${{ secrets.HELM_REGISTRY_URL }} - HELM_REGISTRY_USER: ${{ secrets.HELM_REGISTRY_USER }} - HELM_REGISTRY_PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }} - robokit-deploy: - if: github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'master') - needs: ci - runs-on: ubuntu-latest - steps: - - name: Deploy - run: echo 'Robokit Deploy Trigger' diff --git a/.github/workflows/pre-release-ci.yml b/.github/workflows/pre-release-ci.yml new file mode 100644 index 0000000..a7f3588 --- /dev/null +++ b/.github/workflows/pre-release-ci.yml @@ -0,0 +1,57 @@ +name: Pre-release CI + +on: + release: + types: [prereleased] + +jobs: + build: + name: Pre-release CI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up Java for publishing to GitHub Packages + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + - name: Deploy pre-release version to GitHub Packages + run: | + pre_release_version=${{ github.event.release.tag_name }} + echo Pre-release version $pre_release_version + mvn versions:set -DnewVersion=$pre_release_version -DgenerateBackupPoms=false + mvn versions:commit + mvn clean deploy -Pdeploy2Github -B -V + env: + GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Deploy pre-release version to the Maven Central Repository + run: | + pre_release_version=${{ github.event.release.tag_name }} + echo Pre-release version $pre_release_version + mvn versions:set -DnewVersion=$pre_release_version -DgenerateBackupPoms=false + mvn versions:commit + mvn deploy -Pdeploy2Maven -DskipTests -B -V + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + - name: Rollback pre-release (remove tag) + if: failure() + run: git push origin :refs/tags/${{ github.event.release.tag_name }} diff --git a/.github/workflows/for-library/master-ci.yml b/.github/workflows/release-ci.yml similarity index 52% rename from .github/workflows/for-library/master-ci.yml rename to .github/workflows/release-ci.yml index 18a33a6..f4c7b08 100644 --- a/.github/workflows/for-library/master-ci.yml +++ b/.github/workflows/release-ci.yml @@ -1,30 +1,31 @@ -name: Master branch CI +name: Release CI on: - push: - branches: - - 'master' + release: + types: [released] jobs: build: - name: Master Branch CI + name: Release CI runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 + - run: git checkout ${{ github.event.release.target_commitish }} - uses: actions/cache@v1 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - name: Set up JDK + - name: Set up Java for publishing to GitHub Packages uses: actions/setup-java@v1 with: - java-version: 17 - - name: Set up Maven - run: cp build.settings.xml ~/.m2/settings.xml + java-version: 1.8 + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN - name: Maven Build run: mvn clean install -DskipTests=true -Ddockerfile.skip=true -B -V env: @@ -33,10 +34,6 @@ jobs: run: mvn verify -B - name: Configure git run: | - echo "Git checkout branch ${GITHUB_REF##*/}, commit ${GITHUB_SHA} was pushed by ${GITHUB_ACTOR}" - git checkout ${GITHUB_REF##*/} - echo "Git reset hard to ${GITHUB_SHA}" - git reset --hard ${GITHUB_SHA} git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" git config --global user.name "${GITHUB_ACTOR}" - name: Prepare release @@ -44,18 +41,38 @@ jobs: run: | mvn -B build-helper:parse-version release:prepare \ -DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \ - -DdevelopmentVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT \ - -Darguments="-DskipTests=true" + -Darguments="-DskipTests=true -Ddockerfile.skip=true" echo ::set-output name=release_tag::$(git describe --tags --abbrev=0) - name: Perform release - run: mvn -B release:perform -Darguments="-DskipTests=true -Ddocker.image.extra-tag=master" + run: mvn -B release:perform -Pdeploy2Github -Darguments="-DskipTests=true -Ddockerfile.skip=true -Pdeploy2Github" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Deploy release version to the Maven Central Repository + run: | + release_version=$(echo ${{ steps.prepare_release.outputs.release_tag }} | sed "s/release-//") + echo release version $release_version + mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false + mvn versions:commit + mvn deploy -Pdeploy2Maven -DskipTests -B -V + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Rollback release if: failure() run: | mvn release:rollback || echo "nothing to rollback" + git push origin :refs/tags/${{ github.event.release.tag_name }} if [ ! -z "${{ steps.prepare_release.outputs.release_tag }}" ] then git tag -d ${{ steps.prepare_release.outputs.release_tag }} diff --git a/pom.xml b/pom.xml index 334f6cb..bdfa70c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,13 @@ - + 4.0.0 - io.exberry - exchange-parent - 0.35.13 + io.scalecube + scalecube-parent-pom + 0.2.19 - exchange-repository-template + scalecube-bom 0.0.1-SNAPSHOT pom ${project.artifactId} project @@ -18,14 +16,6 @@ github GitHub Packages - https://maven.pkg.github.com/exberry-io/packages - - false - - - - scalecube - Scalecube Packages https://maven.pkg.github.com/scalecube/packages false @@ -33,20 +23,111 @@ - - - github - GitHub Packages - https://maven.pkg.github.com/exberry-io/${project.artifactId} - - - - https://exberry.io/ - scm:git:https://github.com/exberry-io/${project.artifactId}.git - scm:git:https://github.com/exberry-io/${project.artifactId}.git + https://github.com/scalecube/scalecube + scm:git:https://github.com/scalecube/${project.artifactId} + scm:git:https://github.com/scalecube/${project.artifactId} HEAD + + 2.6.12 + 1.0.19 + 2.10.23 + 2.10.13 + 1.0.27 + 0.4.17 + + + + + + io.scalecube + scalecube-services-api + ${scalecube-services.version} + + + io.scalecube + scalecube-services + ${scalecube-services.version} + + + io.scalecube + scalecube-services-discovery + ${scalecube-services.version} + + + io.scalecube + scalecube-services-transport-rsocket + ${scalecube-services.version} + + + io.scalecube + scalecube-services-transport-jackson + ${scalecube-services.version} + + + io.scalecube + scalecube-services-bytebuf-codec + ${scalecube-services.version} + + + io.scalecube + scalecube-services-gateway-netty + ${scalecube-gateway.version} + + + io.scalecube + scalecube-services-gateway-client-transport + ${scalecube-gateway.version} + + + io.scalecube + scalecube-services-security + ${scalecube-services.version} + + + io.scalecube + scalecube-codec-jackson + ${scalecube-cluster.version} + + + io.scalecube + scalecube-transport-netty + ${scalecube-cluster.version} + + + io.scalecube + scalecube-config + ${scalecube-config.version} + + + io.scalecube + scalecube-config-vault + ${scalecube-config.version} + + + io.scalecube + scalecube-security-jwt + ${scalecube-security.version} + + + io.scalecube + scalecube-security-tokens + ${scalecube-security.version} + + + io.scalecube + scalecube-security-vault + ${scalecube-security.version} + + + io.scalecube + scalecube-commons + ${scalecube-commons.version} + + + +