Skip to content

Commit 9540811

Browse files
committed
Update projects and deploy action so defaults section is separated into an oss and commercial section
1 parent 88f240a commit 9540811

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
CONFIG_PATH=".[\"$BASE_REPO_NAME\"].$CONFIG_SECTION"
8989
else
9090
echo "No specific configuration found for $BASE_REPO_NAME, using defaults"
91-
CONFIG_PATH=".defaults"
91+
CONFIG_PATH=".defaults.$CONFIG_SECTION"
9292
fi
9393
9494
# Determine the branch to use
@@ -101,7 +101,7 @@ jobs:
101101
# Determine which branches to build based on event type
102102
if [[ "${{ github.event_name }}" == "schedule" ]]; then
103103
echo "Trigger: Scheduled run - building multiple branches"
104-
BRANCHES=$(jq -r "$CONFIG_PATH.branches.scheduled // .defaults.branches.scheduled" "$CONFIG_FILE" | jq -r '.[]')
104+
BRANCHES=$(jq -r "$CONFIG_PATH.branches.scheduled // .defaults.$CONFIG_SECTION.branches.scheduled" "$CONFIG_FILE" | jq -r '.[]')
105105
else
106106
echo "Trigger: ${{ github.event_name }} - building single branch"
107107
BRANCHES="$BRANCH"
@@ -122,12 +122,12 @@ jobs:
122122
123123
# Get JDK versions for this branch
124124
JDK_VERSIONS=$(jq -r --arg branch "$BRANCH" \
125-
"$CONFIG_PATH.jdkVersions[\$branch] // $CONFIG_PATH.jdkVersions.default // .defaults.jdkVersions.default" \
125+
"$CONFIG_PATH.jdkVersions[\$branch] // $CONFIG_PATH.jdkVersions.default // .defaults.$CONFIG_SECTION.jdkVersions.default" \
126126
"$CONFIG_FILE" | jq -r '.[]')
127127
128128
if [[ -z "$JDK_VERSIONS" ]]; then
129129
# Fallback to global defaults
130-
JDK_VERSIONS=$(jq -r '.defaults.jdkVersions.default[]' "$CONFIG_FILE")
130+
JDK_VERSIONS=$(jq -r ".defaults.$CONFIG_SECTION.jdkVersions.default[]" "$CONFIG_FILE")
131131
fi
132132
133133
echo " JDK versions: $JDK_VERSIONS"

config/projects.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
}
2424
},
25-
"spring-cloud-build": {
25+
"defaults": {
2626
"oss": {
2727
"branches": {
2828
"scheduled": ["main", "4.3.x", "4.2.x"],
@@ -31,7 +31,8 @@
3131
"jdkVersions": {
3232
"main": ["17", "21", "25"],
3333
"4.3.x": ["17", "21", "25"],
34-
"4.2.x": ["17", "21"]
34+
"4.2.x": ["17", "21"],
35+
"default": ["17", "21", "25"]
3536
}
3637
},
3738
"commercial": {
@@ -41,20 +42,10 @@
4142
},
4243
"jdkVersions": {
4344
"4.1.x": ["17", "21"],
44-
"3.1.x": ["8", "11", "17"]
45+
"3.1.x": ["8", "11", "17"],
46+
"default": ["17", "21"]
4547
}
4648
}
47-
},
48-
"defaults": {
49-
"branches": {
50-
"scheduled": ["main", "4.3.x", "4.2.x"],
51-
"default": ["main"]
52-
},
53-
"jdkVersions": {
54-
"main": ["17", "21", "25"],
55-
"4.3.x": ["17", "21", "25"],
56-
"4.2.x": ["17", "21"]
57-
}
5849
}
5950
}
6051

0 commit comments

Comments
 (0)