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
pull/24789/head
Phillip Webb 4 years ago
parent fa44a1d0c5
commit c14be4e84b

@ -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"

@ -4,7 +4,7 @@ anchors:
username: ((github-username))
password: ((github-password))
branch: ((branch))
docker-resource-source: &docker-resource-source
registry-image-resource-source: &registry-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

@ -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
Loading…
Cancel
Save