Skip to content

Commit

Permalink
Merge tag 'steve-3.6.0' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	pom.xml
#	src/main/java/de/rwth/idsg/steve/config/BeanConfiguration.java
#	src/main/java/de/rwth/idsg/steve/config/SecurityConfiguration.java
#	src/main/resources/config/dev/main.properties
#	src/main/resources/config/prod/main.properties
  • Loading branch information
Petr Hejkal committed Apr 15, 2024
2 parents 379a850 + 991c00b commit d834f2c
Show file tree
Hide file tree
Showing 444 changed files with 7,094 additions and 3,813 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [goekay]
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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: "maven"
directory: "/"
open-pull-requests-limit: 10
schedule:
interval: "weekly"
day: "saturday"

50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: build and run tests
on: [ push, pull_request ]

jobs:
build:
strategy:
fail-fast: false
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' ]
runs-on: ${{ matrix.os }}
services:
mysql:
image: ${{ matrix.db }}
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v2
- name: Set up Java ${{ matrix.Java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven

- name: Set up MySQL
run: |
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "SELECT @@VERSION;"
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE DATABASE stevedb_test_2aa6a783d47d;" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE USER 'steve'@'%' IDENTIFIED BY 'changeme';" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT ALL PRIVILEGES ON stevedb_test_2aa6a783d47d.* TO 'steve'@'%';" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SELECT ON mysql.proc TO 'steve'@'%';" -v || true
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SUPER ON *.* TO 'steve'@'%';" -v || true
- name: Build with Maven
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml

- name: Start the app and visit signin web page
run: |
sudo apt-get install -y elinks
java -Djava.net.preferIPv4Stack=true -jar target/steve.jar &
sleep 30
elinks -dump -no-references http://localhost:8080/steve/manager/signin
killall java
52 changes: 52 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: analyze and review code
on: [ push, pull_request ]

jobs:
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Java 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'temurin'
cache: maven

- name: Check with Maven
run: mvn -B -V license:check --file pom.xml
pmd:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- 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'
sourcePath: './src/main/java'
rulesets: './src/main/resources/maven-pmd-plugin-default.xml'
- name: Fail build if there are violations
if: steps.pmd.outputs.violations != 0
run: exit 1
checkstyle:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Run Checkstyle
uses: nikitasavinov/checkstyle-action@master
with:
checkstyle_config: './src/main/resources/checkstyle.xml'
workdir: './src/main/java'
reporter: 'github-pr-check'
tool_name: 'checkstyle'
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
26 changes: 0 additions & 26 deletions .travis-maven-settings.xml

This file was deleted.

36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

44 changes: 0 additions & 44 deletions CHANGELOG.md

This file was deleted.

11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM maven:3.6.1-jdk-11
FROM eclipse-temurin:11-jdk

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

MAINTAINER Ling Li

# Download and install dockerize.
# Needed so the web container will wait for MariaDB to start.
ENV DOCKERIZE_VERSION v0.6.1
RUN wget --no-verbose https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

ENV DOCKERIZE_VERSION v0.19.0
RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-`uname -s`-`uname -m` | install /dev/stdin /usr/local/bin/dockerize

EXPOSE 8180
EXPOSE 8443
Expand All @@ -24,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 LICENSE-HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SteVe - SteckdosenVerwaltung - https://github.com/RWTH-i5-IDSG/steve
Copyright (C) ${year}-${currentYear} ${owner}.
${project.name} - ${project.description} - ${project.organization.url}
Copyright (C) ${license.git.copyrightYears} ${owner}
All Rights Reserved.

This program is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit d834f2c

Please sign in to comment.