mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Harmonize issue title for auto-created Docker upgrade issues
See gh-20793
This commit is contained in:
parent
1ea8c7b55d
commit
0ee6108427
@ -1,4 +1,3 @@
|
||||
docker-upgrade-issue-title: "Upgrade Docker version in CI"
|
||||
email-server: "smtp.svc.pivotal.io"
|
||||
email-from: "ci@spring.io"
|
||||
email-to: ["spring-boot-dev@pivotal.io"]
|
||||
|
@ -199,7 +199,6 @@ jobs:
|
||||
params:
|
||||
GITHUB_REPO: spring-boot
|
||||
GITHUB_ORGANIZATION: spring-projects
|
||||
ISSUE_TITLE: ((docker-upgrade-issue-title))
|
||||
image: spring-boot-ci-image
|
||||
- put: git-repo-ci-docker
|
||||
params:
|
||||
@ -214,7 +213,6 @@ jobs:
|
||||
GITHUB_ORGANIZATION: spring-projects
|
||||
GITHUB_PASSWORD: ((github-password))
|
||||
GITHUB_USERNAME: ((github-username))
|
||||
ISSUE_TITLE: ((docker-upgrade-issue-title))
|
||||
image: spring-boot-ci-image
|
||||
- name: build
|
||||
serial: true
|
||||
|
@ -2,6 +2,7 @@
|
||||
set -e
|
||||
|
||||
if [[ -f commit-details/message ]]; then
|
||||
ISSUE_TITLE="$(cat commit-details/message)"
|
||||
curl \
|
||||
-s \
|
||||
-u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} \
|
||||
|
@ -1,7 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/pulls\?labels\=type:%20task\&state\=open\&creator\=spring-buildmaster )
|
||||
existing_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' )
|
||||
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' )
|
||||
title_prefix="Upgrade CI to Docker"
|
||||
|
||||
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))' )
|
||||
|
||||
if [[ ${existing_upgrade_issues} = "" ]]; then
|
||||
git clone git-repo git-repo-updated > /dev/null
|
||||
@ -11,8 +13,6 @@ else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
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' )
|
||||
|
||||
if [[ $latest_version =~ (beta|rc) ]]; then
|
||||
echo "Skip pre-release versions"
|
||||
exit 0;
|
||||
@ -31,7 +31,7 @@ git config user.name "Spring Buildmaster" > /dev/null
|
||||
git config user.email "buildmaster@springframework.org" > /dev/null
|
||||
sed -i "s/version=.*/version=\"$latest_version\"/" ci/images/get-docker-url.sh
|
||||
git add ci/images/get-docker-url.sh > /dev/null
|
||||
commit_message="Upgrade to Docker $latest_version in CI"
|
||||
commit_message="$title_prefix $latest_version"
|
||||
git commit -m "$commit_message" > /dev/null
|
||||
popd
|
||||
echo ${commit_message} > commit-details/message
|
@ -10,6 +10,5 @@ params:
|
||||
GITHUB_ORGANIZATION:
|
||||
GITHUB_PASSWORD:
|
||||
GITHUB_USERNAME:
|
||||
ISSUE_TITLE:
|
||||
run:
|
||||
path: git-repo/ci/scripts/create-pull-request.sh
|
||||
|
@ -9,6 +9,5 @@ outputs:
|
||||
params:
|
||||
GITHUB_REPO:
|
||||
GITHUB_ORGANIZATION:
|
||||
ISSUE_TITLE:
|
||||
run:
|
||||
path: git-repo/ci/scripts/detect-docker-updates.sh
|
||||
|
Loading…
Reference in New Issue
Block a user