|
|
|
@ -18,20 +18,17 @@ fi
|
|
|
|
|
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)' )
|
|
|
|
|
|
|
|
|
|
git clone git-repo git-repo-updated > /dev/null
|
|
|
|
|
|
|
|
|
|
if [[ ${existing_upgrade_issues} = "" ]]; then
|
|
|
|
|
pushd git-repo > /dev/null
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
git clone git-repo docker-updates-git-repo > /dev/null
|
|
|
|
|
pushd docker-updates-git-repo > /dev/null
|
|
|
|
|
# Create changes in dedicated branch
|
|
|
|
|
branch="ci-docker-$latest_version"
|
|
|
|
|
pushd git-repo-updated > /dev/null
|
|
|
|
|
git config user.name "Spring Buildmaster" > /dev/null
|
|
|
|
|
git config user.email "buildmaster@springframework.org" > /dev/null
|
|
|
|
|
git checkout -b "$branch" origin/master > /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"
|
|
|
|
|
git commit -m "$commit_message" > /dev/null
|
|
|
|
|
echo ${commit_message} > commit-details/message
|
|
|
|
|
else
|
|
|
|
|
echo "Pull request already exists."
|
|
|
|
|
fi
|
|
|
|
|