From b6bc1bcbb21745e2648dd882555202dc6be8d87b Mon Sep 17 00:00:00 2001 From: Todd Underwood Date: Tue, 17 Nov 2020 10:15:30 -0800 Subject: [PATCH] Initial Commit of Migration to GH Actions (#60) * Migration to GH Actions and upgrade of Jetty --- .github/dependabot.yml | 12 --------- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ .travis.yml | 21 ---------------- README.md | 2 +- gradle.properties | 2 +- gradle/dependencies.gradle | 4 +-- 7 files changed, 98 insertions(+), 37 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c74d10c..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "gradle" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "daily" - target-branch: "dep/try_dependabot" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..189c845 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Build + +on: + push: + branches: + - '*' + pull_request: + branches: + - master + schedule: + - cron: "0 22 * * 1" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew assemble + - name: Test with Gradle + run: ./gradlew check + - name: Upload coverage report to CodeCov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + file: ./build/reports/cobertura/coverage.xml # optional + fail_ci_if_error: true # optional (default = false) + verbose: true + - name: Slack notification when master build fails + if: ${{ failure() && github.ref == 'refs/heads/master'}} + uses: rtCamp/action-slack-notify@v2.1.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: cerberus-alerts + SLACK_MESSAGE: 'Cerberus main build has failed :build-failed:' + SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + SLACK_TITLE: Cerberus Build Failure Notification + SLACK_USERNAME: GitHub Actions \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9df0fad --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Release + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 +jobs: + Build-and-Release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew assemble + - name: Test with Gradle + run: ./gradlew check + - name: Upload coverage report to CodeCov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + file: ./build/reports/cobertura/coverage.xml # optional + fail_ci_if_error: true # optional (default = false) + verbose: true + - name: Release artifact to Bintray + env: + BINTRAY_USER: ${{ secrets.BINTRAY_USER }} + BINTRAY_KEY: ${{ secrets.BINTRAY_KEY}} + run: ./gradlew bintrayUpload + - name: Slack notification when release fails + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2.1.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: cerberus-alerts + SLACK_MESSAGE: 'Cerberus release workflow has failed :build-failed:' + SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + SLACK_TITLE: Cerberus Build Failure Notification + SLACK_USERNAME: GitHub Actions \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d021136..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: java -jdk: -- openjdk8 -cache: - directories: - - "$HOME/.m2" -after_success: -- "./gradlew cobertura coveralls --stacktrace" -- test "${TRAVIS_PULL_REQUEST}" == "false" && test "${TRAVIS_TAG}" != "" && ./gradlew - bintrayUpload --stacktrace -env: - global: - - secure: LQy3Z6osgiB10IT6HjUyMidA3QSO1dy7GalCy5wT6inGBmAto9Q92nQzk1CnIsFEebvayaephuzhqYTxs3xT8ZPv8VmVk5p2eceiRY8K+KrHcPIMqkbESOyoXJWpv5DWv6dsyOazdYdh9GQJBN4y3/dvJOAhSkMGSpZGv85T36EWmTS2Zhc5G/ZyibEMGHfhQ4AMMHIHUHsTVgca+T2ddaDmjrDJwAXmE4MYLhGn2PexRfzFuAVJMl14ZMwkwJD6qExWpKZ7jq5SnvHWIahiofVScimCPdKg8LwoaexV96wUNOTzkkNlWZYyqMoSAGZLlBW5h8XyXtbPjPqViYR4ocDOwdyK7A38xU6jH9G9E41VqqwZk3ny4sujgti1OrxMOAieZA4jQE3gL1H11soJM4sZlg53yw5yZGaiR033xbZ/QMrjG3V1F6pBNW9UBZZh9uFgDTgqUU8z41QEHsCZBG6cWEIIZPFhHloampQtOkdFEoCifzuR4hKLacibHVlLOXG00H6sQvtszXE7yy1mHTX9YJn3hSVHarKprmbLfEsliPFscrwJvohj2y49umhgVtmbmrs94tS8MUm1S56GmBoyIcu66DkJ+AGWxJ0lS65xUoGM3y0hGOyGvrh8q0lDZdrFw5gtTpYhNCozHSxRx79v30ZCVGGpPq+LWONGR7U= - - secure: Dk11Yrq0XT+VXXncqhyV+g0PDV+teFWobAigDpsncNKFtSth37Eoi6lrPVKT9S5b5qh+SVx7h7D3VSpMPoIAXuaeG62yn7e1RegCFk19xJB8aGsooVhwdlQk8yiCHe/1ITr6C95Ftj4QQT1k29inAsjvAqLPU229EwN+In4nAZw2S8qMR27FqCd6HvdrbwaM5PYVHvgANgBkL3awMmIm4On5wSqOdOukj8L7LztUA87YKfgUsOln1ERI+nN6fbN0FYdTFEWwG56HNhNvOSv5Gt3os92r47r0VFghIRrJOjwEWE2KFsEs43DYemrJBlgu0OCvk9A3gYr0vUeVxgT6LH5zZUTavK2ew6sZmUBpJLag9oezC1mjp3c8s90eRZX5eCaJ0Dyt4us9z3B96SEHg3lF3PZDq0xloeuxa8dgJp4HJzQi7HNn8sMezFE2DMeZ2x1zOuNbyiI6ZmDMCp54me1Z7MOk+MCu6q/8JAPpfEeaFPNVt5qYolI0pYzHURU1RVMzVN2sSaFMEnyBR6W/f5MoIHYGZFBygTPHZVgjkdpniKS+Meo6RrmXyrmDQMAc08bDjdepiQO51QP8h5BKXKkTrIa13XvOpVGkmbfBzoYC6RzVRZkovERQh2DSqMG+vclnDFzcBZ8xEqesAEp2c8tlSamTLu6wyeC0gi0VAxo= -notifications: - slack: - if: branch = master AND (type = push OR type=cron) - on_success: change - on_failure: always - rooms: - - secure: NvX4cDfdvNjvCL/a4AXrOKvoNG7uA2WFmGprZPYxjgI2/XumYIaeG5ls5K/jztTnX2rJL8CMwle6dXWaGYH9w2PPyKGJ4Wk76WxUIYe4hiodUCsJE4Xc1s7RKqbaRzGDpPbF5Cu0kcsNlaM9KE9cYWSN0LxgnzX+Mx9IH8bvAvcge/eNnQcPRZLxGYHLRkZiIKT365mnadkxAw0D8fJAtPsVeviFseeAKjm6N+XALn40rTr03fkvCdpAftjm8E9SHVuiToPs8AXEy1c2SdTz24PkYlTmMCxSPsyHuhfS5AixdNCA4lYZCEB3Nn1957LivTiAHpzjX8ZdXe7/gnZOKxEZ1B+vFrpnYByJexApswb5h7WLsbQUPN9iRr17u7nkzb99/Fqunaa+Hm260hC/fUHSAdE50691NG090Hrtj81XoIhi2EhL5dL9KxWSQwIG+76H8HVBXoodww25K3/5qW/levAfn+ttS1/Jf9IfjJs5h/PSkTtdHktxEUQwAZt5Tokn8uuUl/72NS5u2/xlylz50tPiM+4KAB8ZTwNfw7HAowesnOcfnGjyc1coduL6xUwiWCkVhL1CbgDtApLpq1EjkE6CwvgH7WvHdr/C3bKgICVavK1KAIlK0yTk96s0QQc9WaLBE8oBeQKLX6oshI4UEIKkB8jjlolNSa/Zkw4= diff --git a/README.md b/README.md index 219a8ac..6cfbc28 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [ ![Download](https://api.bintray.com/packages/nike/maven/cerberus-client/images/download.svg) ](https://bintray.com/nike/maven/cerberus-client/_latestVersion) [![][travis img]][travis] -[![Coverage Status](https://coveralls.io/repos/github/Nike-Inc/cerberus-java-client/badge.svg?branch=master)](https://coveralls.io/github/Nike-Inc/cerberus-java-client) +[![codecov](https://codecov.io/gh/Nike-Inc/cerberus-java-client/branch/master/graph/badge.svg)](https://codecov.io/gh/Nike-Inc/cerberus-java-client) [![][license img]][license] This is a Java based client library for Cerberus that is built on top of Nike's Cerberus client. diff --git a/gradle.properties b/gradle.properties index 3ef9bed..96f717f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -version=7.3.2 +version=7.3.3 groupId=com.nike artifactId=cerberus-client diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index fc086a7..ba0a4cb 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -30,8 +30,8 @@ configurations.all { force "net.sourceforge.pmd:pmd-java:6.21.0" dependencySubstitution { - substitute module("org.mortbay.jetty:jetty") with module("org.eclipse.jetty:jetty-server:9.4.31.v20200723") - substitute module("org.mortbay.jetty:jetty-util") with module("org.eclipse.jetty:jetty-util:9.4.31.v20200723") + substitute module("org.mortbay.jetty:jetty") with module("org.eclipse.jetty:jetty-server:9.4.34.v20201102") + substitute module("org.mortbay.jetty:jetty-util") with module("org.eclipse.jetty:jetty-util:9.4.34.v20201102") substitute module("dom4j:dom4j:1.6.1") with module("org.dom4j:dom4j:2.1.3") } }