Skip to content

Commit 70e073f

Browse files
committed
Update CI
1 parent 50ce646 commit 70e073f

File tree

5 files changed

+74
-60
lines changed

5 files changed

+74
-60
lines changed

ci/README.adoc

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,18 @@
11
== Concourse pipeline
22

3-
Ensure the team is set:
3+
Ensure that you've setup the spring-boot target and can login
44

55
[source]
66
----
7-
$ fly -t spring set-team -n spring-javaformat --github-team=spring-io:spring-javaformat
7+
$ fly -t spring-javaformat login -n spring-javaformat -c https://ci.spring.io
88
----
99

1010
The pipeline can be deployed using the following command:
1111

1212
[source]
1313
----
14-
$ fly -t spring set-pipeline -p spring-javaformat -c ci/pipeline.yml -l ci/parameters.yml
14+
$ fly -t spring-javaformat set-pipeline -p spring-javaformat -c ci/pipeline.yml -l ci/parameters.yml
1515
----
1616

1717
NOTE: This assumes that you have credhub integration configured with the appropriate
1818
secrets.
19-
20-
=== Release
21-
22-
To release a milestone:
23-
24-
[source]
25-
----
26-
$ fly -t spring trigger-job -j spring-javaformat/stage-milestone
27-
$ fly -t spring trigger-job -j spring-javaformat/promote-milestone
28-
----
29-
30-
To release an RC:
31-
32-
[source]
33-
----
34-
$ fly -t spring trigger-job -j spring-javaformat/stage-rc
35-
$ fly -t spring trigger-job -j spring-javaformat/promote-rc
36-
----
37-
38-
To release a GA:
39-
40-
[source]
41-
----
42-
$ fly -t spring trigger-job -j spring-javaformat/stage-release
43-
$ fly -t spring trigger-job -j spring-javaformat/promote-release
44-
----

ci/images/README.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
== CI Images
2+
3+
These images are used by CI to run the actual builds.
4+
5+
To build the image locally run the following from this directory:
6+
7+
----
8+
$ docker build --no-cache -f <image-folder>/Dockerfile .
9+
----
10+
11+
For example
12+
13+
----
14+
$ docker build --no-cache -f spring-boot-ci-image/Dockerfile .
15+
----
16+
17+
To test run:
18+
19+
----
20+
$ docker run -it --entrypoint /bin/bash <SHA> ✈
21+
----

ci/images/setup.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
###########################################################
5+
# UTILS
6+
###########################################################
7+
8+
apt-get update
9+
apt-get install --no-install-recommends -y ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq
10+
rm -rf /var/lib/apt/lists/*
11+
12+
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh > /opt/concourse-java.sh
13+
14+
15+
###########################################################
16+
# JAVA
17+
###########################################################
18+
JDK_URL="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u212-b04/OpenJDK8U-jdk_x64_linux_hotspot_8u212b04.tar.gz"
19+
20+
mkdir -p /opt/openjdk
21+
cd /opt/openjdk
22+
curl -L ${JDK_URL} | tar zx --strip-components=1
23+
test -f /opt/openjdk/bin/java
24+
test -f /opt/openjdk/bin/javac
25+
26+
27+
###########################################################
28+
# DOCKER
29+
###########################################################
30+
31+
cd /
32+
curl -L https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz | tar zx
33+
mv /docker/* /bin/
34+
chmod +x /bin/docker*
35+
36+
export ENTRYKIT_VERSION=0.4.0
37+
curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx
38+
chmod +x entrykit && \
39+
mv entrykit /bin/entrykit && \
40+
entrykit --symlink
Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,11 @@
1-
FROM openjdk:8u141-jdk
1+
FROM ubuntu:bionic-20181018
22

3-
RUN apt-get update && \
4-
apt-get install -y git && \
5-
apt-get install -y libxml2-utils && \
6-
apt-get install -y jq
3+
ADD setup.sh /setup.sh
4+
ADD get-jdk-url.sh /get-jdk-url.sh
5+
RUN ./setup.sh
76

8-
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
7+
ENV JAVA_HOME /opt/openjdk
8+
ENV PATH $JAVA_HOME/bin:$PATH
9+
ADD docker-lib.sh /docker-lib.sh
910

10-
ENV DOCKER_VERSION=17.05.0-ce \
11-
ENTRYKIT_VERSION=0.4.0
12-
13-
RUN apt-get update && \
14-
apt-get install -y curl && \
15-
apt-get install -y libudev1 && \
16-
apt-get install -y iptables && \
17-
curl https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar zx && \
18-
mv /docker/* /bin/ && chmod +x /bin/docker*
19-
20-
# Install entrykit
21-
RUN curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx && \
22-
chmod +x entrykit && \
23-
mv entrykit /bin/entrykit && \
24-
entrykit --symlink
25-
26-
ADD https://raw.githubusercontent.com/spring-projects/spring-boot/master/ci/images/docker-lib.sh /docker-lib.sh
27-
28-
ENTRYPOINT [ \
29-
"switch", \
30-
"shell=/bin/sh", "--", \
31-
"codep", \
32-
"/bin/docker daemon" \
33-
]
11+
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

ci/pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
trigger: true
6464
- put: spring-javaformat-ci-image
6565
params:
66-
build: ci-images-git-repo/ci/images/spring-javaformat-ci-image
66+
build: ci-images-git-repo/ci/images
67+
dockerfile: ci-images-git-repo/ci/images/spring-javaformat-ci-image/Dockerfile
6768
- name: build
6869
serial: true
6970
public: true

0 commit comments

Comments
 (0)