From 2b3a61663f9bad9cbf998528c2694d6101592d55 Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Mon, 21 Sep 2020 12:27:04 +0300 Subject: [PATCH] Updated parent pom + workflows; removed travis support --- .editorconfig | 9 +++++ .gitattributes | 10 +++++ .github/workflows/branch-ci.yml | 36 +++++++++++++++++ .github/workflows/pre-release-ci.yml | 37 +++++++++++++++++ .github/workflows/release-ci.yml | 60 ++++++++++++++++++++++++++++ .gitignore | 41 +++++-------------- .travis.yml | 22 ---------- .yamllint.yml | 17 ++++++++ LICENSE => LICENSE.txt | 6 +-- pom.xml | 31 +++++++++++--- travis-settings.xml | 55 ------------------------- 11 files changed, 207 insertions(+), 117 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/workflows/branch-ci.yml create mode 100644 .github/workflows/pre-release-ci.yml create mode 100644 .github/workflows/release-ci.yml delete mode 100644 .travis.yml create mode 100644 .yamllint.yml rename LICENSE => LICENSE.txt (99%) delete mode 100644 travis-settings.xml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..86a63dc0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..ae7194dd --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# Auto detect text files and perform LF normalization +* text=auto +*.txt text +*.sh text eol=lf +*.html text eol=lf diff=html +*.css text eol=lf +*.js text eol=lf +*.jpg -text +*.pdf -text +*.java text diff=java diff --git a/.github/workflows/branch-ci.yml b/.github/workflows/branch-ci.yml new file mode 100644 index 00000000..b6399688 --- /dev/null +++ b/.github/workflows/branch-ci.yml @@ -0,0 +1,36 @@ +name: Branch CI + +on: + push: + paths-ignore: + - '.github/workflows/**' + - '*.md' + - '*.txt' + branches-ignore: + - 'release*' + +jobs: + build: + name: Branch 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 1.8 + uses: actions/setup-java@v1 + with: + 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: + GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} + - name: Maven Verify + run: mvn verify -B diff --git a/.github/workflows/pre-release-ci.yml b/.github/workflows/pre-release-ci.yml new file mode 100644 index 00000000..664e97c9 --- /dev/null +++ b/.github/workflows/pre-release-ci.yml @@ -0,0 +1,37 @@ +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 JDK 1.8 + 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 + 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 -B -V + env: + GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} + - name: Rollback pre-release (remove tag) + if: failure() + run: git push origin :refs/tags/${{ github.event.release.tag_name }} diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml new file mode 100644 index 00000000..d674150d --- /dev/null +++ b/.github/workflows/release-ci.yml @@ -0,0 +1,60 @@ +name: Release CI + +on: + release: + types: [released] + +jobs: + build: + 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 1.8 + uses: actions/setup-java@v1 + with: + 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: + GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} + - name: Maven Verify + run: mvn verify -B + - name: Configure git + run: | + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "${GITHUB_ACTOR}" + - name: Prepare release + id: prepare_release + run: | + mvn -B build-helper:parse-version release:prepare \ + -DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \ + -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 -Ddockerfile.skip=true" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} + - 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 }} + git push origin :refs/tags/${{ steps.prepare_release.outputs.release_tag }} + fi diff --git a/.gitignore b/.gitignore index 14876986..7cab252e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,13 @@ -# Eclipse project files -.project -.classpath -.settings - -# IntelliJ IDEA project files and directories +.* +!.gitignore +!.gitattributes +!.github +!.editorconfig +!.*.yml +!.env.example +**/target/ *.iml -*.ipr -*.iws -.idea/ - -# Geany project file -.geany - -# KDevelop project file and directory -.kdev4/ -*.kdev4 - -# Build targets -/target -*/target - -# Report directories -/reports -*/reports +**/logs/*.log +*.db *.csv *.log -*.zip - -# Mac-specific directory that no other operating system needs. -.DS_Store - -# JVM crash logs -hs_err_pid*.log \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7a3a6477..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -addons: - apt: - packages: - - libxml-xpath-perl -sudo: required -language: java -jdk: openjdk8 -before_install: -- "./src/main/scripts/ci/before-install.sh" -- "./src/main/scripts/cd/before-deploy.sh" -after_success: "./src/main/scripts/ci/after-success.sh" -deploy: -- provider: script - script: - - "./src/main/scripts/cd/deploy.sh" - on: - branch: develop -- provider: script - script: - - "./src/main/scripts/cd/release.sh" - on: - branch: master diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 00000000..f43e7a0e --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,17 @@ +extends: default +rules: + document-start: + present: false + truthy: disable + comments: + min-spaces-from-content: 1 + line-length: + max: 150 + braces: + min-spaces-inside: 0 + max-spaces-inside: 0 + brackets: + min-spaces-inside: 0 + max-spaces-inside: 0 + indentation: + indent-sequences: consistent diff --git a/LICENSE b/LICENSE.txt similarity index 99% rename from LICENSE rename to LICENSE.txt index 8f71f43f..d6456956 100644 --- a/LICENSE +++ b/LICENSE.txt @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -199,4 +200,3 @@ 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. - diff --git a/pom.xml b/pom.xml index c6fd972e..29a06807 100644 --- a/pom.xml +++ b/pom.xml @@ -1,23 +1,42 @@ - + 4.0.0 io.scalecube scalecube-parent-pom - 0.0.19 + 0.2.17 - reactor-aeron-parent 0.1.5-SNAPSHOT pom + ScaleCube/ReactorAeron + + + + github + GitHub Packages + https://maven.pkg.github.com/scalecube/packages + + false + + + - ScaleCube/scalecube-reactor-aeron + + + github + GitHub Packages + https://maven.pkg.github.com/scalecube/reactor-aeron + + https://github.com/scalecube/scalecube - scm:git:git@github.com:scalecube/reactor-aeron.git - scm:git:git@github.com:scalecube/reactor-aeron.git + scm:git:https://github.com/scalecube/reactor-aeron.git + scm:git:https://github.com/scalecube/reactor-aeron.git HEAD diff --git a/travis-settings.xml b/travis-settings.xml deleted file mode 100644 index 921c4a3f..00000000 --- a/travis-settings.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - skipstyle - - true - - - - skippmd - - true - - - - bintray - - - central - bintray - http://jcenter.bintray.com - - false - - - - - - ossrh - - ${env.GPG_KEY} - - - - - - ossrh - ${env.SONATYPE_USERNAME} - ${env.SONATYPE_PASSWORD} - - - docker.io - ${env.DOCKER_USERNAME} - ${env.DOCKER_PASSWORD} - - - - bintray - ossrh - -