From 81ced3ecdb08ffa427ccf7728b2cbdf27da6a16c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 20 Nov 2023 10:36:58 +0000 Subject: [PATCH] Improve parameterization of the CI pipeline Closes gh-38394 --- ci/parameters.yml | 6 ++++-- ci/pipeline.yml | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/ci/parameters.yml b/ci/parameters.yml index 92b103de86..56ad71a22b 100644 --- a/ci/parameters.yml +++ b/ci/parameters.yml @@ -1,7 +1,9 @@ -github-repo: "https://github.com/spring-projects/spring-boot.git" -github-repo-name: "spring-projects/spring-boot" +github-organization-name: "spring-projects" +github-repository-name: "spring-boot" +github-repository-uri: "https://github.com/spring-projects/spring-boot.git" homebrew-tap-repo: "https://github.com/spring-io/homebrew-tap.git" docker-hub-organization: "springci" +docker-hub-repository-prefix: "spring-boot" artifactory-url: "https://repo.spring.io" branch: "2.7.x" milestone: "2.7.x" diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 1bcf1043ea..2ed86ca108 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -1,6 +1,6 @@ anchors: git-repo-resource-source: &git-repo-resource-source - uri: ((github-repo)) + uri: ((github-repository-uri)) username: ((github-username)) password: ((github-ci-release-token)) branch: ((branch)) @@ -22,8 +22,8 @@ anchors: DOCKER_HUB_PASSWORD: ((docker-hub-password)) DOCKER_HUB_AUTH: ((docker-hub-auth)) github-task-params: &github-task-params - GITHUB_REPO: spring-boot - GITHUB_ORGANIZATION: spring-projects + GITHUB_REPO: ((github-repository-name)) + GITHUB_ORGANIZATION: ((github-organization-name)) GITHUB_PASSWORD: ((github-ci-release-token)) GITHUB_USERNAME: ((github-username)) MILESTONE: ((milestone)) @@ -143,8 +143,8 @@ resources: type: github-release icon: briefcase-download-outline source: - owner: spring-projects - repository: spring-boot + owner: ((github-organization-name)) + repository: ((github-repository-name)) access_token: ((github-ci-release-token)) pre_release: true release: false @@ -152,15 +152,15 @@ resources: type: github-release icon: briefcase-download source: - owner: spring-projects - repository: spring-boot + owner: ((github-organization-name)) + repository: ((github-repository-name)) access_token: ((github-ci-release-token)) pre_release: false - name: ci-images-git-repo type: git icon: github source: - uri: ((github-repo)) + uri: ((github-repository-uri)) branch: ((branch)) paths: ["ci/images/*"] - name: ci-image @@ -168,25 +168,25 @@ resources: icon: docker source: <<: *ci-registry-image-resource-source - repository: ((docker-hub-organization))/spring-boot-ci + repository: ((docker-hub-organization))/((docker-hub-repository-prefix))-ci - name: ci-image-jdk11 type: registry-image icon: docker source: <<: *ci-registry-image-resource-source - repository: ((docker-hub-organization))/spring-boot-ci-jdk11 + repository: ((docker-hub-organization))/((docker-hub-repository-prefix))-ci-jdk11 - name: ci-image-jdk17 type: registry-image icon: docker source: <<: *ci-registry-image-resource-source - repository: ((docker-hub-organization))/spring-boot-ci-jdk17 + repository: ((docker-hub-organization))/((docker-hub-repository-prefix))-ci-jdk17 - name: ci-image-jdk21 type: registry-image icon: docker source: <<: *ci-registry-image-resource-source - repository: ((docker-hub-organization))/spring-boot-ci-jdk21 + repository: ((docker-hub-organization))/((docker-hub-repository-prefix))-ci-jdk21 - name: paketo-builder-base-image type: registry-image icon: docker @@ -207,7 +207,7 @@ resources: type: github-status-resource icon: eye-check-outline source: - repository: ((github-repo-name)) + repository: ((github-organization-name))/((github-repository-name)) access_token: ((github-ci-status-token)) branch: ((branch)) context: build @@ -215,7 +215,7 @@ resources: type: github-status-resource icon: eye-check-outline source: - repository: ((github-repo-name)) + repository: ((github-organization-name))/((github-repository-name)) access_token: ((github-ci-status-token)) branch: ((branch)) context: jdk11-build @@ -223,7 +223,7 @@ resources: type: github-status-resource icon: eye-check-outline source: - repository: ((github-repo-name)) + repository: ((github-organization-name))/((github-repository-name)) access_token: ((github-ci-status-token)) branch: ((branch)) context: jdk17-build @@ -231,7 +231,7 @@ resources: type: github-status-resource icon: eye-check-outline source: - repository: ((github-repo-name)) + repository: ((github-organization-name))/((github-repository-name)) access_token: ((github-ci-status-token)) branch: ((branch)) context: jdk21-build