Skip to content

Commit 41f26d3

Browse files
committed
Merge branch '2.1.x' into 2.2.x
Closes gh-20862
2 parents 1960c90 + 1a3df29 commit 41f26d3

7 files changed

+17
-5
lines changed

ci/pipeline.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ jobs:
183183
GITHUB_PASSWORD: ((github-password))
184184
GITHUB_USERNAME: ((github-username))
185185
JDK_VERSION: java8
186+
MILESTONE: ((branch))
186187
image: spring-boot-ci-image
187188
- task: detect-jdk11-update
188189
file: git-repo/ci/tasks/detect-jdk-updates.yml
@@ -192,6 +193,7 @@ jobs:
192193
GITHUB_PASSWORD: ((github-password))
193194
GITHUB_USERNAME: ((github-username))
194195
JDK_VERSION: java11
196+
MILESTONE: ((branch))
195197
image: spring-boot-ci-image
196198
- task: detect-jdk14-update
197199
file: git-repo/ci/tasks/detect-jdk-updates.yml
@@ -201,6 +203,7 @@ jobs:
201203
GITHUB_PASSWORD: ((github-password))
202204
GITHUB_USERNAME: ((github-username))
203205
JDK_VERSION: java14
206+
MILESTONE: ((branch))
204207
image: spring-boot-ci-image
205208
- name: detect-ubuntu-image-updates
206209
plan:
@@ -216,6 +219,7 @@ jobs:
216219
GITHUB_ORGANIZATION: spring-projects
217220
GITHUB_PASSWORD: ((github-password))
218221
GITHUB_USERNAME: ((github-username))
222+
MILESTONE: ((branch))
219223
image: spring-boot-ci-image
220224
- name: detect-docker-updates
221225
plan:
@@ -230,6 +234,7 @@ jobs:
230234
params:
231235
GITHUB_REPO: spring-boot
232236
GITHUB_ORGANIZATION: spring-projects
237+
MILESTONE: ((branch))
233238
image: spring-boot-ci-image
234239
- put: git-repo-ci-docker
235240
params:

ci/scripts/detect-docker-updates.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
latest_version=$(curl -I -s https://github.com/docker/docker-ce/releases/latest | grep "location:" | awk '{n=split($0, parts, "/"); print substr(parts[n],2);}' | awk '{$1=$1;print}' | tr -d '\r' | tr -d '\n' )
44
title_prefix="Upgrade CI to Docker"
55

6-
existing_upgrade_issues=$( curl -s https://api.github.com/repos/spring-projects/spring-boot/issues\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster | jq -c --arg TITLE_PREFIX "$title_prefix" '.[] | select(.pull_request != null) | select(.title | startswith($TITLE_PREFIX))' )
6+
milestone_number=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number')
7+
8+
existing_upgrade_issues=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster\&milestone\=${milestone_number} | jq -c --arg TITLE_PREFIX "$title_prefix" '.[] | select(.pull_request != null) | select(.title | startswith($TITLE_PREFIX))' )
79

810
if [[ ${existing_upgrade_issues} = "" ]]; then
911
git clone git-repo git-repo-updated > /dev/null

ci/scripts/detect-jdk-updates.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ if [[ $current = $latest ]]; then
2828
exit 0;
2929
fi
3030

31-
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster )
31+
milestone_number=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number')
32+
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster\&milestone\=${milestone_number} )
3233
existing_jdk_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' )
3334

3435
if [[ ${existing_jdk_issues} = "" ]]; then
3536
curl \
3637
-s \
3738
-u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} \
3839
-H "Content-type:application/json" \
39-
-d "{\"title\":\"${ISSUE_TITLE}\",\"body\": \"${latest}\",\"labels\":[\"status: waiting-for-triage\",\"type: task\"]}" \
40+
-d "{\"title\":\"${ISSUE_TITLE}\",\"milestone\":\"${milestone_number}\",\"body\": \"${latest}\",\"labels\":[\"status: waiting-for-triage\",\"type: task\"]}" \
4041
-f \
4142
-X \
4243
POST "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues" > /dev/null || { echo "Failed to create issue" >&2; exit 1; }

ci/scripts/detect-ubuntu-image-updates.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ if [[ $current = $latest ]]; then
1111
exit 0;
1212
fi
1313

14-
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster )
14+
milestone_number=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number')
15+
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster\&milestone\=${milestone_number} )
1516
existing_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' )
1617

1718
if [[ ${existing_upgrade_issues} = "" ]]; then
1819
curl \
1920
-s \
2021
-u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} \
2122
-H "Content-type:application/json" \
22-
-d "{\"title\":\"${ISSUE_TITLE}\",\"body\": \"Upgrade to ubuntu:${ubuntu}-${latest}\",\"labels\":[\"status: waiting-for-triage\",\"type: task\"]}" \
23+
-d "{\"title\":\"${ISSUE_TITLE}\",\"milestone\":\"${milestone_number}\",\"body\": \"Upgrade to ubuntu:${ubuntu}-${latest}\",\"labels\":[\"status: waiting-for-triage\",\"type: task\"]}" \
2324
-f \
2425
-X \
2526
POST "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues" > /dev/null || { echo "Failed to create issue" >&2; exit 1; }

ci/tasks/detect-docker-updates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ outputs:
99
params:
1010
GITHUB_REPO:
1111
GITHUB_ORGANIZATION:
12+
MILESTONE:
1213
run:
1314
path: git-repo/ci/scripts/detect-docker-updates.sh

ci/tasks/detect-jdk-updates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ params:
88
GITHUB_PASSWORD:
99
GITHUB_USERNAME:
1010
JDK_VERSION:
11+
MILESTONE:
1112
run:
1213
path: git-repo/ci/scripts/detect-jdk-updates.sh

ci/tasks/detect-ubuntu-image-updates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ params:
77
GITHUB_ORGANIZATION:
88
GITHUB_PASSWORD:
99
GITHUB_USERNAME:
10+
MILESTONE:
1011
run:
1112
path: git-repo/ci/scripts/detect-ubuntu-image-updates.sh

0 commit comments

Comments
 (0)