diff --git a/ci/images/docker-lib.sh b/ci/images/docker-lib.sh index bcc0f33a013b..eac9c2eee9a4 100644 --- a/ci/images/docker-lib.sh +++ b/ci/images/docker-lib.sh @@ -68,12 +68,8 @@ start_docker() { server_args="${server_args}" - for registry in $3; do - server_args="${server_args} --insecure-registry ${registry}" - done - - if [ -n "$4" ]; then - server_args="${server_args} --registry-mirror $4" + if [ -n "$1" ]; then + server_args="${server_args} --registry-mirror https://$1" fi try_start() { diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 784de17d411a..44cd5360ccb1 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -39,6 +39,7 @@ anchors: file: git-repo/ci/tasks/build-project.yml params: BRANCH: ((branch)) + DOCKER_HUB_MIRROR: ((docker-hub-mirror)) <<: *gradle-enterprise-task-params <<: *docker-hub-task-params run-system-tests-task-params: &run-system-tests-task-params @@ -88,6 +89,10 @@ anchors: gradle-publish-params: &gradle-publish-params GRADLE_PUBLISH_KEY: ((gradle-publish-key)) GRADLE_PUBLISH_SECRET: ((gradle-publish-secret)) + docker-hub-mirror-vars: &docker-hub-mirror-vars + docker-hub-mirror: ((docker-hub-mirror)) + docker-hub-mirror-username: ((docker-hub-mirror-username)) + docker-hub-mirror-password: ((docker-hub-mirror-password)) resource_types: - name: artifactory-resource type: registry-image @@ -251,6 +256,7 @@ jobs: image: ci-image vars: ci-image-name: ci-image + <<: *docker-hub-mirror-vars - task: build-ci-image-jdk11 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -258,6 +264,7 @@ jobs: image: ci-image-jdk11 vars: ci-image-name: ci-image-jdk11 + <<: *docker-hub-mirror-vars - task: build-ci-image-jdk17 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -265,6 +272,7 @@ jobs: image: ci-image-jdk17 vars: ci-image-name: ci-image-jdk17 + <<: *docker-hub-mirror-vars - in_parallel: - put: ci-image params: @@ -559,6 +567,8 @@ jobs: RELEASE_TYPE: M GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) + vars: + <<: *docker-hub-mirror-vars - put: github-pre-release params: name: generated-changelog/tag @@ -588,6 +598,8 @@ jobs: RELEASE_TYPE: RC GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) + vars: + <<: *docker-hub-mirror-vars - put: github-pre-release params: name: generated-changelog/tag @@ -647,6 +659,8 @@ jobs: RELEASE_TYPE: RELEASE GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) + vars: + <<: *docker-hub-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 c7af47efdd3f..40c40fe9ecf9 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -5,6 +5,10 @@ image_resource: source: repository: concourse/oci-build-task tag: 0.9.1 + registry_mirror: + host: ((docker-hub-mirror)) + username: ((docker-hub-mirror-username)) + password: ((docker-hub-mirror-password)) inputs: - name: ci-images-git-repo outputs: @@ -15,6 +19,7 @@ params: CONTEXT: ci-images-git-repo/ci/images DOCKERFILE: ci-images-git-repo/ci/images/((ci-image-name))/Dockerfile DOCKER_HUB_AUTH: ((docker-hub-auth)) + REGISTRY_MIRRORS: ((docker-hub-mirror)) run: path: /bin/sh args: diff --git a/ci/tasks/build-project.yml b/ci/tasks/build-project.yml index e6c296c49a82..b3e050d189ef 100644 --- a/ci/tasks/build-project.yml +++ b/ci/tasks/build-project.yml @@ -15,11 +15,12 @@ params: GRADLE_ENTERPRISE_CACHE_USERNAME: GRADLE_ENTERPRISE_CACHE_PASSWORD: GRADLE_ENTERPRISE_URL: https://ge.spring.io + DOCKER_HUB_MIRROR: run: path: bash args: - -ec - | source /docker-lib.sh - start_docker + start_docker $DOCKER_HUB_MIRROR ${PWD}/git-repo/ci/scripts/build-project.sh diff --git a/ci/tasks/generate-changelog.yml b/ci/tasks/generate-changelog.yml index b3f40278c8e6..2186a259e557 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.7' + registry_mirror: + host: ((docker-hub-mirror)) + username: ((docker-hub-mirror-username)) + password: ((docker-hub-mirror-password)) inputs: - name: git-repo - name: artifactory-repo diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/data/package-info.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/data/package-info.java new file mode 100644 index 000000000000..b5c9234c774f --- /dev/null +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/data/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2012-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Actuator support for Spring Data {@code Repository} metrics. + */ +package org.springframework.boot.actuate.metrics.data;