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
1a314a1d
Commit
1a314a1d
authored
Mar 01, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.2.x'
Closes gh-20359
parents
860814b6
8c6dc8bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
pipeline.yml
ci/pipeline.yml
+16
-1
detect-ubuntu-image-updates.sh
ci/scripts/detect-ubuntu-image-updates.sh
+28
-0
detect-ubuntu-image-updates.yml
ci/tasks/detect-ubuntu-image-updates.yml
+11
-0
No files found.
ci/pipeline.yml
View file @
1a314a1d
...
...
@@ -194,6 +194,21 @@ jobs:
GITHUB_USERNAME
:
((github-username))
JDK_VERSION
:
java13
image
:
spring-boot-ci-image
-
name
:
detect-ubuntu-image-updates
plan
:
-
get
:
git-repo
-
get
:
every-wednesday
trigger
:
true
-
get
:
spring-boot-ci-image
-
do
:
-
task
:
detect-ubuntu-image-updates
file
:
git-repo/ci/tasks/detect-ubuntu-image-updates.yml
params
:
GITHUB_REPO
:
spring-boot
GITHUB_ORGANIZATION
:
spring-projects
GITHUB_PASSWORD
:
((github-password))
GITHUB_USERNAME
:
((github-username))
image
:
spring-boot-ci-image
-
name
:
build
serial
:
true
public
:
true
...
...
@@ -579,6 +594,6 @@ groups:
-
name
:
"
Release"
jobs
:
[
"
stage-milestone"
,
"
stage-rc"
,
"
stage-release"
,
"
promote-milestone"
,
"
promote-rc"
,
"
promote-release"
,
"
sync-to-maven-central"
]
-
name
:
"
CI
Images"
jobs
:
[
"
build-spring-boot-ci-images"
,
"
detect-jdk-updates"
]
jobs
:
[
"
build-spring-boot-ci-images"
,
"
detect-jdk-updates"
,
"
detect-ubuntu-image-updates"
]
-
name
:
"
Build
Pull
Requests"
jobs
:
[
"
build-pull-requests"
]
ci/scripts/detect-ubuntu-image-updates.sh
0 → 100755
View file @
1a314a1d
#!/bin/bash
ISSUE_TITLE
=
"Upgrade Ubuntu version in CI images"
ubuntu
=
"bionic"
latest
=
$(
curl
-s
"https://partner-images.canonical.com/core/
$ubuntu
/current/unpacked/build-info.txt"
|
awk
'{split($0, parts, "="); print parts[2]}'
)
current
=
$(
grep
"ubuntu:
$ubuntu
"
git-repo/ci/images/spring-boot-ci-image/Dockerfile |
awk
'{split($0, parts, "-"); print parts[2]}'
)
if
[[
$current
=
$latest
]]
;
then
echo
"Already up-to-date"
exit
0
;
fi
existing_tasks
=
$(
curl
-s
https://api.github.com/repos/
${
GITHUB_ORGANIZATION
}
/
${
GITHUB_REPO
}
/issues
\?
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
curl
\
-s
\
-u
${
GITHUB_USERNAME
}
:
${
GITHUB_PASSWORD
}
\
-H
"Content-type:application/json"
\
-d
"{
\"
title
\"
:
\"
${
ISSUE_TITLE
}
\"
,
\"
body
\"
:
\"
Upgrade to ubuntu:
${
ubuntu
}
-
${
latest
}
\"
,
\"
labels
\"
:[
\"
status: waiting-for-triage
\"
,
\"
type: task
\"
]}"
\
-f
\
-X
\
POST
"https://api.github.com/repos/
${
GITHUB_ORGANIZATION
}
/
${
GITHUB_REPO
}
/issues"
>
/dev/null
||
{
echo
"Failed to create issue"
>
&2
;
exit
1
;
}
else
echo
"Issue already exists."
fi
ci/tasks/detect-ubuntu-image-updates.yml
0 → 100644
View file @
1a314a1d
---
platform
:
linux
inputs
:
-
name
:
git-repo
params
:
GITHUB_REPO
:
GITHUB_ORGANIZATION
:
GITHUB_PASSWORD
:
GITHUB_USERNAME
:
run
:
path
:
git-repo/ci/scripts/detect-ubuntu-image-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