Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Always reference these instructions first and fallback to search or bash command
### Building the Project
- **NEVER CANCEL builds - they take time but will complete successfully**
- **CRITICAL**: Set timeout to 20+ minutes for builds, 60+ minutes for tests
- Clean compile: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH" && ./mvnw clean compile -B --no-transfer-progress -DskipTests` -- takes ~10.5 minutes
- Full package: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH" && ./mvnw package -B --no-transfer-progress -DskipTests` -- takes ~4 minutes
- Install to local repository: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH" && ./mvnw install -B --no-transfer-progress -DskipTests` -- takes ~1.5 minutes
- Clean compile: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH" && ./mvnw clean compile -B --no-transfer-progress -Dmaven.test.skip=true` -- takes ~10.5 minutes
- Full package: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH" && ./mvnw package -B --no-transfer-progress -Dmaven.test.skip=true` -- takes ~4 minutes
- Install to local repository: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH" && ./mvnw install -B --no-transfer-progress -Dmaven.test.skip=true` -- takes ~1.5 minutes

### Testing
- **NEVER CANCEL test runs - set 60+ minute timeouts**
Expand Down Expand Up @@ -101,7 +101,7 @@ Always reference these instructions first and fallback to search or bash command
## Development Workflow
1. **Setup**: Configure Node.js 22.18.0 in PATH: `export PATH="/tmp/node-v22.18.0-linux-x64/bin:$PATH"`
2. **Initial Build**: Run `./mvnw clean compile` to verify everything builds (~10.5 minutes - be patient)
3. **Install Dependencies**: Run `./mvnw install -DskipTests` for sample app dependencies (~1.5 minutes)
3. **Install Dependencies**: Run `./mvnw install -Dmaven.test.skip=true` for sample app dependencies (~1.5 minutes)
4. **Make Changes**: Edit code in appropriate modules
5. **Format Code**: Run `./mvnw spring-javaformat:apply` and UI `npm run format:fix`
6. **Test Build**: Run build commands to verify changes don't break anything
Expand Down Expand Up @@ -146,4 +146,4 @@ spring-boot-admin/ # Root project (19 modules)
├── spring-boot-admin-starter-*/ # Spring Boot auto-configuration
├── mvnw # Maven wrapper
└── pom.xml # Root Maven configuration
```
```
28 changes: 9 additions & 19 deletions .github/workflows/build-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,15 @@ on:
- 2.*
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}
steps:

- name: free disk space
continue-on-error: true
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
if [ -n "$(docker image ls -q)" ]; then
docker rmi -f $(docker image ls -aq) || true
fi
df -h

- uses: actions/checkout@v6

- name: Set up JDK
Expand All @@ -46,8 +34,10 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Build with Maven
run: ./mvnw -B --no-transfer-progress install -P coverage
- name: Build with Maven (parallel modules, no coverage)
run: ./mvnw -B -T 1C --no-transfer-progress install
# -T 1C = 1 thread per CPU core for parallel module builds
# Coverage skipped for faster PR feedback; main branch builds have coverage

- name: Upload surefire reports
if: always()
Expand Down
47 changes: 13 additions & 34 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:
- 2.*
- 3.*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest ]
build-and-publish:
runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6

Expand All @@ -33,8 +34,8 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Build with Maven
run: ./mvnw -B --no-transfer-progress install -P coverage
- name: Build with Maven (parallel modules)
run: ./mvnw -B -T 1C --no-transfer-progress install -P coverage

- name: Upload surefire reports
if: always()
Expand All @@ -53,42 +54,20 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6

publish-snapshot:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
cache-dependency-path: '**/pom.xml'

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded)
run: ./mvnw -B deploy --no-transfer-progress -DskipTests
- name: Publish SNAPSHOT version to GitHub Packages
run: ./mvnw -B -T 1C deploy --no-transfer-progress -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Maven project version for Asciidoc GitHub Pages directory naming
run: echo ::set-output name=version::$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
- name: Extract Maven project version
run: echo "version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> "$GITHUB_OUTPUT"
id: project

- name: Show extracted Maven project version
run: echo ${{ steps.project.outputs.version }}

- name: Build documentation with Maven
run: ./mvnw -B --no-transfer-progress site
run: ./mvnw -B --no-transfer-progress -pl spring-boot-admin-docs site

- name: Deploy documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.8.0
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false # Don't cancel documentation deploys in progress

env:
VERSION: ${{ github.event.inputs.releaseversion }}

Expand Down Expand Up @@ -43,8 +47,8 @@ jobs:
- name: Set projects Maven version to GitHub Action GUI set version
run: ./mvnw versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress

- name: Build with Maven
run: ./mvnw -B --no-transfer-progress package -DskipTests
- name: Build with Maven (parallel modules)
run: ./mvnw -B -T 1C --no-transfer-progress package -Dmaven.test.skip=true

- name: Build documentation with Maven
run: ./mvnw -B --no-transfer-progress -pl spring-boot-admin-docs site
Expand Down
49 changes: 12 additions & 37 deletions .github/workflows/release-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false # Don't cancel releases in progress

env:
VERSION: ${{ github.event.inputs.releaseversion }}

Expand All @@ -21,18 +25,6 @@ jobs:
steps:
- run: echo "Will start a Maven Central upload with version ${{ github.event.inputs.releaseversion }}"

- name: free disk space
continue-on-error: true
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
if [ -n "$(docker image ls -q)" ]; then
docker rmi -f $(docker image ls -aq) || true
fi
df -h

- uses: actions/checkout@v6

- name: Set up settings.xml for Maven Central Repository
Expand All @@ -51,21 +43,18 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Cache node modules
uses: actions/cache@v5
env:
cache-name: cache-node-modules
- name: Set up Node
uses: actions/setup-node@v6
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
node-version: '24'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Set projects Maven version to GitHub Action GUI set version
run: ./mvnw versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress

- name: Publish package
run: ./mvnw -B deploy --no-transfer-progress -P central-deploy -DskipTests
- name: Publish package (parallel modules)
run: ./mvnw -B -T 1C deploy --no-transfer-progress -P central-deploy -Dmaven.test.skip=true
env:
#TODO: This is a workaround for NEXUS-27902 which uses XStream that fails on JVM >16
JDK_JAVA_OPTIONS: "--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED"
Expand All @@ -74,7 +63,7 @@ jobs:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Build documentation with Maven
run: ./mvnw -B --no-transfer-progress -pl spring-boot-admin-docs site
run: ./mvnw -B --no-transfer-progress -pl spring-boot-admin-docs site

- name: Deploy documentation to GitHub Pages for version ${{ github.event.inputs.releaseversion }}
uses: JamesIves/github-pages-deploy-action@v4.8.0
Expand Down Expand Up @@ -109,18 +98,6 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: free disk space
continue-on-error: true
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
if [ -n "$(docker image ls -q)" ]; then
docker rmi -f $(docker image ls -aq) || true
fi
df -h

- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.7.0
Expand All @@ -135,5 +112,3 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: ${{ contains(github.event.inputs.releaseversion, '-') }}


18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,30 @@
<configuration>
<parallel>classesAndMethods</parallel>
<useUnlimitedThreads>false</useUnlimitedThreads>
<threadCount>4</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<rerunFailingTestsCount>2</rerunFailingTestsCount>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/*IntegrationTests.java</exclude>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<configuration>
<includes>
<include>**/*IntegrationTest.java</include>
<include>**/*IntegrationTests.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @vitest-environment jsdom
*/
import { RenderResult, screen, waitFor } from '@testing-library/vue';
import { beforeEach, describe, expect, it, vi } from 'vitest';

Expand Down
3 changes: 2 additions & 1 deletion spring-boot-admin-server-ui/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ export default defineConfig(({ mode }) => {
test: {
root: __dirname,
globals: true,
environment: 'jsdom',
environment: 'happy-dom', // Faster than jsdom (~2-3x)
setupFiles: [resolve(frontendDir, 'tests/setup.ts')],
env: {
LANG: 'de_DE.UTF-8',
LC_ALL: 'de_DE.UTF-8',
TZ: 'Europe/Berlin',
},
include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
maxWorkers: 4,
},
root: frontendDir,
build: {
Expand Down