From fa44a1d0c53d9b57048cfdffc17c74e3ee7fb980 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 11:59:20 -0800 Subject: [PATCH 1/8] Migrate to registry-image in task yaml See gh-24197 --- ci/tasks/generate-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/tasks/generate-changelog.yml b/ci/tasks/generate-changelog.yml index 2df097bc29..ab84fd3475 100755 --- a/ci/tasks/generate-changelog.yml +++ b/ci/tasks/generate-changelog.yml @@ -1,7 +1,7 @@ --- platform: linux image_resource: - type: docker-image + type: registry-image source: repository: springio/github-changelog-generator tag: '0.0.4' From c14be4e84be5f64d413602defad3ffe28a7af720 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 11:57:49 -0800 Subject: [PATCH 2/8] Generate CI images with oci-build-task Update CI to generate images using an `oci-build-task` since the `registry-image` resource cannot perform actual image builds. See gh-24197 --- ci/parameters.yml | 1 - ci/pipeline.yml | 39 ++++++++++++++++++++++++------------- ci/tasks/build-ci-image.yml | 17 ++++++++++++++++ 3 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 ci/tasks/build-ci-image.yml diff --git a/ci/parameters.yml b/ci/parameters.yml index d3ae177109..ef9848b489 100644 --- a/ci/parameters.yml +++ b/ci/parameters.yml @@ -8,7 +8,6 @@ artifactory-server: "https://repo.spring.io" branch: "2.2.x" milestone: "2.2.x" build-name: "spring-boot" -ci-image-name: "spring-boot-ci-22x" concourse-url: "https://ci.spring.io" bintray-subject: "spring" bintray-repo: "jars" diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 88d3fe03d9..4c875b4e64 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -4,7 +4,7 @@ anchors: username: ((github-username)) password: ((github-password)) branch: ((branch)) - docker-resource-source: &docker-resource-source + registry-image-resource-source: ®istry-image-resource-source username: ((docker-hub-username)) password: ((docker-hub-password)) tag: ((milestone)) @@ -142,20 +142,20 @@ resources: type: registry-image icon: docker source: - <<: *docker-resource-source - repository: ((docker-hub-organization))/((ci-image-name)) + <<: *registry-image-resource-source + repository: ((docker-hub-organization))/spring-boot-ci - name: ci-image-jdk11 type: registry-image icon: docker source: - <<: *docker-resource-source - repository: ((docker-hub-organization))/((ci-image-name))-jdk11 + <<: *registry-image-resource-source + repository: ((docker-hub-organization))/spring-boot-ci-jdk11 - name: ci-image-jdk15 type: registry-image icon: docker source: - <<: *docker-resource-source - repository: ((docker-hub-organization))/((ci-image-name))-jdk15 + <<: *registry-image-resource-source + repository: ((docker-hub-organization))/spring-boot-ci-jdk15 - name: artifactory-repo type: artifactory-resource icon: package-variant @@ -209,19 +209,32 @@ jobs: plan: - get: ci-images-git-repo trigger: true + - in_parallel: + - task: build-ci-image + privileged: true + file: git-repo/ci/tasks/build-ci-image.yml + params: + ci-image-name: ci-image + - task: build-ci-image-jdk11 + privileged: true + file: git-repo/ci/tasks/build-ci-image.yml + params: + ci-image-name: ci-image-jdk11 + - task: build-ci-image-jdk15 + privileged: true + file: git-repo/ci/tasks/build-ci-image.yml + params: + ci-image-name: ci-image-jdk15 - in_parallel: - 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 - put: ci-image-jdk11 params: - build: ci-images-git-repo/ci/images - dockerfile: ci-images-git-repo/ci/images/ci-image-jdk11/Dockerfile + image: ci-image-jdk11/image.tar - put: ci-image-jdk15 params: - build: ci-images-git-repo/ci/images - dockerfile: ci-images-git-repo/ci/images/ci-image-jdk15/Dockerfile + image: ci-image-jdk15/image.tar - name: detect-jdk-updates plan: - get: git-repo diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml new file mode 100644 index 0000000000..fbc5e8e97d --- /dev/null +++ b/ci/tasks/build-ci-image.yml @@ -0,0 +1,17 @@ +--- +platform: linux +image_resource: + type: registry-image + source: + repository: vito/oci-build-task +inputs: +- name: ci-images-git-repo +outputs: +- name: ((ci-image-name)) +caches: +- path: ci-image-cache +params: + CONTEXT: ci-images-git-repo/ci/images + DOCKERFILE: ((ci-image-name))/Dockerfile +run: + path: build \ No newline at end of file From cae5ed81cddca4cfe652e673bea2e0e7db291657 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 14:13:05 -0800 Subject: [PATCH 3/8] Fix README --- ci/images/README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/images/README.adoc b/ci/images/README.adoc index 84eae1609e..a2f45c5626 100644 --- a/ci/images/README.adoc +++ b/ci/images/README.adoc @@ -11,7 +11,7 @@ $ docker build --no-cache -f /Dockerfile . For example ---- -$ docker build --no-cache -f spring-boot-ci-image/Dockerfile . +$ docker build --no-cache -f ci-image/Dockerfile . ---- To test run: From 6990fff27ac8bf53ec4a8c2224164311d066b795 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 14:35:04 -0800 Subject: [PATCH 4/8] Attempt to fix oci-build-task config See gh-24197 --- ci/pipeline.yml | 12 ++++++------ ci/tasks/build-ci-image.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 4c875b4e64..1d7d3ff4f3 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -212,18 +212,18 @@ jobs: - in_parallel: - task: build-ci-image privileged: true - file: git-repo/ci/tasks/build-ci-image.yml - params: + file: ci-images-git-repo/ci/tasks/build-ci-image.yml + vars: ci-image-name: ci-image - task: build-ci-image-jdk11 privileged: true - file: git-repo/ci/tasks/build-ci-image.yml - params: + file: ci-images-git-repo/ci/tasks/build-ci-image.yml + vars: ci-image-name: ci-image-jdk11 - task: build-ci-image-jdk15 privileged: true - file: git-repo/ci/tasks/build-ci-image.yml - params: + file: ci-images-git-repo/ci/tasks/build-ci-image.yml + vars: ci-image-name: ci-image-jdk15 - in_parallel: - put: ci-image diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml index fbc5e8e97d..fd2ddb636b 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -12,6 +12,6 @@ caches: - path: ci-image-cache params: CONTEXT: ci-images-git-repo/ci/images - DOCKERFILE: ((ci-image-name))/Dockerfile + DOCKERFILE: ci-images-git-repo/ci/images/((ci-image-name))/Dockerfile run: - path: build \ No newline at end of file + path: build From 615d054decdb27c3398f501b33ec1e04e2e9044e Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 15:58:19 -0800 Subject: [PATCH 5/8] Attempt to fix oci-build-task config See gh-24197 --- ci/parameters.yml | 1 + ci/pipeline.yml | 7 ++++--- ci/tasks/build-ci-image.yml | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/parameters.yml b/ci/parameters.yml index ef9848b489..2e6a05c879 100644 --- a/ci/parameters.yml +++ b/ci/parameters.yml @@ -12,3 +12,4 @@ concourse-url: "https://ci.spring.io" bintray-subject: "spring" bintray-repo: "jars" task-timeout: 2h00m + \ No newline at end of file diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 1d7d3ff4f3..1d6ce8ed38 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -209,20 +209,21 @@ jobs: plan: - get: ci-images-git-repo trigger: true + - get: git-repo - in_parallel: - task: build-ci-image privileged: true - file: ci-images-git-repo/ci/tasks/build-ci-image.yml + file: git-repo/ci/tasks/build-ci-image.yml vars: ci-image-name: ci-image - task: build-ci-image-jdk11 privileged: true - file: ci-images-git-repo/ci/tasks/build-ci-image.yml + file: git-repo/ci/tasks/build-ci-image.yml vars: ci-image-name: ci-image-jdk11 - task: build-ci-image-jdk15 privileged: true - file: ci-images-git-repo/ci/tasks/build-ci-image.yml + file: git-repo/ci/tasks/build-ci-image.yml vars: ci-image-name: ci-image-jdk15 - in_parallel: diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml index fd2ddb636b..ea831fe160 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -13,5 +13,6 @@ caches: params: CONTEXT: ci-images-git-repo/ci/images DOCKERFILE: ci-images-git-repo/ci/images/((ci-image-name))/Dockerfile + REGISTRY_MIRRORS: ((dockerhub-registry-mirror)) run: path: build From 398c6b360399471c9922d169b5676ebd143c938a Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 16:20:37 -0800 Subject: [PATCH 6/8] Attempt to fix oci-build-task config See gh-24197 --- ci/tasks/build-ci-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml index ea831fe160..02b2f4c251 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -7,7 +7,8 @@ image_resource: inputs: - name: ci-images-git-repo outputs: -- name: ((ci-image-name)) +- name: image +output_mapping: {image: ((ci-image-name))} caches: - path: ci-image-cache params: From b953c41a5ff94723dbaf93a3e6f5e1fe9071eb64 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 16:31:37 -0800 Subject: [PATCH 7/8] Attempt to fix oci-build-task config See gh-24197 --- ci/pipeline.yml | 6 ++++++ ci/tasks/build-ci-image.yml | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 1d6ce8ed38..b2e3c2f03d 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -214,16 +214,22 @@ jobs: - task: build-ci-image privileged: true file: git-repo/ci/tasks/build-ci-image.yml + output_mapping: + image: ci-image-name vars: ci-image-name: ci-image - task: build-ci-image-jdk11 privileged: true file: git-repo/ci/tasks/build-ci-image.yml + output_mapping: + image: ci-image-jdk11 vars: ci-image-name: ci-image-jdk11 - task: build-ci-image-jdk15 privileged: true file: git-repo/ci/tasks/build-ci-image.yml + output_mapping: + image: ci-image-jdk15 vars: ci-image-name: ci-image-jdk15 - in_parallel: diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml index 02b2f4c251..b1bcff6eb4 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -8,7 +8,6 @@ inputs: - name: ci-images-git-repo outputs: - name: image -output_mapping: {image: ((ci-image-name))} caches: - path: ci-image-cache params: From babae118fc964801a52a3edc7aa1ed429a22420b Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 10 Dec 2020 16:40:44 -0800 Subject: [PATCH 8/8] Attempt to fix oci-build-task config See gh-24197 --- ci/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index b2e3c2f03d..087ea3e850 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -215,7 +215,7 @@ jobs: privileged: true file: git-repo/ci/tasks/build-ci-image.yml output_mapping: - image: ci-image-name + image: ci-image vars: ci-image-name: ci-image - task: build-ci-image-jdk11