Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
053e531f
Commit
053e531f
authored
Apr 02, 2020
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.2.x'
Closes gh-20802
parents
cc2852ce
d1ef1961
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
10 deletions
+6
-10
parameters.yml
ci/parameters.yml
+0
-1
pipeline.yml
ci/pipeline.yml
+0
-2
create-pull-request.sh
ci/scripts/create-pull-request.sh
+1
-0
detect-docker-updates.sh
ci/scripts/detect-docker-updates.sh
+5
-5
create-pull-request.yml
ci/tasks/create-pull-request.yml
+0
-1
detect-docker-updates.yml
ci/tasks/detect-docker-updates.yml
+0
-1
No files found.
ci/parameters.yml
View file @
053e531f
docker-upgrade-issue-title
:
"
Upgrade
Docker
version
in
CI"
email-server
:
"
smtp.svc.pivotal.io"
email-server
:
"
smtp.svc.pivotal.io"
email-from
:
"
ci@spring.io"
email-from
:
"
ci@spring.io"
email-to
:
[
"
spring-boot-dev@pivotal.io"
]
email-to
:
[
"
spring-boot-dev@pivotal.io"
]
...
...
ci/pipeline.yml
View file @
053e531f
...
@@ -230,7 +230,6 @@ jobs:
...
@@ -230,7 +230,6 @@ jobs:
params
:
params
:
GITHUB_REPO
:
spring-boot
GITHUB_REPO
:
spring-boot
GITHUB_ORGANIZATION
:
spring-projects
GITHUB_ORGANIZATION
:
spring-projects
ISSUE_TITLE
:
((docker-upgrade-issue-title))
image
:
spring-boot-ci-image
image
:
spring-boot-ci-image
-
put
:
git-repo-ci-docker
-
put
:
git-repo-ci-docker
params
:
params
:
...
@@ -245,7 +244,6 @@ jobs:
...
@@ -245,7 +244,6 @@ jobs:
GITHUB_ORGANIZATION
:
spring-projects
GITHUB_ORGANIZATION
:
spring-projects
GITHUB_PASSWORD
:
((github-password))
GITHUB_PASSWORD
:
((github-password))
GITHUB_USERNAME
:
((github-username))
GITHUB_USERNAME
:
((github-username))
ISSUE_TITLE
:
((docker-upgrade-issue-title))
image
:
spring-boot-ci-image
image
:
spring-boot-ci-image
-
name
:
build
-
name
:
build
serial
:
true
serial
:
true
...
...
ci/scripts/create-pull-request.sh
View file @
053e531f
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
set
-e
set
-e
if
[[
-f
commit-details/message
]]
;
then
if
[[
-f
commit-details/message
]]
;
then
ISSUE_TITLE
=
"
$(
cat
commit-details/message
)
"
curl
\
curl
\
-s
\
-s
\
-u
${
GITHUB_USERNAME
}
:
${
GITHUB_PASSWORD
}
\
-u
${
GITHUB_USERNAME
}
:
${
GITHUB_PASSWORD
}
\
...
...
ci/scripts/detect-docker-updates.sh
View file @
053e531f
#!/bin/bash
#!/bin/bash
existing_tasks
=
$(
curl
-s
https://api.github.com/repos/
${
GITHUB_ORGANIZATION
}
/
${
GITHUB_REPO
}
/pulls
\?
labels
\=
type
:%20task
\&
state
\=
open
\&
creator
\=
spring-buildmaster
)
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'
)
existing_upgrade_issues
=
$(
echo
"
$existing_tasks
"
| jq
-c
--arg
TITLE
"
$ISSUE_TITLE
"
'.[] | select(.title==$TITLE)'
)
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
if
[[
${
existing_upgrade_issues
}
=
""
]]
;
then
git clone git-repo git-repo-updated
>
/dev/null
git clone git-repo git-repo-updated
>
/dev/null
...
@@ -11,8 +13,6 @@ else
...
@@ -11,8 +13,6 @@ else
exit
0
exit
0
fi
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
if
[[
$latest_version
=
~
(
beta|rc
)
]]
;
then
echo
"Skip pre-release versions"
echo
"Skip pre-release versions"
exit
0
;
exit
0
;
...
@@ -31,7 +31,7 @@ git config user.name "Spring Buildmaster" > /dev/null
...
@@ -31,7 +31,7 @@ git config user.name "Spring Buildmaster" > /dev/null
git config user.email
"buildmaster@springframework.org"
>
/dev/null
git config user.email
"buildmaster@springframework.org"
>
/dev/null
sed
-i
"s/version=.*/version=
\"
$latest_version
\"
/"
ci/images/get-docker-url.sh
sed
-i
"s/version=.*/version=
\"
$latest_version
\"
/"
ci/images/get-docker-url.sh
git add ci/images/get-docker-url.sh
>
/dev/null
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
git commit
-m
"
$commit_message
"
>
/dev/null
popd
popd
echo
${
commit_message
}
>
commit-details/message
echo
${
commit_message
}
>
commit-details/message
\ No newline at end of file
ci/tasks/create-pull-request.yml
View file @
053e531f
...
@@ -10,6 +10,5 @@ params:
...
@@ -10,6 +10,5 @@ params:
GITHUB_ORGANIZATION
:
GITHUB_ORGANIZATION
:
GITHUB_PASSWORD
:
GITHUB_PASSWORD
:
GITHUB_USERNAME
:
GITHUB_USERNAME
:
ISSUE_TITLE
:
run
:
run
:
path
:
git-repo/ci/scripts/create-pull-request.sh
path
:
git-repo/ci/scripts/create-pull-request.sh
ci/tasks/detect-docker-updates.yml
View file @
053e531f
...
@@ -9,6 +9,5 @@ outputs:
...
@@ -9,6 +9,5 @@ outputs:
params
:
params
:
GITHUB_REPO
:
GITHUB_REPO
:
GITHUB_ORGANIZATION
:
GITHUB_ORGANIZATION
:
ISSUE_TITLE
:
run
:
run
:
path
:
git-repo/ci/scripts/detect-docker-updates.sh
path
:
git-repo/ci/scripts/detect-docker-updates.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment