Further reduce repetition in CI pipeline.yml

See gh-21716
pull/22035/head
Phillip Webb 5 years ago
parent c34bcd496d
commit 70f6ada29a

@ -8,12 +8,7 @@ anchors:
username: ((docker-hub-username)) username: ((docker-hub-username))
password: ((docker-hub-password)) password: ((docker-hub-password))
tag: ((milestone)) tag: ((milestone))
build-project-task-params: &build-project-task-params gradle-enterprise-task-params: &gradle-enterprise-task-params
privileged: true
timeout: ((task-timeout))
file: git-repo/ci/tasks/build-project.yml
params:
BRANCH: ((branch))
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username)) GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password)) GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
@ -35,6 +30,13 @@ anchors:
ARTIFACTORY_SERVER: ((artifactory-server)) ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username)) ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password)) 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 artifactory-repo-put-params: &artifactory-repo-put-params
repo: libs-snapshot-local repo: libs-snapshot-local
folder: distribution-repository folder: distribution-repository
@ -395,9 +397,7 @@ jobs:
timeout: ((task-timeout)) timeout: ((task-timeout))
params: params:
BRANCH: ((branch)) BRANCH: ((branch))
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) <<: *gradle-enterprise-task-params
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
on_failure: on_failure:
do: do:
- put: slack-alert - put: slack-alert
@ -417,9 +417,7 @@ jobs:
file: git-repo/ci/tasks/stage.yml file: git-repo/ci/tasks/stage.yml
params: params:
RELEASE_TYPE: M RELEASE_TYPE: M
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) <<: *gradle-enterprise-task-params
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
- put: artifactory-repo - put: artifactory-repo
params: params:
<<: *artifactory-repo-put-params <<: *artifactory-repo-put-params
@ -438,9 +436,7 @@ jobs:
file: git-repo/ci/tasks/stage.yml file: git-repo/ci/tasks/stage.yml
params: params:
RELEASE_TYPE: RC RELEASE_TYPE: RC
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) <<: *gradle-enterprise-task-params
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
- put: artifactory-repo - put: artifactory-repo
params: params:
<<: *artifactory-repo-put-params <<: *artifactory-repo-put-params
@ -459,9 +455,7 @@ jobs:
file: git-repo/ci/tasks/stage.yml file: git-repo/ci/tasks/stage.yml
params: params:
RELEASE_TYPE: RELEASE RELEASE_TYPE: RELEASE
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) <<: *gradle-enterprise-task-params
GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username))
GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password))
- put: artifactory-repo - put: artifactory-repo
params: params:
<<: *artifactory-repo-put-params <<: *artifactory-repo-put-params

Loading…
Cancel
Save