-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from coffeenet/gradle-build
Migrate from Maven to Gradle
- Loading branch information
Showing
52 changed files
with
1,297 additions
and
1,725 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: "CoffeeNet: CI/CD" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
pipeline: | ||
name: Pipeline | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch target branch for SonarQube branch analysis | ||
run: | | ||
git fetch --no-tags --prune origin \ | ||
+refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} | ||
if: github.event_name == 'pull_request' | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Verify Gradle Wrapper version | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Recreate Gradle wrapper cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/**/*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle-wrapper- | ||
- name: Recreate Gradle build/dependency cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Build and verify with Gradle | ||
run: | | ||
if [ ! -z $SONAR_TOKEN ]; then | ||
./gradlew --build-cache check sonarqube \ | ||
-Dsonar.host.url=https://sonarcloud.io \ | ||
-Dsonar.organization=coffeenet \ | ||
-Dsonar.projectKey=rocks.coffeenet:coffeenet-starter | ||
else | ||
./gradlew --build-cache check | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
- name: Publish SNAPSHOT artifacts to Sonatype OSSRH | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: | | ||
./gradlew -Psonatype build publishToSonatype | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: "CoffeeNet: Post Release" | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
coffeenet_updater: | ||
name: Update ${{ matrix.application }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
application: | ||
- coffeenet/coffeenet-auth | ||
- coffeenet/coffeenet-discovery | ||
- coffeenet/coffeenet-config-server | ||
- coffeenet/coffeenet-frontpage | ||
- coffeenet/coffeenet-frontpage-plugin-rss | ||
- coffeenet/coffeenet-frontpage-plugin-islieb | ||
- coffeenet/coffeenet-frontpage-plugin-clock | ||
- coffeenet/coffeenet-frontpage-plugin-api | ||
- coffeenet/coffeenet-frontpage-plugin-influx | ||
- coffeenet/example-projects | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
- name: Checkout ${{ matrix.application }} | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ matrix.application }} | ||
path: target-application | ||
- name: Update version dependency on ${{ matrix.application }} | ||
run: | | ||
echo "::warning::Not implemented yet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: "CoffeeNet: Release Pipeline" | ||
|
||
on: | ||
push: | ||
tags: 'v*' | ||
|
||
jobs: | ||
publish: | ||
name: Publish artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Verify if releasing from master | ||
run: | | ||
git fetch --no-tags --prune origin +refs/heads/master:refs/remotes/origin/master | ||
git merge-base --is-ancestor ${{ github.ref }} refs/heads/master | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Verify Gradle Wrapper version | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Recreate Gradle wrapper cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/**/*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle-wrapper- | ||
- name: Build and verify with Gradle | ||
run: | | ||
./gradlew check | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish artifacts to Sonatype OSSRH | ||
run: | | ||
./gradlew -Psonatype build publishToSonatype | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
|
||
github: | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
needs: publish | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
- name: Extract release notes | ||
run: | | ||
release_notes=$(awk -v r=1 '/^##[[:space:]]+/ { n++; next }; n==r; n==r+1 { exit }' CHANGELOG.md) | ||
if [ -z $(echo -n $release_notes | tr -d '[:space:]') ]; then | ||
echo "::error::Release notes are empty. Shouldn't happen" | ||
else | ||
release_notes="${release_notes//'%'/'%25'}" | ||
release_notes="${release_notes//$'\n'/'%0A'}" | ||
release_notes="${release_notes//$'\r'/'%0D'}" | ||
echo "::set-env name=RELEASE_NOTES::$release_notes" | ||
fi | ||
- name: Create GitHub Release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: ${{ env.RELEASE_NOTES }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
.idea/ | ||
target/ | ||
*.iml | ||
coffeenet-autoconfigure/logs | ||
coffeenet-autoconfigure/*.graphml | ||
.flattened-pom.xml | ||
|
||
**/.flattened-pom.xml | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build | ||
!/**/src/**/build |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.