Skip to content

Commit

Permalink
LIBS-561 - Update to SpringBoot 2.2, Java 11 and MySQL 8 (#12)
Browse files Browse the repository at this point in the history
* Update to Spring Boot 2.2
* Update to Java 11
* Update to MySQL 8 as default Docker Image
* Add GitHub actions
* Remove Jenkins and Travis
  • Loading branch information
hennes-maertins authored Nov 12, 2019
1 parent 358c6ad commit 62b21ed
Show file tree
Hide file tree
Showing 11 changed files with 220 additions and 158 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: nightly

on:
schedule:
- cron: 0 0 * * *

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: setup-java
uses: actions/setup-java@v1
with:
java-version: 11

- uses: actions/checkout@v1

- name: caching
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: compile
run: mvn clean compile test-compile

- name: unit-tests
run: mvn surefire:test

- name: integration-tests
run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify

- name: sonar-analyse
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
mvn sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io/ \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
-Dsonar.java.binaries=./target/classes
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: release

on:
push:
branches:
- master

jobs:
release:
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: setup-java
uses: actions/setup-java@v1
with:
java-version: 11

- name: setup-gpg
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: echo ${GPG_PRIVATE_KEY} | base64 --decode | gpg --batch --import

- name: setup-maven-settings
uses: s4u/maven-settings-action@v1
with:
servers: '[{"id": "ossrh", "username": "${OSSRH_USERNAME}", "password": "${OSSRH_PASSWORD}"}, {"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]'
properties: '[{"gpg.executable": "gpg"}, {"gpg.passphrase": "${GPG_PASSPHRASE}"}]'
sonatypeSnapshots: true

- name: checkout
uses: actions/checkout@v1

- name: caching
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: sonar-analyse
run: |
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
mvn clean verify sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io/ \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
-Dsonar.java.binaries=./target/classes
- name: deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: mvn deploy
51 changes: 51 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: review

on:
push:
branches:
- '*'
- '!master'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: setup-java
uses: actions/setup-java@v1
with:
java-version: 11

- name: checkout
uses: actions/checkout@v1

- name: caching
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: compile
run: mvn clean compile test-compile

- name: unit-tests
run: mvn surefire:test

- name: integration-tests
run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify

- name: sonar-analyse
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
mvn sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io/ \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
-Dsonar.java.binaries=./target/classes
- name: pom-analyse
run: mvn enforcer:enforce
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

81 changes: 0 additions & 81 deletions Jenkinsfile

This file was deleted.

15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
springboot-testcontainer-mysql
==============================
# springboot-testcontainer-mysql

[![Maven Central](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/com/avides/springboot/testcontainer/springboot-testcontainer-mysql/maven-metadata.xml.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.avides.springboot.testcontainer%22%20AND%20a%3A%22springboot-testcontainer-mysql%22)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3ef2b23118074ae7bbe52a3bd53defad)](https://www.codacy.com/app/avides-builds/springboot-testcontainer-mysql)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/3ef2b23118074ae7bbe52a3bd53defad)](https://www.codacy.com/app/avides-builds/springboot-testcontainer-mysql)
[![Build Status](https://travis-ci.org/springboot-testcontainer/springboot-testcontainer-mysql.svg?branch=master)](https://travis-ci.org/springboot-testcontainer/springboot-testcontainer-mysql)
[![Build](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/workflows/release/badge.svg)](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/actions)
[![Nightly build](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/workflows/nightly/badge.svg)](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/actions)
[![Coverage report](https://sonarcloud.io/api/project_badges/measure?project=springboot-testcontainer_springboot-testcontainer-mysql&metric=coverage)](https://sonarcloud.io/dashboard?id=springboot-testcontainer_springboot-testcontainer-mysql)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=springboot-testcontainer_springboot-testcontainer-mysql&metric=alert_status)](https://sonarcloud.io/dashboard?id=springboot-testcontainer_springboot-testcontainer-mysql)
[![Technical dept](https://sonarcloud.io/api/project_badges/measure?project=springboot-testcontainer_springboot-testcontainer-mysql&metric=sqale_index)](https://sonarcloud.io/dashboard?id=springboot-testcontainer_springboot-testcontainer-mysql)

### Dependency
```xml
<dependency>
<groupId>com.avides.springboot.testcontainer</groupId>
<artifactId>springboot-testcontainer-mysql</artifactId>
<version>0.1.0-RC11</version>
<version>1.0.0-RC1</version>
<scope>test</scope>
</dependency>
```
Expand All @@ -20,7 +21,7 @@ springboot-testcontainer-mysql
Properties consumed (in `bootstrap.properties`):
- `embedded.container.mysql.enabled` (default is `true`)
- `embedded.container.mysql.startup-timeout` (default is `30`)
- `embedded.container.mysql.docker-image` (default is `mysql:5.7.24`)
- `embedded.container.mysql.docker-image` (default is `mysql:8.0.18`)
- `embedded.container.mysql.port` (default is `3306`)
- `embedded.container.mysql.root-password` (default is `root`)
- `embedded.container.mysql.database-name` (default is `embeddedMySqlDb`)
Expand Down
Loading

0 comments on commit 62b21ed

Please sign in to comment.