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
60311af1
Commit
60311af1
authored
Mar 31, 2020
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x' into 2.2.x
parents
7b667e50
1ea8c7b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
19 deletions
+23
-19
pipeline.yml
ci/pipeline.yml
+1
-0
create-pull-request.sh
ci/scripts/create-pull-request.sh
+1
-1
detect-docker-updates.sh
ci/scripts/detect-docker-updates.sh
+20
-18
detect-docker-updates.yml
ci/tasks/detect-docker-updates.yml
+1
-0
No files found.
ci/pipeline.yml
View file @
60311af1
...
@@ -220,6 +220,7 @@ jobs:
...
@@ -220,6 +220,7 @@ jobs:
-
name
:
detect-docker-updates
-
name
:
detect-docker-updates
plan
:
plan
:
-
get
:
git-repo
-
get
:
git-repo
-
get
:
git-repo-ci-docker
-
get
:
every-wednesday
-
get
:
every-wednesday
trigger
:
true
trigger
:
true
-
get
:
spring-boot-ci-image
-
get
:
spring-boot-ci-image
...
...
ci/scripts/create-pull-request.sh
View file @
60311af1
...
@@ -11,5 +11,5 @@ if [[ -f commit-details/message ]]; then
...
@@ -11,5 +11,5 @@ if [[ -f commit-details/message ]]; then
-X
\
-X
\
POST
"https://api.github.com/repos/
${
GITHUB_ORGANIZATION
}
/
${
GITHUB_REPO
}
/pulls"
>
/dev/null
||
{
echo
"Failed to create pull request"
>
&2
;
exit
1
;
}
POST
"https://api.github.com/repos/
${
GITHUB_ORGANIZATION
}
/
${
GITHUB_REPO
}
/pulls"
>
/dev/null
||
{
echo
"Failed to create pull request"
>
&2
;
exit
1
;
}
else
else
echo
"Already up-to-date"
echo
"Already up-to-date
.
"
fi
fi
\ No newline at end of file
ci/scripts/detect-docker-updates.sh
View file @
60311af1
#!/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
)
existing_upgrade_issues
=
$(
echo
"
$existing_tasks
"
| jq
-c
--arg
TITLE
"
$ISSUE_TITLE
"
'.[] | select(.title==$TITLE)'
)
if
[[
${
existing_upgrade_issues
}
=
""
]]
;
then
git clone git-repo git-repo-updated
>
/dev/null
else
git clone git-repo-ci-docker git-repo-updated
>
/dev/null
echo
"Pull request already exists."
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'
)
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
...
@@ -15,21 +26,12 @@ if [[ $current = $latest ]]; then
...
@@ -15,21 +26,12 @@ if [[ $current = $latest ]]; then
exit
0
;
exit
0
;
fi
fi
existing_tasks
=
$(
curl
-s
https://api.github.com/repos/
${
GITHUB_ORGANIZATION
}
/
${
GITHUB_REPO
}
/pulls
\?
labels
\=
type
:%20task
\&
state
\=
open
\&
creator
\=
spring-buildmaster
)
pushd
git-repo-updated
>
/dev/null
existing_upgrade_issues
=
$(
echo
"
$existing_tasks
"
| jq
-c
--arg
TITLE
"
$ISSUE_TITLE
"
'.[] | select(.title==$TITLE)'
)
git config user.name
"Spring Buildmaster"
>
/dev/null
git config user.email
"buildmaster@springframework.org"
>
/dev/null
git clone git-repo git-repo-updated
>
/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
if
[[
${
existing_upgrade_issues
}
=
""
]]
;
then
commit_message
=
"Upgrade to Docker
$latest_version
in CI"
pushd
git-repo-updated
>
/dev/null
git commit
-m
"
$commit_message
"
>
/dev/null
git config user.name
"Spring Buildmaster"
>
/dev/null
popd
git config user.email
"buildmaster@springframework.org"
>
/dev/null
echo
${
commit_message
}
>
commit-details/message
sed
-i
"s/version=.*/version=
\"
$latest_version
\"
/"
ci/images/get-docker-url.sh
\ No newline at end of file
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
popd
echo
${
commit_message
}
>
commit-details/message
else
echo
"Pull request already exists."
fi
ci/tasks/detect-docker-updates.yml
View file @
60311af1
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
platform
:
linux
platform
:
linux
inputs
:
inputs
:
-
name
:
git-repo
-
name
:
git-repo
-
name
:
git-repo-ci-docker
outputs
:
outputs
:
-
name
:
git-repo-updated
-
name
:
git-repo-updated
-
name
:
commit-details
-
name
:
commit-details
...
...
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