Skip to content

Commit 63912f8

Browse files
committed
Merge branch 'ci' into 5.2.x
Closes gh-26659
2 parents c978fb4 + 3fbf3a5 commit 63912f8

24 files changed

+787
-4
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ plugins {
1010
id "io.freefair.aspectj" version '4.1.6' apply false
1111
id "com.github.ben-manes.versions" version '0.28.0'
1212
id 'com.gradle.build-scan' version '3.2'
13-
id "com.jfrog.artifactory" version '4.12.0' apply false
1413
}
1514

1615
apply from: "$rootDir/gradle/build-scan-user-data.gradle"

ci/README.adoc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
== Spring Framework Concourse pipeline
2+
3+
The Spring Framework uses https://concourse-ci.org/[Concourse] for its CI build and other automated tasks.
4+
The Spring team has a dedicated Concourse instance available at https://ci.spring.io with a build pipeline
5+
for https://ci.spring.io/teams/spring-framework/pipelines/spring-framework-5.2.x[Spring Framework 5.2.x].
6+
7+
=== Setting up your development environment
8+
9+
If you're part of the Spring Framework project on GitHub, you can get access to CI management features.
10+
First, you need to go to https://ci.spring.io and install the client CLI for your platform (see bottom right of the screen).
11+
12+
You can then login with the instance using:
13+
14+
[source]
15+
----
16+
$ fly -t spring login -n spring-framework -c https://ci.spring.io
17+
----
18+
19+
Once logged in, you should get something like:
20+
21+
[source]
22+
----
23+
$ fly ts
24+
name url team expiry
25+
spring https://ci.spring.io spring-framework Wed, 25 Mar 2020 17:45:26 UTC
26+
----
27+
28+
=== Pipeline configuration and structure
29+
30+
The build pipelines are described in `pipeline.yml` file.
31+
32+
This file is listing Concourse resources, i.e. build inputs and outputs such as container images, artifact repositories, source repositories, notification services, etc.
33+
34+
It also describes jobs (a job is a sequence of inputs, tasks and outputs); jobs are organized by groups.
35+
36+
The `pipeline.yml` definition contains `((parameters))` which are loaded from the `parameters.yml` file or from our https://docs.cloudfoundry.org/credhub/[credhub instance].
37+
38+
You'll find in this folder the following resources:
39+
40+
* `pipeline.yml` the build pipeline
41+
* `parameters.yml` the build parameters used for the pipeline
42+
* `images/` holds the container images definitions used in this pipeline
43+
* `scripts/` holds the build scripts that ship within the CI container images
44+
* `tasks` contains the task definitions used in the main `pipeline.yml`
45+
46+
=== Updating the build pipeline
47+
48+
Updating files on the repository is not enough to update the build pipeline, as changes need to be applied.
49+
50+
The pipeline can be deployed using the following command:
51+
52+
[source]
53+
----
54+
$ fly -t spring set-pipeline -p spring-framework-5.2.x -c ci/pipeline.yml -l ci/parameters.yml
55+
----
56+
57+
NOTE: This assumes that you have credhub integration configured with the appropriate secrets.

ci/config/changelog-generator.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
changelog:
2+
repository: spring-projects/spring-framework
3+
sections:
4+
- title: ":star: New Features"
5+
labels:
6+
- "type: enhancement"
7+
- title: ":beetle: Bug Fixes"
8+
labels:
9+
- "type: bug"
10+
- "type: regression"
11+
- title: ":notebook_with_decorative_cover: Documentation"
12+
labels:
13+
- "type: documentation"
14+
- title: ":hammer: Dependency Upgrades"
15+
sort: "title"
16+
labels:
17+
- "type: dependency-upgrade"

ci/config/release-scripts.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
logging:
2+
level:
3+
io.spring.concourse: DEBUG
4+
spring:
5+
main:
6+
banner-mode: off
7+
sonatype:
8+
exclude:
9+
- 'build-info\.json'
10+
- '.*\.zip'

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-framework-ci-image/Dockerfile .
15+
----
16+
17+
To test run:
18+
19+
----
20+
$ docker run -it --entrypoint /bin/bash <SHA>
21+
----

ci/images/ci-image-jdk11/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:focal-20210119
2+
3+
ADD setup.sh /setup.sh
4+
ADD get-jdk-url.sh /get-jdk-url.sh
5+
RUN ./setup.sh java11
6+
7+
ENV JAVA_HOME /opt/openjdk
8+
ENV PATH $JAVA_HOME/bin:$PATH

ci/images/ci-image/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:focal-20210119
2+
3+
ADD setup.sh /setup.sh
4+
ADD get-jdk-url.sh /get-jdk-url.sh
5+
RUN ./setup.sh java8
6+
7+
ENV JAVA_HOME /opt/openjdk
8+
ENV PATH $JAVA_HOME/bin:$PATH

ci/images/get-jdk-url.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -e
3+
4+
case "$1" in
5+
java8)
6+
echo "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u282b08.tar.gz"
7+
;;
8+
java11)
9+
echo "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
10+
;;
11+
*)
12+
echo $"Unknown java version"
13+
exit 1
14+
esac

ci/images/setup.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
###########################################################
5+
# UTILS
6+
###########################################################
7+
8+
export DEBIAN_FRONTEND=noninteractive
9+
apt-get update
10+
apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq fontconfig
11+
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
12+
dpkg-reconfigure --frontend noninteractive tzdata
13+
rm -rf /var/lib/apt/lists/*
14+
15+
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.4/concourse-java.sh > /opt/concourse-java.sh
16+
17+
curl --output /opt/concourse-release-scripts.jar https://repo.spring.io/release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.0/concourse-release-scripts-0.3.0.jar
18+
19+
###########################################################
20+
# JAVA
21+
###########################################################
22+
JDK_URL=$( ./get-jdk-url.sh $1 )
23+
24+
mkdir -p /opt/openjdk
25+
cd /opt/openjdk
26+
curl -L ${JDK_URL} | tar zx --strip-components=1
27+
test -f /opt/openjdk/bin/java
28+
test -f /opt/openjdk/bin/javac
29+
30+
###########################################################
31+
# GRADLE ENTERPRISE
32+
###########################################################
33+
cd /
34+
mkdir ~/.gradle
35+
echo 'systemProp.user.name=concourse' > ~/.gradle/gradle.properties

ci/parameters.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
email-server: "smtp.svc.pivotal.io"
2+
email-from: "ci@spring.io"
3+
email-to: ["spring-framework-dev@pivotal.io"]
4+
github-repo: "https://github.com/spring-projects/spring-framework.git"
5+
github-repo-name: "spring-projects/spring-framework"
6+
docker-hub-organization: "springci"
7+
artifactory-server: "https://repo.spring.io"
8+
branch: "5.2.x"
9+
milestone: "5.2.x"
10+
build-name: "spring-framework"
11+
pipeline-name: "spring-framework"
12+
concourse-url: "https://ci.spring.io"
13+
task-timeout: 1h00m

0 commit comments

Comments
 (0)