148 lines
3.9 KiB
YAML
148 lines
3.9 KiB
YAML
anchors:
|
|
docker-resource-source: &docker-resource-source
|
|
username: ((docker-hub-username))
|
|
password: ((docker-hub-password))
|
|
tag: master
|
|
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))
|
|
artifactory-task-params: &artifactory-task-params
|
|
ARTIFACTORY_SERVER: ((artifactory-server))
|
|
ARTIFACTORY_USERNAME: ((artifactory-username))
|
|
ARTIFACTORY_PASSWORD: ((artifactory-password))
|
|
|
|
resource_types:
|
|
- name: artifactory-resource
|
|
type: registry-image
|
|
source:
|
|
repository: springio/artifactory-resource
|
|
tag: 0.0.17
|
|
|
|
resources:
|
|
- name: git-repo
|
|
type: git
|
|
icon: github
|
|
source:
|
|
uri: ((github-repo))
|
|
username: ((github-username))
|
|
password: ((github-ci-release-token))
|
|
branch: ((branch))
|
|
- name: ci-images-git-repo
|
|
type: git
|
|
icon: github
|
|
source:
|
|
uri: ((github-repo))
|
|
branch: ((branch))
|
|
paths: ["ci/images/*"]
|
|
- name: ci-image
|
|
type: registry-image
|
|
icon: docker
|
|
source:
|
|
<<: *docker-resource-source
|
|
repository: ((docker-hub-organization))/spring-graphql-ci-image
|
|
- name: artifactory-repo
|
|
type: artifactory-resource
|
|
icon: package-variant
|
|
source:
|
|
uri: ((artifactory-server))
|
|
username: ((artifactory-username))
|
|
password: ((artifactory-password))
|
|
build_name: ((build-name))
|
|
|
|
jobs:
|
|
- name: build-ci-images
|
|
plan:
|
|
- get: git-repo
|
|
- get: ci-images-git-repo
|
|
trigger: true
|
|
- 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
|
|
- put: ci-image
|
|
params:
|
|
image: ci-image/image.tar
|
|
- name: build
|
|
serial: true
|
|
public: true
|
|
plan:
|
|
- get: ci-image
|
|
- get: git-repo
|
|
trigger: true
|
|
- do:
|
|
- task: build-project
|
|
privileged: true
|
|
timeout: ((task-timeout))
|
|
image: ci-image
|
|
file: git-repo/ci/tasks/build-project.yml
|
|
params:
|
|
BRANCH: ((branch))
|
|
<<: *gradle-enterprise-task-params
|
|
- 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
|
|
threads: 8
|
|
artifact_set:
|
|
- include:
|
|
- "/**/spring-graphql-docs-*.zip"
|
|
properties:
|
|
"zip.name": "spring-graphql"
|
|
"zip.displayname": "Spring GraphQL"
|
|
"zip.deployed": "false"
|
|
"zip.type": "docs"
|
|
get_params:
|
|
threads: 8
|
|
- 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-version.yml
|
|
params:
|
|
RELEASE_TYPE: M
|
|
<<: *gradle-enterprise-task-params
|
|
- put: artifactory-repo
|
|
params:
|
|
<<: *artifactory-params
|
|
repo: libs-staging-local
|
|
- put: git-repo
|
|
params:
|
|
repository: stage-git-repo
|
|
- name: promote-milestone
|
|
serial: true
|
|
plan:
|
|
- get: 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: ci-image
|
|
file: git-repo/ci/tasks/promote-version.yml
|
|
params:
|
|
RELEASE_TYPE: M
|
|
<<: *artifactory-task-params
|
|
|
|
groups:
|
|
- name: "builds"
|
|
jobs: ["build"]
|
|
- name: "releases"
|
|
jobs: [ "stage-milestone", "promote-milestone" ]
|
|
- name: "ci-images"
|
|
jobs: ["build-ci-images"]
|