Skip to content

Commit ff45074

Browse files
authored
docs: enhance parts of the documentation and rely on generated sources (#4592)
1 parent f7545db commit ff45074

38 files changed

+812
-756
lines changed

.github/workflows/build-feature.yml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build feature branches
1+
name: Build Pull Request
22

33
on:
44
push:
@@ -24,34 +24,41 @@ jobs:
2424
sudo swapoff -a
2525
sudo rm -f /swapfile
2626
sudo apt clean
27-
docker rmi $(docker image ls -aq)
27+
if [ -n "$(docker image ls -q)" ]; then
28+
docker rmi -f $(docker image ls -aq) || true
29+
fi
2830
df -h
2931
3032
- uses: actions/checkout@v5
3133

32-
- name: Set up JDK 17
34+
- name: Set up JDK
3335
uses: actions/setup-java@v5
3436
with:
3537
distribution: 'temurin'
3638
java-version: '17'
3739
cache: 'maven'
40+
cache-dependency-path: '**/pom.xml'
3841

39-
- name: Cache node modules
40-
uses: actions/cache@v4
41-
env:
42-
cache-name: cache-node-modules
42+
- name: Set up Node
43+
uses: actions/setup-node@v4
4344
with:
44-
path: ~/.npm
45-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
46-
restore-keys: |
47-
${{ runner.os }}-build-${{ env.cache-name }}-
45+
node-version: 'lts/*'
46+
cache: 'npm'
47+
cache-dependency-path: '**/package-lock.json'
4848

49-
# since we also build on Windows Powershell, we need to add a space between -D maven.javadoc.skip=true
50-
# otherwise the build will fail https://stackoverflow.com/questions/38051787/maven-javadoc-skip-true-throws-an-error
5149
- name: Build with Maven
52-
run: |
53-
./mvnw -B verify -P coverage --no-transfer-progress -D maven.javadoc.skip=true
50+
run: ./mvnw -B --no-transfer-progress install -P coverage
5451

55-
- uses: codecov/codecov-action@v5
52+
- name: Upload surefire reports
53+
if: always()
54+
uses: actions/upload-artifact@v4
5655
with:
57-
files: "'*/jacoco.xml'"
56+
name: surefire-reports
57+
path: |
58+
**/target/surefire-reports/*.xml
59+
**/target/surefire-reports/*.txt
60+
**/target/surefire-reports/*.dump*
61+
**/target/surefire-reports/*.out
62+
**/target/surefire-reports/*.err
63+
if-no-files-found: warn
64+
retention-days: 14

.github/workflows/build-main.yml

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: build main
1+
name: Build Main / Version Branch
22

33
on:
44
push:
55
branches:
66
- master
77
- 1.*
88
- 2.*
9+
- 3.*
910

1011
jobs:
1112
build:
@@ -15,35 +16,39 @@ jobs:
1516

1617
runs-on: ${{ matrix.os }}
1718
steps:
18-
1919
- uses: actions/checkout@v5
2020

21-
- name: Set up JDK 17
21+
- name: Set up JDK
2222
uses: actions/setup-java@v5
2323
with:
2424
distribution: 'temurin'
2525
java-version: '17'
2626
cache: 'maven'
27+
cache-dependency-path: '**/pom.xml'
2728

28-
- name: Cache node modules
29-
uses: actions/cache@v4
30-
env:
31-
cache-name: cache-node-modules
29+
- name: Set up Node
30+
uses: actions/setup-node@v4
3231
with:
33-
path: ~/.npm
34-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
35-
restore-keys: |
36-
${{ runner.os }}-build-${{ env.cache-name }}-
32+
node-version: 'lts/*'
33+
cache: 'npm'
34+
cache-dependency-path: '**/package-lock.json'
3735

38-
# since we also build on Windows Powershell, we need to add a space between -D maven.javadoc.skip=true
39-
# otherwise the build will fail https://stackoverflow.com/questions/38051787/maven-javadoc-skip-true-throws-an-error
4036
- name: Build with Maven
41-
run: |
42-
./mvnw -B verify -P coverage --no-transfer-progress -D maven.javadoc.skip=true
37+
run: ./mvnw -B --no-transfer-progress install -P coverage
4338

44-
- uses: codecov/codecov-action@v5
39+
- name: Upload surefire reports
40+
if: always()
41+
uses: actions/upload-artifact@v4
4542
with:
46-
files: "'*/jacoco.xml'"
43+
name: surefire-reports
44+
path: |
45+
**/target/surefire-reports/*.xml
46+
**/target/surefire-reports/*.txt
47+
**/target/surefire-reports/*.dump*
48+
**/target/surefire-reports/*.out
49+
**/target/surefire-reports/*.err
50+
if-no-files-found: warn
51+
retention-days: 14
4752

4853
publish-snapshot:
4954
needs: build
@@ -52,24 +57,20 @@ jobs:
5257
steps:
5358
- uses: actions/checkout@v5
5459

55-
- name: Set up JDK 17
60+
- name: Set up JDK
5661
uses: actions/setup-java@v5
5762
with:
5863
distribution: 'temurin'
5964
java-version: '17'
6065
cache: 'maven'
66+
cache-dependency-path: '**/pom.xml'
6167

62-
- name: Cache node modules
63-
uses: actions/cache@v4
64-
env:
65-
cache-name: cache-node-modules
68+
- name: Set up Node
69+
uses: actions/setup-node@v4
6670
with:
67-
path: ~/.npm
68-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
69-
restore-keys: |
70-
${{ runner.os }}-build-${{ env.cache-name }}-
71-
${{ runner.os }}-build-
72-
${{ runner.os }}-
71+
node-version: 'lts/*'
72+
cache: 'npm'
73+
cache-dependency-path: '**/package-lock.json'
7374

7475
- name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded)
7576
run: ./mvnw -B --no-transfer-progress deploy -DskipTests
@@ -83,10 +84,13 @@ jobs:
8384
- name: Show extracted Maven project version
8485
run: echo ${{ steps.project.outputs.version }}
8586

86-
- name: Deploy Asciidoc docs output to GitHub Pages
87+
- name: Build documentation with Maven
88+
run: ./mvnw -B --no-transfer-progress site
89+
90+
- name: Deploy documentation to GitHub Pages
8791
uses: JamesIves/[email protected]
8892
with:
89-
branch: gh-pages # The branch the action should deploy to.
90-
folder: spring-boot-admin-docs/target/generated-docs # The folder the action should deploy.
93+
branch: gh-pages
94+
folder: spring-boot-admin-docs/target/generated-docs/build
9195
target-folder: ${{ steps.project.outputs.version }}
9296
clean: true # Automatically remove deleted files from the deploy branch

.github/workflows/deploy-documentation.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 📖 Deploy Documentation
1+
name: Deploy Documentation
22

33
on:
44
workflow_dispatch:
@@ -12,6 +12,7 @@ on:
1212
required: true
1313
type: boolean
1414
default: false
15+
1516
env:
1617
VERSION: ${{ github.event.inputs.releaseversion }}
1718

@@ -24,34 +25,31 @@ jobs:
2425
with:
2526
ref: refs/tags/${{ github.event.inputs.releaseversion }}
2627

27-
- name: Set up JDK 17
28+
- name: Set up JDK
2829
uses: actions/setup-java@v5
2930
with:
3031
distribution: 'temurin'
3132
java-version: '17'
3233
cache: 'maven'
34+
cache-dependency-path: '**/pom.xml'
3335

34-
- name: Cache node modules
35-
uses: actions/cache@v4
36-
env:
37-
cache-name: cache-node-modules
36+
- name: Set up Node
37+
uses: actions/setup-node@v4
3838
with:
39-
path: ~/.npm
40-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
41-
restore-keys: |
42-
${{ runner.os }}-build-${{ env.cache-name }}-
43-
${{ runner.os }}-build-
44-
${{ runner.os }}-
39+
node-version: 'lts/*'
40+
cache: 'npm'
41+
cache-dependency-path: '**/package-lock.json'
4542

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

4946
- name: Build with Maven
50-
run: ./mvnw -B --no-transfer-progress install -DskipTests
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
run: ./mvnw -B --no-transfer-progress package -DskipTests
48+
49+
- name: Build documentation with Maven
50+
run: ./mvnw -B --no-transfer-progress -pl spring-boot-admin-docs site
5351

54-
- name: Deploy documentation to GitHub Pages for version ${{ github.event.inputs.releaseversion }}
52+
- name: Deploy documentation to GitHub Pages
5553
uses: JamesIves/[email protected]
5654
with:
5755
branch: gh-pages

.github/workflows/release-to-maven-central.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
sudo swapoff -a
3030
sudo rm -f /swapfile
3131
sudo apt clean
32-
docker rmi $(docker image ls -aq)
32+
if [ -n "$(docker image ls -q)" ]; then
33+
docker rmi -f $(docker image ls -aq) || true
34+
fi
3335
df -h
3436
3537
- uses: actions/checkout@v5
@@ -72,6 +74,9 @@ jobs:
7274
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
7375
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
7476

77+
- name: Build documentation with Maven
78+
run: ./mvnw -B --no-transfer-progress -pl spring-boot-admin-docs site
79+
7580
- name: Deploy documentation to GitHub Pages for version ${{ github.event.inputs.releaseversion }}
7681
uses: JamesIves/[email protected]
7782
with:
@@ -112,7 +117,9 @@ jobs:
112117
sudo swapoff -a
113118
sudo rm -f /swapfile
114119
sudo apt clean
115-
docker rmi $(docker image ls -aq)
120+
if [ -n "$(docker image ls -q)" ]; then
121+
docker rmi -f $(docker image ls -aq) || true
122+
fi
116123
df -h
117124
118125
- name: Generate changelog

pom.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
<!-- because of https://github.com/mojohaus/versions/issues/855 -->
6565
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
6666
<maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
67-
<maven-site-plugin.version>3.21.0</maven-site-plugin.version>
6867
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
6968
<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
7069
<maven-enforcer-plugin.version>3.6.1</maven-enforcer-plugin.version>
@@ -185,6 +184,16 @@
185184
<parameters>true</parameters>
186185
<source>${maven.compiler.source}</source>
187186
<target>${maven.compiler.target}</target>
187+
<annotationProcessorPaths>
188+
<path>
189+
<groupId>org.projectlombok</groupId>
190+
<artifactId>lombok</artifactId>
191+
</path>
192+
<path>
193+
<groupId>org.springframework.boot</groupId>
194+
<artifactId>spring-boot-configuration-processor</artifactId>
195+
</path>
196+
</annotationProcessorPaths>
188197
</configuration>
189198
</plugin>
190199
<plugin>
@@ -268,11 +277,6 @@
268277
<artifactId>maven-clean-plugin</artifactId>
269278
<version>${maven-clean-plugin.version}</version>
270279
</plugin>
271-
<plugin>
272-
<groupId>org.apache.maven.plugins</groupId>
273-
<artifactId>maven-site-plugin</artifactId>
274-
<version>${maven-site-plugin.version}</version>
275-
</plugin>
276280
<plugin>
277281
<groupId>org.apache.maven.plugins</groupId>
278282
<artifactId>maven-source-plugin</artifactId>
@@ -351,6 +355,9 @@
351355
<artifactId>maven-surefire-plugin</artifactId>
352356
<version>${maven-surefire-plugin.version}</version>
353357
<configuration>
358+
<parallel>classesAndMethods</parallel>
359+
<useUnlimitedThreads>false</useUnlimitedThreads>
360+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
354361
<rerunFailingTestsCount>2</rerunFailingTestsCount>
355362
<includes>
356363
<include>**/*Tests.java</include>

spring-boot-admin-docs/pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@
5151
<goals>
5252
<goal>install-node-and-npm</goal>
5353
</goals>
54+
<phase>pre-site</phase>
5455
<configuration>
5556
<nodeVersion>${node.version}</nodeVersion>
5657
</configuration>
5758
</execution>
5859
<execution>
5960
<id>npm-install</id>
60-
<phase>compile</phase>
61+
<phase>pre-site</phase>
6162
<goals>
6263
<goal>npm</goal>
6364
</goals>
@@ -67,7 +68,7 @@
6768
</execution>
6869
<execution>
6970
<id>npm-build</id>
70-
<phase>prepare-package</phase>
71+
<phase>site</phase>
7172
<goals>
7273
<goal>npm</goal>
7374
</goals>
@@ -86,7 +87,7 @@
8687
<goals>
8788
<goal>generate-and-aggregate-documents</goal>
8889
</goals>
89-
<phase>generate-resources</phase>
90+
<phase>pre-site</phase>
9091
<configuration>
9192
<type>ADOC</type>
9293
<inputs>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_custom_props:
3+
icon: 'server'
4+
---
5+
6+
# Spring Boot Admin Client
7+
8+
The Spring Boot Admin Client is a Spring Boot Starter that registers itself with the Spring Boot Admin Server to
9+
enable monitoring and management. By including the Spring Boot Admin Client Starter dependency in your application, the
10+
Spring Boot Admin Server can access health, metrics, and other management endpoints, depending on which
11+
Actuator endpoints are accessible.
12+
13+
## Properties
14+
15+
import metadata from "../../../../../spring-boot-admin-client/target/classes/META-INF/spring-configuration-metadata.json";
16+
import { PropertyTable } from "../../src/components/PropertyTable";
17+
18+
<PropertyTable
19+
properties={metadata.properties}
20+
/>

0 commit comments

Comments
 (0)