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
e9232288
Commit
e9232288
authored
Nov 13, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
495d1b15
8fcad7bb
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
63 deletions
+104
-63
README.adoc
ci/images/README.adoc
+21
-0
docker-lib.sh
ci/images/docker-lib.sh
+13
-3
setup.sh
ci/images/setup.sh
+58
-0
Dockerfile
ci/images/spring-boot-ci-image/Dockerfile
+6
-30
Dockerfile
ci/images/spring-boot-jdk11-ci-image/Dockerfile
+6
-30
No files found.
ci/images/README.adoc
0 → 100644
View file @
e9232288
== CI Images
These images are used by CI to run the actual builds.
To build the image locally run the following from this directory:
----
$ docker build --no-cache -f <image-folder>/Dockerfile .
----
For example
----
$ docker build --no-cache -f spring-boot-ci-image/Dockerfile .
----
To test run:
----
$ docker run -it --entrypoint /bin/bash <SHA> ✈
----
ci/images/docker-lib.sh
View file @
e9232288
#
Ref
: https://github.com/concourse/docker-image-resource/blob/master/assets/common.sh
#
Based on
: https://github.com/concourse/docker-image-resource/blob/master/assets/common.sh
sanitize_cgroups
()
{
mkdir
-p
/sys/fs/cgroup
...
...
@@ -65,7 +65,7 @@ start_docker() {
server_args
=
"
${
server_args
}
-g=
$3
"
fi
docker
daemon
--data-root
/scratch/docker
${
server_args
}
>
/tmp/docker.log 2>&1 &
docker
d
--data-root
/scratch/docker
${
server_args
}
>
/tmp/docker.log 2>&1 &
echo
$!
>
/tmp/docker.pid
sleep
1
...
...
@@ -75,3 +75,13 @@ start_docker() {
sleep
1
done
}
stop_docker
()
{
local
pid
=
$(
cat
/tmp/docker.pid
)
if
[
-z
"
$pid
"
]
;
then
return
0
fi
kill
-TERM
$pid
wait
$pid
}
ci/images/setup.sh
0 → 100755
View file @
e9232288
#!/bin/bash
set
-ex
###########################################################
# UTILS
###########################################################
apt-get update
apt-get
install
--no-install-recommends
-y
ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables jq
rm
-rf
/var/lib/apt/lists/
*
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh
>
/opt/concourse-java.sh
###########################################################
# JAVA
###########################################################
case
"
$1
"
in
java8
)
JDK_URL
=
https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz
JDK_STRIP
=
2
;;
java9
)
JDK_URL
=
https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz
JDK_STRIP
=
1
;;
java10
)
JDK_URL
=
https://download.java.net/java/GA/jdk10/10.0.1/fb4372174a714e6b8c52526dc134031e/10/openjdk-10.0.1_linux-x64_bin.tar.gz
JDK_STRIP
=
1
;;
jav11
)
JDK_URL
=
https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
JDK_STRIP
=
1
;;
*
)
echo
$"Unknown java version"
exit
1
esac
mkdir
-p
/opt/openjdk
cd
/opt/openjdk
curl
-L
${
JDK_URL
}
|
tar
zx
--strip-components
=
${
JDK_STRIP
}
###########################################################
# DOCKER
###########################################################
cd
/
curl
-L
https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz |
tar
zx
mv
/docker/
*
/bin/
chmod
+x /bin/docker
*
export
ENTRYKIT_VERSION
=
0.4.0
curl
-L
https://github.com/progrium/entrykit/releases/download/v
${
ENTRYKIT_VERSION
}
/entrykit_
${
ENTRYKIT_VERSION
}
_Linux_x86_64.tgz |
tar
zx
chmod
+x entrykit
&&
\
mv
entrykit /bin/entrykit
&&
\
entrykit
--symlink
ci/images/spring-boot-ci-image/Dockerfile
View file @
e9232288
# 1.8.0_181-8u181-b13-1~deb9u1-b13
FROM
openjdk@sha256:1b842a215cf3437c9197f0f47e5c1a12f0a27aed27b84536ee3d8ef6b9b7e19e
FROM
ubuntu:bionic-20181018
RUN
apt-get update
&&
\
apt-get
install
-y
git
&&
\
apt-get
install
-y
libxml2-utils
&&
\
apt-get
install
-y
jq
ADD
https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
ENV
DOCKER_VERSION=17.05.0-ce \
ENTRYKIT_VERSION=0.4.0
RUN
apt-get update
&&
\
apt-get
install
-y
curl
&&
\
apt-get
install
-y
libudev1
&&
\
apt-get
install
-y
iptables
&&
\
curl https://get.docker.com/builds/Linux/x86_64/docker-
${
DOCKER_VERSION
}
.tgz |
tar
zx
&&
\
mv
/docker/
*
/bin/
&&
chmod
+x /bin/docker
*
# Install entrykit
RUN
curl
-L
https://github.com/progrium/entrykit/releases/download/v
${
ENTRYKIT_VERSION
}
/entrykit_
${
ENTRYKIT_VERSION
}
_Linux_x86_64.tgz |
tar
zx
&&
\
chmod
+x entrykit
&&
\
mv
entrykit /bin/entrykit
&&
\
entrykit
--symlink
ADD
setup.sh /setup.sh
RUN
./setup.sh java8
ENV
JAVA_HOME /opt/openjdk
ENV
PATH $JAVA_HOME/bin:$PATH
ADD
docker-lib.sh /docker-lib.sh
ENTRYPOINT
[ \
"switch", \
"shell=/bin/sh", "--", \
"codep", \
"/bin/docker daemon" \
]
\ No newline at end of file
ENTRYPOINT
[ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]
ci/images/spring-boot-jdk11-ci-image/Dockerfile
View file @
e9232288
# 11.0.1+13-Debian-2
FROM
openjdk@sha256:4b6ed15fe162c6209c7fa5cfa4d5fdfdc639d99d76998114e4fc790cda098f66
FROM
ubuntu:bionic-20181018
RUN
apt-get update
&&
\
apt-get
install
-y
git
&&
\
apt-get
install
-y
libxml2-utils
&&
\
apt-get
install
-y
jq
ADD
https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
ENV
DOCKER_VERSION=17.05.0-ce \
ENTRYKIT_VERSION=0.4.0
RUN
apt-get update
&&
\
apt-get
install
-y
curl
&&
\
apt-get
install
-y
libudev1
&&
\
apt-get
install
-y
iptables
&&
\
curl https://get.docker.com/builds/Linux/x86_64/docker-
${
DOCKER_VERSION
}
.tgz |
tar
zx
&&
\
mv
/docker/
*
/bin/
&&
chmod
+x /bin/docker
*
# Install entrykit
RUN
curl
-L
https://github.com/progrium/entrykit/releases/download/v
${
ENTRYKIT_VERSION
}
/entrykit_
${
ENTRYKIT_VERSION
}
_Linux_x86_64.tgz |
tar
zx
&&
\
chmod
+x entrykit
&&
\
mv
entrykit /bin/entrykit
&&
\
entrykit
--symlink
ADD
setup.sh /setup.sh
RUN
./setup.sh java10
ENV
JAVA_HOME /opt/openjdk
ENV
PATH $JAVA_HOME/bin:$PATH
ADD
docker-lib.sh /docker-lib.sh
ENTRYPOINT
[ \
"switch", \
"shell=/bin/sh", "--", \
"codep", \
"/bin/docker daemon" \
]
\ No newline at end of file
ENTRYPOINT
[ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]
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