Merge branch '3.0.x'
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
== Concourse pipeline
|
|
||||||
|
|
||||||
Ensure that you've setup the spring-restdocs target and can login
|
|
||||||
|
|
||||||
[source]
|
|
||||||
----
|
|
||||||
$ fly -t spring-restdocs login -n spring-restdocs -c https://ci.spring.io
|
|
||||||
----
|
|
||||||
|
|
||||||
The pipeline can be deployed using the following command:
|
|
||||||
|
|
||||||
[source]
|
|
||||||
----
|
|
||||||
$ fly -t spring-restdocs set-pipeline -p spring-restdocs-3.0.x -c ci/pipeline.yml -l ci/parameters.yml
|
|
||||||
----
|
|
||||||
|
|
||||||
NOTE: This assumes that you have Vault integration configured with the appropriate secrets.
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
changelog:
|
|
||||||
repository: spring-projects/spring-restdocs
|
|
||||||
sections:
|
|
||||||
- title: ":star: New Features"
|
|
||||||
labels:
|
|
||||||
- "type: enhancement"
|
|
||||||
- title: ":lady_beetle: Bug Fixes"
|
|
||||||
labels:
|
|
||||||
- "type: bug"
|
|
||||||
- "type: regression"
|
|
||||||
- title: ":notebook_with_decorative_cover: Documentation"
|
|
||||||
labels:
|
|
||||||
- "type: documentation"
|
|
||||||
- title: ":hammer: Dependency Upgrades"
|
|
||||||
sort: "title"
|
|
||||||
labels:
|
|
||||||
- "type: dependency-upgrade"
|
|
||||||
issues:
|
|
||||||
ports:
|
|
||||||
- label: "status: forward-port"
|
|
||||||
bodyExpression: 'Forward port of issue #(\d+).*'
|
|
||||||
- label: "status: back-port"
|
|
||||||
bodyExpression: 'Back port of issue #(\d+).*'
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
logging:
|
|
||||||
level:
|
|
||||||
io.spring.concourse: DEBUG
|
|
||||||
spring:
|
|
||||||
main:
|
|
||||||
banner-mode: off
|
|
||||||
sonatype:
|
|
||||||
exclude:
|
|
||||||
- 'build-info\.json'
|
|
||||||
- 'org/springframework/restdocs/spring-restdocs/.*'
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
== 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 ci-image/Dockerfile .
|
|
||||||
----
|
|
||||||
|
|
||||||
To test run:
|
|
||||||
|
|
||||||
----
|
|
||||||
$ docker run -it --entrypoint /bin/bash <SHA>
|
|
||||||
----
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
FROM ubuntu:focal-20220531
|
|
||||||
|
|
||||||
ADD setup.sh /setup.sh
|
|
||||||
ADD get-jdk-url.sh /get-jdk-url.sh
|
|
||||||
RUN ./setup.sh java17
|
|
||||||
|
|
||||||
ENV JAVA_HOME /opt/openjdk
|
|
||||||
ENV PATH $JAVA_HOME/bin:$PATH
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
java17)
|
|
||||||
echo "https://github.com/bell-sw/Liberica/releases/download/17.0.3.1+2/bellsoft-jdk17.0.3.1+2-linux-amd64.tar.gz"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo $"Unknown java version"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# UTILS
|
|
||||||
###########################################################
|
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
apt-get update
|
|
||||||
apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq unzip
|
|
||||||
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
|
|
||||||
dpkg-reconfigure --frontend noninteractive tzdata
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.4/concourse-java.sh > /opt/concourse-java.sh
|
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# JAVA
|
|
||||||
###########################################################
|
|
||||||
JDK_URL=$( ./get-jdk-url.sh $1 )
|
|
||||||
|
|
||||||
mkdir -p /opt/openjdk
|
|
||||||
cd /opt/openjdk
|
|
||||||
curl -L ${JDK_URL} | tar zx --strip-components=1
|
|
||||||
test -f /opt/openjdk/bin/java
|
|
||||||
test -f /opt/openjdk/bin/javac
|
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# GRADLE ENTERPRISE
|
|
||||||
###########################################################
|
|
||||||
mkdir ~/.gradle
|
|
||||||
echo 'systemProp.user.name=concourse' > ~/.gradle/gradle.properties
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
github-organization: "spring-projects"
|
|
||||||
github-repository: "spring-restdocs"
|
|
||||||
docker-hub-organization: "springci"
|
|
||||||
artifactory-server: "https://repo.spring.io"
|
|
||||||
branch: "main"
|
|
||||||
milestone: "3.0.x"
|
|
||||||
build-name: "spring-restdocs"
|
|
||||||
concourse-url: "https://ci.spring.io"
|
|
||||||
task-timeout: 1h00m
|
|
||||||
registry-mirror-host: docker.repo.spring.io
|
|
||||||
registry-mirror-username: ((artifactory-username))
|
|
||||||
registry-mirror-password: ((artifactory-password))
|
|
||||||
402
ci/pipeline.yml
402
ci/pipeline.yml
@@ -1,402 +0,0 @@
|
|||||||
anchors:
|
|
||||||
git-repo-resource-source: &git-repo-resource-source
|
|
||||||
uri: "https://github.com/((github-organization))/((github-repository)).git"
|
|
||||||
username: ((github-username))
|
|
||||||
password: ((github-password))
|
|
||||||
branch: ((branch))
|
|
||||||
registry-image-resource-source: ®istry-image-resource-source
|
|
||||||
username: ((docker-hub-username))
|
|
||||||
password: ((docker-hub-password))
|
|
||||||
tag: ((milestone))
|
|
||||||
gradle-enterprise-task-params: &gradle-enterprise-task-params
|
|
||||||
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))
|
|
||||||
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
|
|
||||||
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
|
|
||||||
docker-hub-task-params: &docker-hub-task-params
|
|
||||||
DOCKER_HUB_USERNAME: ((docker-hub-username))
|
|
||||||
DOCKER_HUB_PASSWORD: ((docker-hub-password))
|
|
||||||
github-task-params: &github-task-params
|
|
||||||
GITHUB_REPO: ((github-repository))
|
|
||||||
GITHUB_ORGANIZATION: ((github-organization))
|
|
||||||
GITHUB_PASSWORD: ((github-ci-release-token))
|
|
||||||
GITHUB_USERNAME: ((github-username))
|
|
||||||
MILESTONE: ((milestone))
|
|
||||||
sontatype-task-params: &sonatype-task-params
|
|
||||||
SONATYPE_USERNAME: ((s01-user-token))
|
|
||||||
SONATYPE_PASSWORD: ((s01-user-token-password))
|
|
||||||
SONATYPE_URL: ((sonatype-url))
|
|
||||||
SONATYPE_STAGING_PROFILE_ID: ((sonatype-staging-profile-id))
|
|
||||||
artifactory-task-params: &artifactory-task-params
|
|
||||||
ARTIFACTORY_SERVER: ((artifactory-server))
|
|
||||||
ARTIFACTORY_USERNAME: ((artifactory-username))
|
|
||||||
ARTIFACTORY_PASSWORD: ((artifactory-password))
|
|
||||||
build-project-task-params: &build-project-task-params
|
|
||||||
privileged: true
|
|
||||||
timeout: ((task-timeout))
|
|
||||||
file: git-repo/ci/tasks/build-project.yml
|
|
||||||
params:
|
|
||||||
BRANCH: ((branch))
|
|
||||||
<<: *gradle-enterprise-task-params
|
|
||||||
<<: *docker-hub-task-params
|
|
||||||
artifactory-repo-put-params: &artifactory-repo-put-params
|
|
||||||
signing_key: ((signing-key))
|
|
||||||
signing_passphrase: ((signing-passphrase))
|
|
||||||
repo: libs-snapshot-local
|
|
||||||
folder: distribution-repository
|
|
||||||
build_uri: "https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}"
|
|
||||||
build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}"
|
|
||||||
disable_checksum_uploads: true
|
|
||||||
threads: 8
|
|
||||||
artifact_set:
|
|
||||||
- include:
|
|
||||||
- "/**/spring-restdocs-*.zip"
|
|
||||||
properties:
|
|
||||||
"zip.type": "docs"
|
|
||||||
"zip.deployed": "false"
|
|
||||||
slack-fail-params: &slack-fail-params
|
|
||||||
text: >
|
|
||||||
:concourse-failed: <!here> <https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}|${BUILD_PIPELINE_NAME} ${BUILD_JOB_NAME} failed!>
|
|
||||||
[$TEXT_FILE_CONTENT]
|
|
||||||
text_file: git-repo/build/build-scan-uri.txt
|
|
||||||
silent: true
|
|
||||||
icon_emoji: ":concourse:"
|
|
||||||
username: concourse-ci
|
|
||||||
slack-success-params: &slack-success-params
|
|
||||||
text: >
|
|
||||||
:concourse-succeeded: <https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}|${BUILD_PIPELINE_NAME} ${BUILD_JOB_NAME} was successful!>
|
|
||||||
[$TEXT_FILE_CONTENT]
|
|
||||||
text_file: git-repo/build/build-scan-uri.txt
|
|
||||||
silent: true
|
|
||||||
icon_emoji: ":concourse:"
|
|
||||||
username: concourse-ci
|
|
||||||
registry-mirror-vars: ®istry-mirror-vars
|
|
||||||
registry-mirror-host: ((registry-mirror-host))
|
|
||||||
registry-mirror-username: ((registry-mirror-username))
|
|
||||||
registry-mirror-password: ((registry-mirror-password))
|
|
||||||
resource_types:
|
|
||||||
- name: artifactory-resource
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
<<: *registry-image-resource-source
|
|
||||||
repository: springio/artifactory-resource
|
|
||||||
tag: 0.0.17
|
|
||||||
- name: github-status-resource
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
<<: *registry-image-resource-source
|
|
||||||
repository: dpb587/github-status-resource
|
|
||||||
tag: master
|
|
||||||
- name: slack-notification
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
<<: *registry-image-resource-source
|
|
||||||
repository: cfcommunity/slack-notification-resource
|
|
||||||
tag: latest
|
|
||||||
- name: github-release
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
<<: *registry-image-resource-source
|
|
||||||
repository: concourse/github-release-resource
|
|
||||||
tag: 1.7.2
|
|
||||||
resources:
|
|
||||||
- name: git-repo
|
|
||||||
type: git
|
|
||||||
icon: github
|
|
||||||
source:
|
|
||||||
<<: *git-repo-resource-source
|
|
||||||
- name: git-repo-windows
|
|
||||||
type: git
|
|
||||||
icon: github
|
|
||||||
source:
|
|
||||||
<<: *git-repo-resource-source
|
|
||||||
git_config:
|
|
||||||
- name: core.autocrlf
|
|
||||||
value: true
|
|
||||||
- name: github-pre-release
|
|
||||||
type: github-release
|
|
||||||
icon: briefcase-download-outline
|
|
||||||
source:
|
|
||||||
owner: ((github-organization))
|
|
||||||
repository: ((github-repository))
|
|
||||||
access_token: ((github-ci-release-token))
|
|
||||||
pre_release: true
|
|
||||||
release: false
|
|
||||||
- name: github-release
|
|
||||||
type: github-release
|
|
||||||
icon: briefcase-download
|
|
||||||
source:
|
|
||||||
owner: ((github-organization))
|
|
||||||
repository: ((github-repository))
|
|
||||||
access_token: ((github-ci-release-token))
|
|
||||||
pre_release: false
|
|
||||||
- name: ci-images-git-repo
|
|
||||||
type: git
|
|
||||||
icon: github
|
|
||||||
source:
|
|
||||||
uri: https://github.com/((github-organization))/((github-repository)).git
|
|
||||||
branch: ((branch))
|
|
||||||
paths: ["ci/images/*"]
|
|
||||||
- name: ci-image
|
|
||||||
type: registry-image
|
|
||||||
icon: docker
|
|
||||||
source:
|
|
||||||
<<: *registry-image-resource-source
|
|
||||||
repository: ((docker-hub-organization))/((github-repository))-ci
|
|
||||||
- name: artifactory-repo
|
|
||||||
type: artifactory-resource
|
|
||||||
icon: package-variant
|
|
||||||
source:
|
|
||||||
uri: ((artifactory-server))
|
|
||||||
username: ((artifactory-username))
|
|
||||||
password: ((artifactory-password))
|
|
||||||
build_name: ((build-name))
|
|
||||||
- name: repo-status-build
|
|
||||||
type: github-status-resource
|
|
||||||
icon: eye-check-outline
|
|
||||||
source:
|
|
||||||
repository: ((github-organization))/((github-repository))
|
|
||||||
access_token: ((github-ci-status-token))
|
|
||||||
branch: ((branch))
|
|
||||||
context: build
|
|
||||||
- name: slack-alert
|
|
||||||
type: slack-notification
|
|
||||||
icon: slack
|
|
||||||
source:
|
|
||||||
url: ((slack-webhook-url))
|
|
||||||
- name: daily
|
|
||||||
type: time
|
|
||||||
icon: clock-outline
|
|
||||||
source: { interval: "24h" }
|
|
||||||
jobs:
|
|
||||||
- name: build-ci-images
|
|
||||||
plan:
|
|
||||||
- get: ci-images-git-repo
|
|
||||||
trigger: true
|
|
||||||
- get: git-repo
|
|
||||||
- task: build-ci-image
|
|
||||||
privileged: true
|
|
||||||
file: git-repo/ci/tasks/build-ci-image.yml
|
|
||||||
output_mapping:
|
|
||||||
image: ci-image
|
|
||||||
vars:
|
|
||||||
ci-image-name: ci-image
|
|
||||||
<<: *registry-mirror-vars
|
|
||||||
- put: ci-image
|
|
||||||
params:
|
|
||||||
image: ci-image/image.tar
|
|
||||||
- name: build
|
|
||||||
serial: true
|
|
||||||
public: true
|
|
||||||
plan:
|
|
||||||
- get: ci-image
|
|
||||||
- get: git-repo
|
|
||||||
trigger: true
|
|
||||||
- put: repo-status-build
|
|
||||||
params: { state: "pending", commit: "git-repo" }
|
|
||||||
- do:
|
|
||||||
- task: build-project
|
|
||||||
image: ci-image
|
|
||||||
<<: *build-project-task-params
|
|
||||||
on_failure:
|
|
||||||
do:
|
|
||||||
- put: repo-status-build
|
|
||||||
params: { state: "failure", commit: "git-repo" }
|
|
||||||
- put: slack-alert
|
|
||||||
params:
|
|
||||||
<<: *slack-fail-params
|
|
||||||
- put: repo-status-build
|
|
||||||
params: { state: "success", commit: "git-repo" }
|
|
||||||
- put: slack-alert
|
|
||||||
params:
|
|
||||||
<<: *slack-success-params
|
|
||||||
- name: windows-build
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: git-repo
|
|
||||||
resource: git-repo-windows
|
|
||||||
- get: daily
|
|
||||||
trigger: true
|
|
||||||
- do:
|
|
||||||
- task: build-project
|
|
||||||
privileged: true
|
|
||||||
file: git-repo/ci/tasks/build-project-windows.yml
|
|
||||||
tags:
|
|
||||||
- WIN64
|
|
||||||
timeout: ((task-timeout))
|
|
||||||
params:
|
|
||||||
BRANCH: ((branch))
|
|
||||||
<<: *gradle-enterprise-task-params
|
|
||||||
on_failure:
|
|
||||||
do:
|
|
||||||
- put: slack-alert
|
|
||||||
params:
|
|
||||||
<<: *slack-fail-params
|
|
||||||
- put: slack-alert
|
|
||||||
params:
|
|
||||||
<<: *slack-success-params
|
|
||||||
- name: stage-milestone
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: ci-image
|
|
||||||
- get: git-repo
|
|
||||||
trigger: false
|
|
||||||
- task: stage
|
|
||||||
image: ci-image
|
|
||||||
file: git-repo/ci/tasks/stage.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: M
|
|
||||||
<<: *gradle-enterprise-task-params
|
|
||||||
<<: *docker-hub-task-params
|
|
||||||
- put: artifactory-repo
|
|
||||||
params:
|
|
||||||
<<: *artifactory-repo-put-params
|
|
||||||
repo: libs-staging-local
|
|
||||||
- put: git-repo
|
|
||||||
params:
|
|
||||||
repository: stage-git-repo
|
|
||||||
- name: stage-rc
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: ci-image
|
|
||||||
- get: git-repo
|
|
||||||
trigger: false
|
|
||||||
- task: stage
|
|
||||||
image: ci-image
|
|
||||||
file: git-repo/ci/tasks/stage.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: RC
|
|
||||||
<<: *gradle-enterprise-task-params
|
|
||||||
<<: *docker-hub-task-params
|
|
||||||
- put: artifactory-repo
|
|
||||||
params:
|
|
||||||
<<: *artifactory-repo-put-params
|
|
||||||
repo: libs-staging-local
|
|
||||||
- put: git-repo
|
|
||||||
params:
|
|
||||||
repository: stage-git-repo
|
|
||||||
- name: stage-release
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: ci-image
|
|
||||||
- get: git-repo
|
|
||||||
trigger: false
|
|
||||||
- task: stage
|
|
||||||
image: ci-image
|
|
||||||
file: git-repo/ci/tasks/stage.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: RELEASE
|
|
||||||
<<: *gradle-enterprise-task-params
|
|
||||||
<<: *docker-hub-task-params
|
|
||||||
- put: artifactory-repo
|
|
||||||
params:
|
|
||||||
<<: *artifactory-repo-put-params
|
|
||||||
repo: libs-staging-local
|
|
||||||
- put: git-repo
|
|
||||||
params:
|
|
||||||
repository: stage-git-repo
|
|
||||||
- name: promote-milestone
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: git-repo
|
|
||||||
trigger: false
|
|
||||||
- get: artifactory-repo
|
|
||||||
trigger: false
|
|
||||||
passed: [stage-milestone]
|
|
||||||
params:
|
|
||||||
download_artifacts: false
|
|
||||||
save_build_info: true
|
|
||||||
- task: promote
|
|
||||||
file: git-repo/ci/tasks/promote.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: M
|
|
||||||
<<: *artifactory-task-params
|
|
||||||
- task: generate-changelog
|
|
||||||
file: git-repo/ci/tasks/generate-changelog.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: M
|
|
||||||
GITHUB_USERNAME: ((github-username))
|
|
||||||
GITHUB_TOKEN: ((github-ci-release-token))
|
|
||||||
vars:
|
|
||||||
<<: *registry-mirror-vars
|
|
||||||
- put: github-pre-release
|
|
||||||
params:
|
|
||||||
name: generated-changelog/tag
|
|
||||||
tag: generated-changelog/tag
|
|
||||||
body: generated-changelog/changelog.md
|
|
||||||
- name: promote-rc
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: git-repo
|
|
||||||
trigger: false
|
|
||||||
- get: artifactory-repo
|
|
||||||
trigger: false
|
|
||||||
passed: [stage-rc]
|
|
||||||
params:
|
|
||||||
download_artifacts: false
|
|
||||||
save_build_info: true
|
|
||||||
- task: promote
|
|
||||||
file: git-repo/ci/tasks/promote.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: RC
|
|
||||||
<<: *artifactory-task-params
|
|
||||||
- task: generate-changelog
|
|
||||||
file: git-repo/ci/tasks/generate-changelog.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: RC
|
|
||||||
GITHUB_USERNAME: ((github-username))
|
|
||||||
GITHUB_TOKEN: ((github-ci-release-token))
|
|
||||||
vars:
|
|
||||||
<<: *registry-mirror-vars
|
|
||||||
- put: github-pre-release
|
|
||||||
params:
|
|
||||||
name: generated-changelog/tag
|
|
||||||
tag: generated-changelog/tag
|
|
||||||
body: generated-changelog/changelog.md
|
|
||||||
- name: promote-release
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: git-repo
|
|
||||||
trigger: false
|
|
||||||
- get: artifactory-repo
|
|
||||||
trigger: false
|
|
||||||
passed: [stage-release]
|
|
||||||
params:
|
|
||||||
download_artifacts: true
|
|
||||||
save_build_info: true
|
|
||||||
- task: promote
|
|
||||||
file: git-repo/ci/tasks/promote.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: RELEASE
|
|
||||||
<<: *artifactory-task-params
|
|
||||||
<<: *sonatype-task-params
|
|
||||||
- name: create-github-release
|
|
||||||
serial: true
|
|
||||||
plan:
|
|
||||||
- get: ci-image
|
|
||||||
- get: git-repo
|
|
||||||
- get: artifactory-repo
|
|
||||||
trigger: true
|
|
||||||
passed: [promote-release]
|
|
||||||
params:
|
|
||||||
download_artifacts: false
|
|
||||||
save_build_info: true
|
|
||||||
- task: generate-changelog
|
|
||||||
file: git-repo/ci/tasks/generate-changelog.yml
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE: RELEASE
|
|
||||||
GITHUB_USERNAME: ((github-username))
|
|
||||||
GITHUB_TOKEN: ((github-ci-release-token))
|
|
||||||
vars:
|
|
||||||
<<: *registry-mirror-vars
|
|
||||||
- put: github-release
|
|
||||||
params:
|
|
||||||
name: generated-changelog/tag
|
|
||||||
tag: generated-changelog/tag
|
|
||||||
body: generated-changelog/changelog.md
|
|
||||||
groups:
|
|
||||||
- name: "builds"
|
|
||||||
jobs: ["build", "windows-build"]
|
|
||||||
- name: "releases"
|
|
||||||
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"]
|
|
||||||
- name: "ci-images"
|
|
||||||
jobs: ["build-ci-images"]
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
SET "JAVA_HOME=C:\opt\jdk-17"
|
|
||||||
SET PATH=%PATH%;C:\Program Files\Git\usr\bin
|
|
||||||
cd git-repo
|
|
||||||
.\gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 build
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
source $(dirname $0)/common.sh
|
|
||||||
repository=$(pwd)/distribution-repository
|
|
||||||
|
|
||||||
pushd git-repo > /dev/null
|
|
||||||
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository
|
|
||||||
popd > /dev/null
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
source /opt/concourse-java.sh
|
|
||||||
|
|
||||||
setup_symlinks
|
|
||||||
cleanup_maven_repo "org.springframework.restdocs"
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
CONFIG_DIR=git-repo/ci/config
|
|
||||||
version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' )
|
|
||||||
|
|
||||||
java -jar /github-changelog-generator.jar \
|
|
||||||
--spring.config.location=${CONFIG_DIR}/changelog-generator.yml \
|
|
||||||
${version} generated-changelog/changelog.md
|
|
||||||
|
|
||||||
echo ${version} > generated-changelog/version
|
|
||||||
echo v${version} > generated-changelog/tag
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
CONFIG_DIR=git-repo/ci/config
|
|
||||||
|
|
||||||
version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' )
|
|
||||||
export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json
|
|
||||||
|
|
||||||
java -jar /concourse-release-scripts.jar \
|
|
||||||
--spring.config.location=${CONFIG_DIR}/release-scripts.yml \
|
|
||||||
publishToCentral $RELEASE_TYPE $BUILD_INFO_LOCATION artifactory-repo || { exit 1; }
|
|
||||||
|
|
||||||
java -jar /concourse-release-scripts.jar \
|
|
||||||
--spring.config.location=${CONFIG_DIR}/release-scripts.yml \
|
|
||||||
promote $RELEASE_TYPE $BUILD_INFO_LOCATION || { exit 1; }
|
|
||||||
|
|
||||||
echo "Promotion complete"
|
|
||||||
echo $version > version/version
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
source $(dirname $0)/common.sh
|
|
||||||
repository=$(pwd)/distribution-repository
|
|
||||||
|
|
||||||
pushd git-repo > /dev/null
|
|
||||||
git fetch --tags --all > /dev/null
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
git clone git-repo stage-git-repo > /dev/null
|
|
||||||
|
|
||||||
pushd stage-git-repo > /dev/null
|
|
||||||
|
|
||||||
snapshotVersion=$( awk -F '=' '$1 == "version" { print $2 }' gradle.properties )
|
|
||||||
if [[ $RELEASE_TYPE = "M" ]]; then
|
|
||||||
stageVersion=$( get_next_milestone_release $snapshotVersion)
|
|
||||||
nextVersion=$snapshotVersion
|
|
||||||
elif [[ $RELEASE_TYPE = "RC" ]]; then
|
|
||||||
stageVersion=$( get_next_rc_release $snapshotVersion)
|
|
||||||
nextVersion=$snapshotVersion
|
|
||||||
elif [[ $RELEASE_TYPE = "RELEASE" ]]; then
|
|
||||||
stageVersion=$( get_next_release $snapshotVersion)
|
|
||||||
nextVersion=$( bump_version_number $snapshotVersion)
|
|
||||||
else
|
|
||||||
echo "Unknown release type $RELEASE_TYPE" >&2; exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Staging $stageVersion (next version will be $nextVersion)"
|
|
||||||
sed -i "s/version=$snapshotVersion/version=$stageVersion/" gradle.properties
|
|
||||||
|
|
||||||
git config user.name "Spring Builds" > /dev/null
|
|
||||||
git config user.email "spring-builds@users.noreply.github.com" > /dev/null
|
|
||||||
git add gradle.properties > /dev/null
|
|
||||||
git commit -m"Release v$stageVersion" > /dev/null
|
|
||||||
git tag -a "v$stageVersion" -m"Release v$stageVersion" > /dev/null
|
|
||||||
|
|
||||||
./gradlew --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository
|
|
||||||
|
|
||||||
git reset --hard HEAD^ > /dev/null
|
|
||||||
if [[ $nextVersion != $snapshotVersion ]]; then
|
|
||||||
echo "Setting next development version (v$nextVersion)"
|
|
||||||
sed -i "s/version=$snapshotVersion/version=$nextVersion/" gradle.properties
|
|
||||||
git add gradle.properties > /dev/null
|
|
||||||
git commit -m"Next development version (v$nextVersion)" > /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "DONE"
|
|
||||||
|
|
||||||
popd > /dev/null
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: concourse/oci-build-task
|
|
||||||
tag: 0.9.0
|
|
||||||
registry_mirror:
|
|
||||||
host: ((registry-mirror-host))
|
|
||||||
username: ((registry-mirror-username))
|
|
||||||
password: ((registry-mirror-password))
|
|
||||||
inputs:
|
|
||||||
- name: ci-images-git-repo
|
|
||||||
outputs:
|
|
||||||
- name: image
|
|
||||||
caches:
|
|
||||||
- path: ci-image-cache
|
|
||||||
params:
|
|
||||||
CONTEXT: ci-images-git-repo/ci/images
|
|
||||||
DOCKERFILE: ci-images-git-repo/ci/images/((ci-image-name))/Dockerfile
|
|
||||||
DOCKER_HUB_AUTH: ((docker-hub-auth))
|
|
||||||
run:
|
|
||||||
path: /bin/sh
|
|
||||||
args:
|
|
||||||
- "-c"
|
|
||||||
- |
|
|
||||||
mkdir -p /root/.docker
|
|
||||||
cat > /root/.docker/config.json <<EOF
|
|
||||||
{ "auths": { "https://index.docker.io/v1/": { "auth": "$DOCKER_HUB_AUTH" }}}
|
|
||||||
EOF
|
|
||||||
build
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
platform: windows
|
|
||||||
inputs:
|
|
||||||
- name: git-repo
|
|
||||||
outputs:
|
|
||||||
- name: git-repo
|
|
||||||
params:
|
|
||||||
BRANCH:
|
|
||||||
CI: true
|
|
||||||
GRADLE_ENTERPRISE_ACCESS_KEY:
|
|
||||||
GRADLE_ENTERPRISE_CACHE_USERNAME:
|
|
||||||
GRADLE_ENTERPRISE_CACHE_PASSWORD:
|
|
||||||
GRADLE_ENTERPRISE_URL: https://ge.spring.io
|
|
||||||
run:
|
|
||||||
path: git-repo/ci/scripts/build-project-windows.bat
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
platform: linux
|
|
||||||
inputs:
|
|
||||||
- name: git-repo
|
|
||||||
outputs:
|
|
||||||
- name: distribution-repository
|
|
||||||
- name: git-repo
|
|
||||||
caches:
|
|
||||||
- path: gradle
|
|
||||||
- path: embedmongo
|
|
||||||
params:
|
|
||||||
BRANCH:
|
|
||||||
CI: true
|
|
||||||
GRADLE_ENTERPRISE_ACCESS_KEY:
|
|
||||||
GRADLE_ENTERPRISE_CACHE_USERNAME:
|
|
||||||
GRADLE_ENTERPRISE_CACHE_PASSWORD:
|
|
||||||
GRADLE_ENTERPRISE_URL: https://ge.spring.io
|
|
||||||
run:
|
|
||||||
path: git-repo/ci/scripts/build-project.sh
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: springio/github-changelog-generator
|
|
||||||
tag: '0.0.7'
|
|
||||||
username: ((docker-hub-username))
|
|
||||||
password: ((docker-hub-password))
|
|
||||||
inputs:
|
|
||||||
- name: git-repo
|
|
||||||
- name: artifactory-repo
|
|
||||||
outputs:
|
|
||||||
- name: generated-changelog
|
|
||||||
params:
|
|
||||||
GITHUB_ORGANIZATION:
|
|
||||||
GITHUB_REPO:
|
|
||||||
GITHUB_USERNAME:
|
|
||||||
GITHUB_TOKEN:
|
|
||||||
RELEASE_TYPE:
|
|
||||||
run:
|
|
||||||
path: git-repo/ci/scripts/generate-changelog.sh
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: springio/concourse-release-scripts
|
|
||||||
tag: '0.3.4'
|
|
||||||
username: ((docker-hub-username))
|
|
||||||
password: ((docker-hub-password))
|
|
||||||
inputs:
|
|
||||||
- name: git-repo
|
|
||||||
- name: artifactory-repo
|
|
||||||
outputs:
|
|
||||||
- name: version
|
|
||||||
params:
|
|
||||||
ARTIFACTORY_SERVER:
|
|
||||||
ARTIFACTORY_USERNAME:
|
|
||||||
ARTIFACTORY_PASSWORD:
|
|
||||||
RELEASE_TYPE:
|
|
||||||
SONATYPE_USERNAME:
|
|
||||||
SONATYPE_PASSWORD:
|
|
||||||
SONATYPE_URL:
|
|
||||||
SONATYPE_STAGING_PROFILE_ID:
|
|
||||||
run:
|
|
||||||
path: git-repo/ci/scripts/promote.sh
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
platform: linux
|
|
||||||
inputs:
|
|
||||||
- name: git-repo
|
|
||||||
outputs:
|
|
||||||
- name: stage-git-repo
|
|
||||||
- name: distribution-repository
|
|
||||||
params:
|
|
||||||
RELEASE_TYPE:
|
|
||||||
CI: true
|
|
||||||
GRADLE_ENTERPRISE_CACHE_USERNAME:
|
|
||||||
GRADLE_ENTERPRISE_CACHE_PASSWORD:
|
|
||||||
GRADLE_ENTERPRISE_URL: https://ge.spring.io
|
|
||||||
caches:
|
|
||||||
- path: gradle
|
|
||||||
run:
|
|
||||||
path: git-repo/ci/scripts/stage.sh
|
|
||||||
Reference in New Issue
Block a user