spring-boot/ci/pipeline.yml

580 lines
16 KiB
YAML
Raw Normal View History

anchors:
git-repo-resource-source: &git-repo-resource-source
uri: ((github-repo))
username: ((github-username))
password: ((github-password))
branch: ((branch))
docker-resource-source: &docker-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))
github-task-params: &github-task-params
GITHUB_REPO: spring-boot
GITHUB_ORGANIZATION: spring-projects
GITHUB_PASSWORD: ((github-password))
GITHUB_USERNAME: ((github-username))
MILESTONE: ((milestone))
bintray-task-params: &bintray-task-params
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_REPO: ((bintray-repo))
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_API_KEY: ((bintray-api-key))
sontatype-task-params: &sonatype-task-params
SONATYPE_USER_TOKEN: ((sonatype-user-token))
SONATYPE_PASSWORD_TOKEN: ((sonatype-user-token-password))
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
artifactory-repo-put-params: &artifactory-repo-put-params
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-boot-docs-*.zip"
properties:
"zip.type": "docs"
"zip.deployed": "false"
slack-fail-params: &slack-fail-params
2020-06-11 08:40:40 +08:00
text: >
:concourse-failed: ${BUILD_PIPELINE_NAME} ${BUILD_JOB_NAME} failed!
[<https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}|build log>]
[$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
2020-06-11 08:40:40 +08:00
text: >
:concourse-succeeded: ${BUILD_PIPELINE_NAME} ${BUILD_JOB_NAME} was successful!
[<https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}|build log>]
[$TEXT_FILE_CONTENT]
text_file: git-repo/build/build-scan-uri.txt
silent: true
icon_emoji: ":concourse:"
username: concourse-ci
resource_types:
- name: artifactory-resource
type: docker-image
source:
repository: springio/artifactory-resource
tag: 0.0.12
- name: pull-request
type: docker-image
source:
repository: teliaoss/github-pr-resource
- name: github-status-resource
type: docker-image
source:
repository: dpb587/github-status-resource
tag: master
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
resources:
- name: git-repo
type: git
2019-04-24 03:00:07 +08:00
icon: github-circle
source:
<<: *git-repo-resource-source
- name: git-repo-windows
type: git
2020-06-11 06:24:04 +08:00
icon: github-circle
source:
<<: *git-repo-resource-source
git_config:
- name: core.autocrlf
value: true
icon: github-circle
- name: git-pull-request
type: pull-request
2019-04-24 03:00:07 +08:00
icon: source-pull
source:
2019-06-15 13:00:58 +08:00
access_token: ((github-ci-pull-request-token))
repository: ((github-repo-name))
base_branch: ((branch))
ignore_paths: ["ci/*"]
- name: github-pre-release
type: github-release
2019-04-24 03:00:07 +08:00
icon: briefcase-download-outline
source:
owner: spring-projects
repository: spring-boot
2019-06-15 13:00:58 +08:00
access_token: ((github-ci-release-token))
pre_release: true
release: false
- name: github-release
type: github-release
2019-04-24 03:00:07 +08:00
icon: briefcase-download
source:
owner: spring-projects
repository: spring-boot
2019-06-15 13:00:58 +08:00
access_token: ((github-ci-release-token))
pre_release: false
- name: ci-images-git-repo
type: git
2019-04-24 03:00:07 +08:00
icon: github-circle
source:
uri: ((github-repo))
branch: ((branch))
paths: ["ci/images/*"]
- name: spring-boot-ci-image
type: docker-image
2019-04-24 03:00:07 +08:00
icon: docker
source:
<<: *docker-resource-source
repository: ((docker-hub-organization))/spring-boot-ci-image
- name: spring-boot-jdk11-ci-image
type: docker-image
2019-04-24 03:00:07 +08:00
icon: docker
source:
<<: *docker-resource-source
repository: ((docker-hub-organization))/spring-boot-jdk11-ci-image
2020-03-07 01:01:35 +08:00
- name: spring-boot-jdk14-ci-image
type: docker-image
icon: docker
source:
<<: *docker-resource-source
2020-03-07 01:01:35 +08:00
repository: ((docker-hub-organization))/spring-boot-jdk14-ci-image
- name: artifactory-repo
type: artifactory-resource
2019-04-24 03:00:07 +08:00
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
2019-04-24 03:00:07 +08:00
icon: eye-check-outline
source:
repository: ((github-repo-name))
2019-06-15 13:00:58 +08:00
access_token: ((github-ci-status-token))
branch: ((branch))
context: build
- name: repo-status-jdk11-build
type: github-status-resource
2019-04-24 03:00:07 +08:00
icon: eye-check-outline
source:
repository: ((github-repo-name))
2019-06-15 13:00:58 +08:00
access_token: ((github-ci-status-token))
branch: ((branch))
context: jdk11-build
2020-03-07 01:01:35 +08:00
- name: repo-status-jdk14-build
type: github-status-resource
icon: eye-check-outline
source:
repository: ((github-repo-name))
access_token: ((github-ci-status-token))
branch: ((branch))
context: jdk14-build
- name: slack-alert
type: slack-notification
2019-04-24 03:00:07 +08:00
icon: slack
source:
url: ((slack-webhook-url))
- name: every-wednesday
type: time
2019-04-24 03:00:07 +08:00
icon: clock-outline
source:
start: 8:00 PM
stop: 9:00 PM
days: [Wednesday]
- name: daily
type: time
icon: clock-outline
source: { interval: "24h" }
jobs:
- name: build-spring-boot-ci-images
plan:
- get: ci-images-git-repo
trigger: true
- in_parallel:
- put: spring-boot-ci-image
params:
build: ci-images-git-repo/ci/images
dockerfile: ci-images-git-repo/ci/images/spring-boot-ci-image/Dockerfile
- put: spring-boot-jdk11-ci-image
params:
build: ci-images-git-repo/ci/images
dockerfile: ci-images-git-repo/ci/images/spring-boot-jdk11-ci-image/Dockerfile
2020-03-07 01:01:35 +08:00
- put: spring-boot-jdk14-ci-image
params:
build: ci-images-git-repo/ci/images
dockerfile: ci-images-git-repo/ci/images/spring-boot-jdk14-ci-image/Dockerfile
- name: detect-jdk-updates
plan:
- get: git-repo
- get: every-wednesday
trigger: true
2018-12-13 04:08:21 +08:00
- get: spring-boot-ci-image
- in_parallel:
- task: detect-jdk8-update
2020-06-11 08:06:39 +08:00
image: spring-boot-ci-image
file: git-repo/ci/tasks/detect-jdk-updates.yml
params:
<<: *github-task-params
JDK_VERSION: java8
- task: detect-jdk11-update
2020-06-11 08:06:39 +08:00
image: spring-boot-ci-image
file: git-repo/ci/tasks/detect-jdk-updates.yml
params:
<<: *github-task-params
JDK_VERSION: java11
2020-03-07 01:01:35 +08:00
- task: detect-jdk14-update
2020-06-11 08:09:32 +08:00
image: spring-boot-ci-image
2020-03-07 01:01:35 +08:00
file: git-repo/ci/tasks/detect-jdk-updates.yml
params:
2020-06-11 08:09:32 +08:00
<<: *github-task-params
2020-03-07 01:01:35 +08:00
JDK_VERSION: java14
- name: detect-ubuntu-image-updates
plan:
- get: git-repo
- get: every-wednesday
trigger: true
- get: spring-boot-ci-image
- do:
- task: detect-ubuntu-image-updates
2020-06-11 08:06:39 +08:00
image: spring-boot-ci-image
file: git-repo/ci/tasks/detect-ubuntu-image-updates.yml
params:
<<: *github-task-params
- name: detect-docker-updates
plan:
- get: git-repo
- get: every-wednesday
trigger: true
- get: spring-boot-ci-image
- do:
- task: detect-docker-updates
2020-06-11 08:06:39 +08:00
image: spring-boot-ci-image
file: git-repo/ci/tasks/detect-docker-updates.yml
params:
<<: *github-task-params
- name: build
serial: true
public: true
plan:
- get: spring-boot-ci-image
- get: git-repo
trigger: true
- put: repo-status-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
image: spring-boot-ci-image
2020-06-11 08:06:39 +08:00
<<: *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: artifactory-repo
params:
<<: *artifactory-repo-put-params
get_params:
threads: 8
on_failure:
do:
- put: slack-alert
params:
<<: *slack-fail-params
- put: slack-alert
params:
<<: *slack-success-params
- name: build-pull-requests
serial: true
public: true
plan:
- get: spring-boot-ci-image
- get: git-repo
resource: git-pull-request
trigger: true
version: every
- do:
- put: git-pull-request
params:
path: git-repo
status: pending
- task: build-project
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-pr-project.yml
2020-06-11 08:06:39 +08:00
timeout: ((task-timeout))
on_success:
put: git-pull-request
params:
path: git-repo
status: success
on_failure:
put: git-pull-request
params:
path: git-repo
status: failure
- name: jdk11-build
serial: true
public: true
plan:
- get: spring-boot-jdk11-ci-image
- get: git-repo
trigger: true
- put: repo-status-jdk11-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
image: spring-boot-jdk11-ci-image
2020-06-11 08:06:39 +08:00
<<: *build-project-task-params
on_failure:
do:
- put: repo-status-jdk11-build
params: { state: "failure", commit: "git-repo" }
- put: slack-alert
params:
<<: *slack-fail-params
- put: repo-status-jdk11-build
params: { state: "success", commit: "git-repo" }
- put: slack-alert
params:
<<: *slack-success-params
2020-03-07 01:01:35 +08:00
- name: jdk14-build
serial: true
public: true
plan:
- get: spring-boot-jdk14-ci-image
- get: git-repo
2020-03-18 21:26:04 +08:00
trigger: true
2020-03-07 01:01:35 +08:00
- put: repo-status-jdk14-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
image: spring-boot-jdk14-ci-image
2020-06-11 08:18:52 +08:00
<<: *build-project-task-params
2020-03-07 01:01:35 +08:00
on_failure:
do:
- put: repo-status-jdk14-build
params: { state: "failure", commit: "git-repo" }
- put: slack-alert
params:
2020-06-11 08:33:48 +08:00
<<: *slack-fail-params
2020-03-07 01:01:35 +08:00
- put: repo-status-jdk14-build
params: { state: "success", commit: "git-repo" }
- put: slack-alert
params:
2020-06-11 08:33:48 +08:00
<<: *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: spring-boot-ci-image
- get: git-repo
trigger: false
- task: stage
image: spring-boot-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: M
<<: *gradle-enterprise-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: spring-boot-ci-image
- get: git-repo
trigger: false
- task: stage
image: spring-boot-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: RC
<<: *gradle-enterprise-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: spring-boot-ci-image
- get: git-repo
trigger: false
- task: stage
image: spring-boot-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: RELEASE
<<: *gradle-enterprise-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: spring-boot-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-milestone]
params:
download_artifacts: false
save_build_info: true
- task: promote
image: spring-boot-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: M
<<: *artifactory-task-params
- task: generate-release-notes
file: git-repo/ci/tasks/generate-release-notes.yml
params:
RELEASE_TYPE: M
GITHUB_USERNAME: ((github-username))
2019-06-15 13:00:58 +08:00
GITHUB_TOKEN: ((github-ci-release-token))
- put: github-pre-release
params:
name: generated-release-notes/tag
tag: generated-release-notes/tag
body: generated-release-notes/release-notes.md
- name: promote-rc
serial: true
plan:
2018-01-31 07:02:17 +08:00
- get: spring-boot-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-rc]
params:
download_artifacts: false
save_build_info: true
- task: promote
image: spring-boot-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: RC
<<: *artifactory-task-params
- task: generate-release-notes
file: git-repo/ci/tasks/generate-release-notes.yml
params:
RELEASE_TYPE: RC
GITHUB_USERNAME: ((github-username))
2019-06-15 13:00:58 +08:00
GITHUB_TOKEN: ((github-ci-release-token))
- put: github-pre-release
params:
name: generated-release-notes/tag
tag: generated-release-notes/tag
body: generated-release-notes/release-notes.md
- name: promote-release
serial: true
plan:
2018-01-31 07:02:17 +08:00
- get: spring-boot-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-release]
params:
download_artifacts: false
save_build_info: true
- task: promote
image: spring-boot-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: RELEASE
<<: *artifactory-task-params
<<: *bintray-task-params
- name: sync-to-maven-central
serial: true
plan:
- get: spring-boot-ci-image
- get: git-repo
- get: artifactory-repo
trigger: true
passed: [promote-release]
params:
download_artifacts: false
save_build_info: true
- task: sync-to-maven-central
image: spring-boot-ci-image
file: git-repo/ci/tasks/sync-to-maven-central.yml
params:
<<: *bintray-task-params
<<: *sonatype-task-params
- task: generate-release-notes
file: git-repo/ci/tasks/generate-release-notes.yml
params:
RELEASE_TYPE: RELEASE
GITHUB_USERNAME: ((github-username))
2019-06-15 13:00:58 +08:00
GITHUB_TOKEN: ((github-ci-release-token))
- put: github-release
params:
name: generated-release-notes/tag
tag: generated-release-notes/tag
body: generated-release-notes/release-notes.md
groups:
- name: "Build"
2020-03-21 20:56:41 +08:00
jobs: ["build", "jdk11-build", "jdk14-build", "windows-build"]
- name: "Release"
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "sync-to-maven-central"]
- name: "CI Images"
jobs: ["build-spring-boot-ci-images", "detect-docker-updates", "detect-jdk-updates", "detect-ubuntu-image-updates"]
- name: "Build Pull Requests"
jobs: ["build-pull-requests"]