From 731d3aef69030bed01bcc8627f525a52930a26c8 Mon Sep 17 00:00:00 2001 From: hizmailovich Date: Mon, 15 Jan 2024 15:22:29 +0300 Subject: [PATCH] Initial commit --- .github/workflows/codecov.yml | 28 +++ .github/workflows/mvn.yml | 51 ++++ .github/workflows/pdd.yml | 15 ++ .github/workflows/xcop.yml | 14 ++ .gitignore | 32 +++ LICENSE.txt | 14 ++ checkstyle-suppressions.xml | 25 ++ pom.xml | 218 ++++++++++++++++++ .../java/git/tracehub/pmo/PmoApplication.java | 40 ++++ .../java/git/tracehub/pmo/package-info.java | 23 ++ src/main/resources/application.yaml | 3 + 11 files changed, 463 insertions(+) create mode 100644 .github/workflows/codecov.yml create mode 100644 .github/workflows/mvn.yml create mode 100644 .github/workflows/pdd.yml create mode 100644 .github/workflows/xcop.yml create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 checkstyle-suppressions.xml create mode 100644 pom.xml create mode 100644 src/main/java/git/tracehub/pmo/PmoApplication.java create mode 100644 src/main/java/git/tracehub/pmo/package-info.java create mode 100644 src/main/resources/application.yaml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..a5f96fe --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,28 @@ +name: codecov +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + codecov: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven- + - run: | + mvn clean install --errors --batch-mode + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./target/site/jacoco/jacoco.xml + fail_ci_if_error: false diff --git a/.github/workflows/mvn.yml b/.github/workflows/mvn.yml new file mode 100644 index 0000000..4990ab3 --- /dev/null +++ b/.github/workflows/mvn.yml @@ -0,0 +1,51 @@ +name: maven +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + test: + name: Build + strategy: + matrix: + os: [windows-2022, macos-12] + java: [17] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-jdk-${{ matrix.java }}-maven- + - run: mvn clean install -DskipITs --errors --batch-mode + it-test: + name: Build Integrations + strategy: + matrix: + os-integration: [ubuntu-20.04] + java: [17] + runs-on: ${{ matrix.os-integration }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - uses: docker-practice/actions-setup-docker@master + timeout-minutes: 12 + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-jdk-${{ matrix.java }}-maven- + - run: mvn clean install --errors --batch-mode \ No newline at end of file diff --git a/.github/workflows/pdd.yml b/.github/workflows/pdd.yml new file mode 100644 index 0000000..78277a2 --- /dev/null +++ b/.github/workflows/pdd.yml @@ -0,0 +1,15 @@ +--- +name: pdd +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + pdd: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: volodya-lombrozo/pdd-action@master diff --git a/.github/workflows/xcop.yml b/.github/workflows/xcop.yml new file mode 100644 index 0000000..877abe5 --- /dev/null +++ b/.github/workflows/xcop.yml @@ -0,0 +1,14 @@ +name: xcop +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: g4s8/xcop-action@master \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ed0d6b --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..de8dfbd --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2023-2024 Tracehub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to read +the Software only. Permissions is hereby NOT GRANTED to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml new file mode 100644 index 0000000..3366dde --- /dev/null +++ b/checkstyle-suppressions.xml @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..099f04e --- /dev/null +++ b/pom.xml @@ -0,0 +1,218 @@ + + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.2.1 + + + git.tracehub + pmo + 0.0.1-SNAPSHOT + pmo + Project registry, facilities and its governance + 2023 + https://github.com/tracehubpm/pmo + + 17 + ${java.version} + ${java.version} + UTF-8 + 0.55.0 + 1.1.1 + 3.1.2 + 0.8.10 + 0.25 + 1.1 + 3.3.0 + 2.0.0 + + + + org.springframework.boot + spring-boot-starter-security + + + + org.springframework.boot + spring-boot-starter-web + + + + org.postgresql + postgresql + + runtime + + + org.projectlombok + lombok + + true + + + com.jcabi + jcabi-http + ${jcabi-http.version} + + + org.cactoos + cactoos + ${cactoos.version} + + + org.springframework.boot + spring-boot-starter-test + + test + + + org.springframework.security + spring-security-test + + test + + + org.llorllale + cactoos-matchers + ${cactoos-matchers.version} + test + + + org.cactoos + cactoos + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.source} + ${maven.compiler.target} + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + org.jacoco + jacoco-maven-plugin + + + jacoco-initialize + + prepare-agent + + + + jacoco-check + test + + check + report + + + + + BUNDLE + + + INSTRUCTION + COVEREDRATIO + 0.00 + + + LINE + COVEREDRATIO + 0.00 + + + BRANCH + COVEREDRATIO + 0.00 + + + COMPLEXITY + COVEREDRATIO + 0.00 + + + METHOD + COVEREDRATIO + 0.00 + + + CLASS + MISSEDCOUNT + 30 + + + + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + + + ${project.build.outputDirectory} + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + checkstyle-suppressions.xml + + + + + check + + + + + + + diff --git a/src/main/java/git/tracehub/pmo/PmoApplication.java b/src/main/java/git/tracehub/pmo/PmoApplication.java new file mode 100644 index 0000000..e7c2ba0 --- /dev/null +++ b/src/main/java/git/tracehub/pmo/PmoApplication.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2023-2024 Tracehub + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to read + * the Software only. Permissions is hereby NOT GRANTED to use, copy, modify, + * merge, publish, distribute, sublicense, and/or sell copies of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package git.tracehub.pmo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Entry point. + * + * @since 0.0.0 + */ +@SpringBootApplication +public class PmoApplication { + + /** + * Application entry point. + * + * @param args Application arguments + */ + public static void main(final String[] args) { + SpringApplication.run(PmoApplication.class, args); + } + +} diff --git a/src/main/java/git/tracehub/pmo/package-info.java b/src/main/java/git/tracehub/pmo/package-info.java new file mode 100644 index 0000000..8d6e417 --- /dev/null +++ b/src/main/java/git/tracehub/pmo/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2023-2024 Tracehub + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to read + * the Software only. Permissions is hereby NOT GRANTED to use, copy, modify, + * merge, publish, distribute, sublicense, and/or sell copies of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * Pmo. + * + * @since 0.0.0 + */ +package git.tracehub.pmo; diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml new file mode 100644 index 0000000..73b9f66 --- /dev/null +++ b/src/main/resources/application.yaml @@ -0,0 +1,3 @@ +server: + port: 80 + shutdown: graceful