Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
135 additions
and
31 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,76 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CD with Maven | ||
|
||
on: | ||
push: | ||
branches: [ develop, master ] | ||
pull_request: | ||
branches: [ develop, master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Set up Maven | ||
env: | ||
GPG_KEY: ${{ secrets.MAVEN_KEY }} | ||
run: | | ||
export GPG_TTY=$(tty) | ||
cp .mvn.settings.xml $HOME/.m2/settings.xml | ||
echo "$GPG_KEY" >> codesigning.asc | ||
gpg --batch --import codesigning.asc | ||
shred --remove codesigning.asc | ||
- name: Set up Terraform | ||
run: | | ||
curl -g https://releases.hashicorp.com/terraform/0.12.9/terraform_0.12.9_linux_amd64.zip -o /tmp/terraform.zip | ||
sudo unzip /tmp/terraform.zip -d /usr/bin | ||
- name: Build with Maven | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: | | ||
cd tf-build-tools | ||
./mvnw clean test coveralls:report -DrepoToken="$COVERALLS_REPO_TOKEN" | ||
cd .. | ||
- name: Deploy | ||
id: deploy | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }} | ||
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PW }} | ||
GPG_KEY_PW: ${{ secrets.MAVEN_KEY_PW }} | ||
GPG_KEY_ID: ${{ secrets.MAVEN_KEY_ID }} | ||
run: | | ||
cd tf-build-tools | ||
VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout) | ||
PROFILE="" | ||
if [ "$BRANCH_NAME" == "develop" ] && ![ echo $VERSION | grep -q SNAPSHOT ]; then | ||
DOTS=$VERSION | sed -e 's/\(.\)/\n/g' | grep l | wc -l | ||
# Ensure that the build number is in the 4th [semver] position | ||
if [ "$DOTS" < "3" ]; then | ||
VERSION="${VERSION}.0" | ||
fi | ||
VERSION="${VERSION}-${GITHUB_RUN_NUMBER}" | ||
echo "***** VERSION is $VERSION ******" | ||
./mvnw versions:set -DnewVersion="${VERSION}" | ||
else | ||
PROFILE="release" | ||
fi | ||
# Stage for Maven Central Deployment | ||
export GPG_TTY=$(tty) | ||
./mvnw deploy -DskipTests=true -P ${PROFILE} | ||
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,30 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
pull_request: | ||
branches: [ foo ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Setup Terraform | ||
run: | | ||
curl -g https://releases.hashicorp.com/terraform/0.12.9/terraform_0.12.9_linux_amd64.zip -o /tmp/terraform.zip | ||
sudo unzip /tmp/terraform.zip -d /usr/bin | ||
- name: Build with Maven | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: | | ||
cp .mvn.settings.xml $HOME/.m2/settings.xml | ||
cd tf-build-tools && ./mvnw clean test coveralls:report -DrepoToken="$COVERALLS_REPO_TOKEN" |
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
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,33 +1,13 @@ | ||
language: java | ||
env: | ||
global: | ||
- secure: STW9FkS69BRtMGlF+BGJEefaHi1UzguzkyQOZZxKZp93bJTzWafGLonwDW/Aky3BhlRwCfKrl9e0BuF+j1ACBv5gxowvO8RuwFzBNbpKOeTAtVEmqXrqfLtfN+w3tKj41Db08NxP9NNlxQst9FSlhJP0EM1EdetcMTYwMWvL2Q71UP2RD3vziorPON6W+hiXA1pstRHkYc3G5x7dmVvP6nMcUo/vPvbPi6QOn4SS2Pm/f9t5vAA1UYsXgfQDXG178wI9WMpiUo75hCHL2yzYnLszigWEzG2UDkAM35vJnLwI/fGhl4jysf8r85+bDusfkJ7TYQizRChLpfdOO67UwDTGAN28/KEvhSXT8TG6lMLu35xk3kRvN6mjcnYtxWYhaJjuXQ23vrdXfZvsoXbaW7DwPafqsG8nvhjMUXnXHmNUV+K4RIEqrnYmapxPTVAEmWluzyfCCEptpwpb0Xl2fc/KVy02o63a8rKaa2CaepZt6b7juFVTXeWYmaJ66NoHovXYtbGpiC2v1iDa8bmrdRkb1GzQ/PEcUTToGOeTOEkOZbvCMt2xS2B/cvgo3w2Z4C8moovY2dDjOP5F94fwBwbwodK/b5f8QBPwECqZIoQpqhvtMo99HOQJgpPhKLddUqhzw1rjPt07S2QDiHkwd4EePeZ6ZIcY61iGtMcwpes= | ||
- secure: mesHrCi3fqaM538dEQJftOarOTEAMgo61uFx0RmOvg3nBVJphaLHoJWaYXfA5qtNhXTSYFwAeqIxAywRljEspRVwvhXvykRuGUzgk1w5MIL8OLflK34SU7m/eBPGVw6Ka4Uft8vnnZYzfl1qEY05EP9M20gciAujmfSnzSjfyIM9hZieDlsz4YkPexnuV9t7cFWEipg4icac6n0NFcZxzznnQ7Tyg+GyJA3HCVgB4jpfIPByJumpGBla1hFkfcWsgyL2uzQozcWUqLzW772PiPc6H75AAGSIDC63dwA3rmzCfBdj1POwn1mezRoJrxt0c3vr1uoSztZe5wquGEoUw1QRxOyEiYWy0z+TFWfb5G5D/H+7ICllL4+PXqI3Mf5uyujI3JNxeTbOa+lkydx79kL+ulOy2AyrY6IMmzRsyGmRxhpdoreQwHFKIsydqxEtBXHZ3oCcjR83hxLF9atbefWq8CNfvdLYsUUxwsUSmF+IBo5se/kJ7zwdb9yFWX2NzlJhchDmU97dXIzdn8PI4mFC0p/gmllJvr/cdjSBxLxgPVcH8fQ0kH6oMgNEXKvl1od/Qls95w0nP4W33zYxEk+DCKwdCXIQ8arEj4lamSEGyzii0zdn1gM/LExyu/SQ8ZOeWTEOLHuWYMNj7zuEVmaf1b1wwZf8a5E8hH4W6RA= | ||
sudo: false | ||
branches: | ||
only: | ||
- develop | ||
- /^release\/v.*$/ | ||
- /^hotfix\/v.*$/ | ||
- none | ||
cache: | ||
directories: | ||
- $HOME/.m2 | ||
jdk: | ||
- openjdk8 | ||
before_install: | ||
- curl -g https://releases.hashicorp.com/terraform/0.12.9/terraform_0.12.9_linux_amd64.zip -o /tmp/terraform.zip | ||
- sudo unzip /tmp/terraform.zip -d /usr/bin | ||
script: | ||
- | | ||
cd tf-build-tools | ||
echo "*** Downloading the help plugin and getting the project version ***" | ||
./mvnw org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version | ||
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
if [ $TRAVIS_PULL_REQUEST = "false" ] && echo $VERSION | grep -q SNAPSHOT; then | ||
echo "*** Validating the build and deploying to Sonatype's SNAPSHOT repo ***" | ||
cp ../.mvn.settings.xml $HOME/.m2/settings.xml && ./mvnw clean test coveralls:report deploy | ||
else | ||
echo "*** Validating the build ***" | ||
./mvnw clean test coveralls:report | ||
fi | ||
"***** Travis No More! *****" |
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
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
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
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
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
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