From 70ecaac16ced16a818dab83aa92aac86851a4425 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 22 Jul 2021 08:35:32 +0100 Subject: [PATCH] Configure a mirror for registry-image image_resources Closes gh-27441 --- ci/parameters.yml | 3 +++ ci/pipeline.yml | 13 +++++++++++++ ci/tasks/build-ci-image.yml | 4 ++++ ci/tasks/generate-changelog.yml | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/ci/parameters.yml b/ci/parameters.yml index 03bdb9dacc..1ee73bf2a0 100644 --- a/ci/parameters.yml +++ b/ci/parameters.yml @@ -11,3 +11,6 @@ milestone: "2.4.x" build-name: "spring-boot" concourse-url: "https://ci.spring.io" task-timeout: 2h00m +registry-mirror-host: docker.repo.spring.io +registry-mirror-username: ((artifactory-username)) +registry-mirror-password: ((artifactory-password)) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 0c0ba22094..0dee79d49c 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -80,6 +80,10 @@ anchors: gradle-publish-params: &gradle-publish-params gradle_publish_key: ((gradle-publish-key)) gradle_publish_secret: ((gradle-publish-secret)) + registry-mirror-vars: ®istry-mirror-vars + registry-mirror-host: ((registry-mirror-host)) + registry-mirror-username: ((registry-mirror-username)) + registry-mirror-password: ((registry-mirror-password)) resource_types: - name: artifactory-resource type: registry-image @@ -232,6 +236,7 @@ jobs: image: ci-image vars: ci-image-name: ci-image + <<: *registry-mirror-vars - task: build-ci-image-jdk11 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -239,6 +244,7 @@ jobs: image: ci-image-jdk11 vars: ci-image-name: ci-image-jdk11 + <<: *registry-mirror-vars - task: build-ci-image-jdk16 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -246,6 +252,7 @@ jobs: image: ci-image-jdk16 vars: ci-image-name: ci-image-jdk16 + <<: *registry-mirror-vars - in_parallel: - put: ci-image params: @@ -540,6 +547,8 @@ jobs: RELEASE_TYPE: M GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) + vars: + <<: *registry-mirror-vars - put: github-pre-release params: name: generated-changelog/tag @@ -569,6 +578,8 @@ jobs: RELEASE_TYPE: RC GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) + vars: + <<: *registry-mirror-vars - put: github-pre-release params: name: generated-changelog/tag @@ -626,6 +637,8 @@ jobs: RELEASE_TYPE: RELEASE GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) + vars: + <<: *registry-mirror-vars - put: github-release params: name: generated-changelog/tag diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml index 30b2df98cd..716cc2e8b8 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -4,6 +4,10 @@ image_resource: type: registry-image source: repository: vito/oci-build-task + registry_mirror: + host: ((registry-mirror-host)) + username: ((registry-mirror-username)) + password: ((registry-mirror-password)) inputs: - name: ci-images-git-repo outputs: diff --git a/ci/tasks/generate-changelog.yml b/ci/tasks/generate-changelog.yml index ea048af96a..34f891c9a3 100755 --- a/ci/tasks/generate-changelog.yml +++ b/ci/tasks/generate-changelog.yml @@ -5,6 +5,10 @@ image_resource: source: repository: springio/github-changelog-generator tag: '0.0.6' + registry_mirror: + host: ((registry-mirror-host)) + username: ((registry-mirror-username)) + password: ((registry-mirror-password)) inputs: - name: git-repo - name: artifactory-repo