Skip to content

Commit

Permalink
Merge branch 'steve-community:master' into MultiUsers
Browse files Browse the repository at this point in the history
  • Loading branch information
fnkbsi authored Nov 28, 2023
2 parents 647ca1c + 6cdc22b commit 42980df
Show file tree
Hide file tree
Showing 16 changed files with 717 additions and 61 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ updates:
interval: "weekly"
day: "saturday"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
java: [ '11', '17' ]
db: [ 'mysql:5.7', 'mysql:8.0', 'mariadb:10.3', 'mariadb:10.4', 'mariadb:10.5', 'mariadb:10.6' ]
db: [ 'mysql:5.7', 'mysql:8.0', 'mariadb:10.3', 'mariadb:10.4.30', 'mariadb:10.5.21', 'mariadb:10.6.14' ]
runs-on: ${{ matrix.os }}
services:
mysql:
Expand All @@ -21,9 +21,9 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.Java }}
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
Expand All @@ -39,7 +39,7 @@ jobs:
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SUPER ON *.* TO 'steve'@'%';" -v || true
- name: Build with Maven
run: mvn -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml

- name: Start the app and visit signin web page
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Java 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
Expand All @@ -21,15 +21,15 @@ jobs:
pmd:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Run PMD
uses: pmd/pmd-github-action@v1
with:
version: '6.49.0'
version: 'latest'
sourcePath: './src/main/java'
rulesets: './src/main/resources/maven-pmd-plugin-default.xml'
- name: Fail build if there are violations
Expand All @@ -38,7 +38,7 @@ jobs:
checkstyle:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand Down
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3.6.1-jdk-11
FROM eclipse-temurin:11-jdk

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

Expand All @@ -21,6 +21,6 @@ COPY . /code
# Wait for the db to startup(via dockerize), then
# Build and run steve, requires a db to be available on port 3306
CMD dockerize -wait tcp://mariadb:3306 -timeout 60s && \
mvn clean package -Pdocker -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
./mvnw clean package -Pdocker -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
java -jar target/steve.jar

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ https://github.com/steve-community/steve/wiki/Charging-Station-Compatibility
SteVe requires
* JDK 11 (both Oracle JDK and Adoptium are supported)
* Maven
* MariaDB 10.2.1 or later. MySQL 5.7.7 or later works as well, but especially MySQL 8 introduces more hassle. We suggest MariaDB 10.4.
* MySQL or MariaDB. You should use [one of these](.github/workflows/main.yml#L11) supported versions.

to build and run.

Expand Down Expand Up @@ -92,7 +92,7 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
To compile SteVe simply use Maven. A runnable `jar` file containing the application and configuration will be created in the subdirectory `steve/target`.
```
# mvn package
# ./mvnw package
```
5. Run SteVe:
Expand Down
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ volumes:
services:

db:
image: mariadb:10.4
# Pinning MariaDB to point release 10.4.30 works around the issues with the
# database migrations seen with 10.4.31 in issue #1212.
#
# TODO: Get database migrations to work with the latest point releases of
# MariaDB 10.4.
image: mariadb:10.4.30
ports:
- 3306:3306
environment:
Expand Down
4 changes: 2 additions & 2 deletions k8s/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3.6.1-jdk-11
FROM eclipse-temurin:11-jdk
MAINTAINER daynnnnn

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
Expand All @@ -21,7 +21,7 @@ RUN sed -i 's|${db.user}|${env.DB_USERNAME}|g' pom.xml
RUN sed -i 's|${db.password}|${env.DB_PASSWORD}|g' pom.xml
RUN sed -i 's|${db.schema}|${env.DB_DATABASE}|g' pom.xml

RUN mvn clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
RUN ./mvnw clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"

CMD java -jar target/steve.jar

Loading

0 comments on commit 42980df

Please sign in to comment.