mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Testing
This commit is contained in:
parent
4148fc9eb3
commit
d4ed17c5c8
4 changed files with 69 additions and 67 deletions
29
.github/workflows/maven-build.yml
vendored
29
.github/workflows/maven-build.yml
vendored
|
@ -1,29 +0,0 @@
|
|||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# 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:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ '17' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK ${{matrix.java}}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{matrix.java}}
|
||||
distribution: 'adopt'
|
||||
cache: maven
|
||||
- name: Build with Maven Wrapper
|
||||
run: ./mvnw -B package
|
29
.github/workflows/pull-request.yaml
vendored
Normal file
29
.github/workflows/pull-request.yaml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: Pull Request Build
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
environment: default
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||
java-version: '17'
|
||||
- name: Build and export
|
||||
run: |
|
||||
#!/bin/bash
|
||||
mvn clean install -s settings.xml -B -Dmaven.repo.local=repo
|
||||
docker run -v `pwd`/repo:/repo -v `pwd`/target:/target quay.io/mk-ci-cd/apheleia-processor:57570450fc78697661497b1b604d1bd2253be2fa /opt/jboss/container/java/run/run-java.sh analyse --maven-repo=/repo /target/hacbs-test.jar --sbom-path /target/sbom.json --build-sbom-path /target/build-sbom.json || true
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sbom.json
|
||||
path: target/sbom.json
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-sbom.json
|
||||
path: target/build-sbom.json
|
41
pom.xml
41
pom.xml
|
@ -176,41 +176,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>${checkstyle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.nohttp</groupId>
|
||||
<artifactId>nohttp-checkstyle</artifactId>
|
||||
<version>${nohttp-checkstyle.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>nohttp-checkstyle-validation</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
|
||||
<sourceDirectories>${basedir}</sourceDirectories>
|
||||
<includes>**/*</includes>
|
||||
<excludes>**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class</excludes>
|
||||
<propertyExpansion>
|
||||
config_loc=${basedir}/src/checkstyle/
|
||||
</propertyExpansion>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.graalvm.buildtools</groupId>
|
||||
<artifactId>native-maven-plugin</artifactId>
|
||||
|
@ -220,7 +185,7 @@
|
|||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<!-- Spring Boot Actuator displays build-related information
|
||||
<!-- Spring Boot Actuator displays build-related information
|
||||
if a META-INF/build-info.properties file is present -->
|
||||
<goals>
|
||||
<goal>build-info</goal>
|
||||
|
@ -378,7 +343,7 @@
|
|||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- This plugin's configuration is used to store Eclipse m2e settings
|
||||
<!-- This plugin's configuration is used to store Eclipse m2e settings
|
||||
only. It has no influence on the Maven build itself. -->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
|
@ -436,4 +401,4 @@
|
|||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
|
37
settings.xml
Normal file
37
settings.xml
Normal file
|
@ -0,0 +1,37 @@
|
|||
<settings>
|
||||
|
||||
<mirrors>
|
||||
<mirror>
|
||||
<id>maven-default-http-blocker</id>
|
||||
<mirrorOf>external:http:*</mirrorOf>
|
||||
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
|
||||
<url>http://nexus3-nexus.apps.sdouglas2.clusters.stonesoupengineering.com/repository/rebuilt-downloads/</url>
|
||||
<blocked>false</blocked>
|
||||
</mirror>
|
||||
<mirror>
|
||||
<id>others</id>
|
||||
<mirrorOf>*</mirrorOf>
|
||||
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
|
||||
<url>http://nexus3-nexus.apps.sdouglas2.clusters.stonesoupengineering.com/repository/rebuilt-downloads/</url>
|
||||
<blocked>false</blocked>
|
||||
</mirror>
|
||||
</mirrors>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>demo</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>demo-demo_repo</id>
|
||||
<url>http://nexus3-nexus.apps.sdouglas2.clusters.stonesoupengineering.com/repository/rebuilt-downloads/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
<activeProfiles>
|
||||
<activeProfile>demo</activeProfile>
|
||||
</activeProfiles>
|
||||
|
||||
</settings>
|
Loading…
Reference in a new issue