Skip to content

Commit d27ed7a

Browse files
authored
Update CI build and implement dependabot (#32)
This commit adds a new dependabot config file. Additionally, this commit uses a shared CI build that is common across multiple guides. The Gradle build files were modified to adhere to Spring Boot's recommendation and to simplify the Dependabot configuration.
1 parent 088140f commit d27ed7a

File tree

5 files changed

+38
-32
lines changed

5 files changed

+38
-32
lines changed

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "maven"
5+
directories:
6+
- "/initial"
7+
- "/complete"
8+
ignore:
9+
- dependency-name: "*"
10+
update-types: ["version-update:semver-patch"]
11+
schedule:
12+
interval: "monthly"
13+
target-branch: "main"
14+
groups:
15+
guide-dependencies-maven:
16+
patterns:
17+
- "*"
18+
19+
- package-ecosystem: "gradle"
20+
directories:
21+
- "/initial"
22+
- "/complete"
23+
ignore:
24+
- dependency-name: "*"
25+
update-types: ["version-update:semver-patch"]
26+
schedule:
27+
interval: "monthly"
28+
target-branch: "main"
29+
groups:
30+
guide-dependencies-gradle:
31+
patterns:
32+
- "*"

.github/workflows/continuous-integration-build.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,4 @@ on:
1010

1111
jobs:
1212
build:
13-
name: Build Main Branch
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- name: Checkout source code
18-
uses: actions/checkout@v3
19-
20-
- name: Set up JDK 17
21-
uses: actions/setup-java@v3
22-
with:
23-
java-version: '17'
24-
distribution: 'temurin'
25-
cache: maven
26-
27-
- name: Build Initial with Maven
28-
working-directory: ./initial
29-
run: ./mvnw --batch-mode clean package
30-
31-
- name: Build Initial with Gradle
32-
working-directory: ./initial
33-
run: ./gradlew build
34-
35-
- name: Build Complete with Maven
36-
working-directory: ./complete
37-
run: ./mvnw --batch-mode clean package
38-
39-
- name: Build Complete with Gradle
40-
working-directory: ./complete
41-
run: ./gradlew build
13+
uses: spring-guides/getting-started-macros/.github/workflows/build_initial_complete_maven_gradle.yml@main

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ You can now run `docker compose up` to start the Redis server.
159159
Now you should have an external Redis server that is ready to accept requests.
160160
You can rerun the application and see the same output using your external Redis server.
161161

162-
NOTE: No configuration is required in the `application.properties` file because the default values match the Redis server configuration in `compose.yaml`. Specifically, the properties `spring.data.redis.host` and `spring.data.redis.port` default to `localhost` and `6379` respectively.
162+
NOTE: No configuration is required in the `application.properties` file because the default values match the Redis server configuration in `compose.yaml`. Specifically, the properties `spring.data.redis.host` and `spring.data.redis.port` default to `localhost` and `6379` respectively. More information about connecting to Redis can be found in the https://docs.spring.io/spring-boot/reference/data/nosql.html#data.nosql.redis.connecting[Spring Boot documentation^].
163163

164164
include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/build_and_execute_guide.adoc[]
165165

complete/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
plugins {
22
id 'org.springframework.boot' version '3.3.0'
3-
id 'io.spring.dependency-management' version '1.1.5'
43
id 'java'
54
}
65

6+
apply plugin: 'io.spring.dependency-management'
7+
78
group = 'com.example'
89
version = '0.0.1-SNAPSHOT'
910
sourceCompatibility = '17'

initial/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
plugins {
22
id 'org.springframework.boot' version '3.3.0'
3-
id 'io.spring.dependency-management' version '1.1.5'
43
id 'java'
54
}
65

6+
apply plugin: 'io.spring.dependency-management'
7+
78
group = 'com.example'
89
version = '0.0.1-SNAPSHOT'
910
sourceCompatibility = '17'

0 commit comments

Comments
 (0)