diff --git a/ci/parameters.yml b/ci/parameters.yml index 92880e75b11..74f41d365c9 100644 --- a/ci/parameters.yml +++ b/ci/parameters.yml @@ -8,4 +8,7 @@ milestone: "6.0.x" build-name: "spring-framework" pipeline-name: "spring-framework" concourse-url: "https://ci.spring.io" +registry-mirror-host: docker.repo.spring.io +registry-mirror-username: ((artifactory-username)) +registry-mirror-password: ((artifactory-password)) task-timeout: 1h00m diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 04054c32cc5..1e6a78c1a22 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -24,6 +24,10 @@ anchors: username: ((docker-hub-username)) password: ((docker-hub-password)) tag: ((milestone)) + registry-mirror-vars: ®istry-mirror-vars + registry-mirror-host: ((registry-mirror-host)) + registry-mirror-username: ((registry-mirror-username)) + registry-mirror-password: ((registry-mirror-password)) slack-fail-params: &slack-fail-params text: > :concourse-failed: @@ -154,13 +158,20 @@ resources: jobs: - name: build-ci-images plan: - - get: ci-images-git-repo - trigger: true - - in_parallel: + - 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 + <<: *registry-mirror-vars - put: ci-image params: - build: ci-images-git-repo/ci/images - dockerfile: ci-images-git-repo/ci/images/ci-image/Dockerfile + image: ci-image/image.tar - name: build serial: true public: true diff --git a/ci/scripts/sync-to-maven-central.sh b/ci/scripts/sync-to-maven-central.sh deleted file mode 100755 index b42631164ed..00000000000 --- a/ci/scripts/sync-to-maven-central.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json -version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) -java -jar /opt/concourse-release-scripts.jar syncToCentral "RELEASE" $BUILD_INFO_LOCATION || { exit 1; } - -echo "Sync complete" -echo $version > version/version diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml new file mode 100644 index 00000000000..2392595349e --- /dev/null +++ b/ci/tasks/build-ci-image.yml @@ -0,0 +1,31 @@ +--- +platform: linux +image_resource: + type: registry-image + source: + repository: concourse/oci-build-task + tag: 0.9.1 + registry_mirror: + host: ((registry-mirror-host)) + username: ((registry-mirror-username)) + password: ((registry-mirror-password)) +inputs: + - name: ci-images-git-repo +outputs: + - name: image +caches: + - path: ci-image-cache +params: + CONTEXT: ci-images-git-repo/ci/images + DOCKERFILE: ci-images-git-repo/ci/images/ci-image/Dockerfile + DOCKER_HUB_AUTH: ((docker-hub-auth)) +run: + path: /bin/sh + args: + - "-c" + - | + mkdir -p /root/.docker + cat > /root/.docker/config.json <