2018-08-04 06:18:49 +08:00
resource_types :
- name : artifactory-resource
type : docker-image
source :
repository : springio/artifactory-resource
2018-11-20 07:13:07 +08:00
tag : 0.0 .5
- name : pull-request
type : docker-image
source :
repository : jtarchie/pr
- 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
2018-08-04 06:18:49 +08:00
resources :
- name : git-repo
type : git
source :
uri : ((github-repo))
2018-11-20 07:13:07 +08:00
username : ((github-username))
password : ((github-password))
2018-08-04 06:18:49 +08:00
branch : ((branch))
ignore_paths : [ "ci/images/*" ]
2018-11-20 07:13:07 +08:00
- name : git-pull-request
type : pull-request
source :
access_token : ((github-access-token))
repo : spring-io/initializr
base : ((branch))
ignore_paths : [ "ci/*" ]
2018-08-04 06:18:49 +08:00
- name : ci-images-git-repo
type : git
source :
2018-11-09 17:33:53 +08:00
uri : ((github-repo))
2018-08-04 06:18:49 +08:00
branch : ((branch))
paths : [ "ci/images/*" ]
- name : initializr-ci-image
type : docker-image
source :
repository : springci/initializr-ci-image
username : ((docker-hub-username))
password : ((docker-hub-password))
tag : ((branch))
- name : artifactory-repo
type : artifactory-resource
source :
uri : ((artifactory-server))
username : ((artifactory-username))
password : ((artifactory-password))
build_name : ((build-name))
2018-11-20 07:13:07 +08:00
- name : slack-alert
type : slack-notification
source :
url : ((slack-webhook-url))
- name : repo-status-build
type : github-status-resource
source :
repository : spring-io/initializr
access_token : ((github-access-token))
branch : ((branch))
context : build
- name : github-release
type : github-release
source :
owner : spring-io
repository : initializr
access_token : ((github-release-notes-access-token))
pre_release : false
2018-08-04 06:18:49 +08:00
jobs :
- name : build-initializr-ci-image
plan :
- get : ci-images-git-repo
trigger : true
- put : initializr-ci-image
params :
build : ci-images-git-repo/ci/images/initializr-ci-image
- name : build
serial : true
2018-11-13 05:13:27 +08:00
public : true
2018-08-04 06:18:49 +08:00
plan :
- get : git-repo
2018-11-09 17:33:53 +08:00
trigger : true
2018-08-04 06:18:49 +08:00
- get : initializr-ci-image
2018-11-20 07:23:39 +08:00
- put : repo-status-build
params : { state : "pending" , commit : "git-repo" }
2018-08-04 06:18:49 +08:00
- task : build-project
image : initializr-ci-image
file : git-repo/ci/tasks/build-project.yml
2018-11-20 07:13:07 +08:00
on_failure :
do :
- put : repo-status-build
params : { state : "failure" , commit : "git-repo" }
- put : slack-alert
params :
text : ":concourse-failed: <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!>"
silent : true
icon_emoji : ":concourse:"
username : concourse-ci
- put : repo-status-build
params : { state : "success" , commit : "git-repo" }
- put : slack-alert
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!>"
silent : true
icon_emoji : ":concourse:"
username : concourse-ci
2018-08-04 06:18:49 +08:00
- put : artifactory-repo
params : &artifactory-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
2018-11-20 07:13:07 +08:00
- name : build-pull-requests
serial : true
public : true
plan :
- get : initializr-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 : initializr-ci-image
file : git-repo/ci/tasks/build-pr-project.yml
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 : stage-release
serial : true
plan :
- get : initializr-ci-image
- get : git-repo
trigger : false
- task : stage
image : initializr-ci-image
file : git-repo/ci/tasks/stage.yml
- put : artifactory-repo
params :
<< : *artifactory-params
repo : libs-staging-local
- put : git-repo
params :
repository : stage-git-repo
- name : promote-release
serial : true
plan :
- get : initializr-ci-image
- get : git-repo
trigger : false
- get : artifactory-repo
trigger : false
passed : [ stage-release]
params :
save_build_info : true
- task : promote
image : initializr-ci-image
file : git-repo/ci/tasks/promote.yml
params :
ARTIFACTORY_SERVER : ((artifactory-server))
ARTIFACTORY_USERNAME : ((artifactory-username))
ARTIFACTORY_PASSWORD : ((artifactory-password))
- task : generate-release-notes
file : git-repo/ci/tasks/generate-release-notes.yml
params :
GITHUB_ORGANIZATION : spring-io
GITHUB_REPO : initializr
GITHUB_USERNAME : ((github-username))
GITHUB_TOKEN : ((github-release-notes-access-token))
- put : github-release
params :
name : generated-release-notes/version
tag : generated-release-notes/version
body : generated-release-notes/body
2018-08-04 06:18:49 +08:00
groups :
- name : "Build"
jobs :
- build
2018-11-20 07:13:07 +08:00
- name : "Build Pull Requests"
jobs :
- "build-pull-requests"
2018-08-04 06:18:49 +08:00
- name : "CI Images"
jobs :
- build-initializr-ci-image
2018-11-20 07:13:07 +08:00
- name : "Release"
jobs :
- stage-release
- promote-release