Skip to content

Commit

Permalink
SWS-1068 - Backport CI upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregturn committed Apr 24, 2019
1 parent f2a68df commit 10e9cd9
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 166 deletions.
73 changes: 1 addition & 72 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,7 @@ web services using one of the many ways to manipulate XML payloads.

== Project Status

We go to great lengths to ensure smooth upgrades. We also seek to make your upgrade on major versions of Java can be as smooth
as possible.

Check the matrix below to see the status of supported versions:

.`master` branch
[cols=2]
|===
| Job | Status

| Test - JDK 8
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%208/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 8 and Spring.NEXT
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%208%20and%20Spring.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 8 and Spring snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%208%20and%20Spring%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 8 and Spring.NEXT snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%208%20and%20Spring.NEXT%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 11
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%2011/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 11 and Spring.NEXT
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%2011%20and%20Spring.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 11 and Spring snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%2011%20and%20Spring%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Test - JDK 11 and Spring.NEXT snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Test%20-%20JDK%2011%20and%20Spring.NEXT%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]

| Build - Release to repo.spring.io
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws/jobs/Build/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws"]
|===

.`2.x` branch
[cols=2]
|===
| Job | Status

| Test - JDK 8
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%208/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 8 and Spring.NEXT
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%208%20and%20Spring.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 8 and Spring snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%208%20and%20Spring%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 8 and Spring.NEXT snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%208%20and%20Spring.NEXT%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 11
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%2011/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 11 and Spring.NEXT
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%2011%20and%20Spring.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 11 and Spring snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%2011%20and%20Spring%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Test - JDK 11 and Spring.NEXT snapshots
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Test%20-%20JDK%2011%20and%20Spring.NEXT%20(snapshots)/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]

| Build - Release to repo.spring.io
| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-ws-2.x/jobs/Build/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-ws-2.x"]
|===


To see project status, https://github.com/spring-projects/spring-ws#project-status[visit this on master branch].

== Installation

Expand Down
54 changes: 47 additions & 7 deletions ci/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WARNING: Do NOT check this file into source control! If you'll check, `credentia
With this in place, run the following `fly` commands to create pipelines:

----
% fly -t spring-team sp -p spring-ws-2.x -c ci/pipeline-template.yml -l credentials.yml -v branch=2.x -v release-branch=release-2.x
% fly -t spring-team sp -p spring-ws-2.x -c ci/pipeline-template.yml -l credentials.yml -v branch=2.x
----

With these pipelines in place, you can now activate and expose them:
Expand All @@ -40,15 +40,55 @@ With these pipelines in place, you can now activate and expose them:
=== Making a release

1. Create a new release (on the main branch).
+
----
% ci/create-release.sh <release version> <next snapshot version>
----

2. With the release tagged, push the tagged version to the release branch.
+
2. With the release officially tagged, just push it to master.
+
----
% git checkout -b release-2.x
% git reset --hard <tag>
% git push -f origin release-2.x
% git push
----

NOTE: You can chain the previous set of commands together using `&&`.
The pipeline will pick up the next tag and release it. It will also build a new snapshot and stage it on artifactory.


=== Running CI tasks locally

Since Concourse is built on top of Docker, it's easy to:

* Debug what went wrong on your local machine.
* Test out a a tweak to your `test.sh` script before sending it out.
* Experiment against a new image before submitting your pull request.

All of these use cases are great reasons to essentially run what Concourse does on your local machine.

IMPORTANT: To do this you must have Docker installed on your machine.

1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-ws-github openjdk:8-jdk /bin/bash`
+
This will launch the Docker image and mount your source code at `spring-ws-github`.
+
Next, run the `test.sh` script from inside the container:
+
2. `PROFILE=none spring-ws-github/ci/test.sh`

Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs.

If you need to test the `build.sh` script, then do this:

1. `mkdir /tmp/spring-ws-artifactory`
2. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-ws-github --mount type=bind,source="/tmp/spring-ws-artifactory",target=/spring-ws-artifactory openjdk:8-jdk /bin/bash`
+
This will launch the Docker image and mount your source code at `spring-ws-github` and the temporary
artifactory output directory at `spring-ws-artifactory`.
+
Next, run the `build.sh` script from inside the container:
+
3. `spring-ws-github/ci/build.sh`

IMPORTANT: `build.sh` doesn't actually push to Artifactory so don't worry about accidentally deploying anything.
It just deploys to a local folder. That way, the `artifactory-resource` later in the pipeline can pick up these artifacts
and deliver them to artifactory.

Loading

0 comments on commit 10e9cd9

Please sign in to comment.