Merge "Update registry tests to better cover speculative image builds"
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/upstream/image as first
|
FROM quay.io/opendevorg/imagedoesnotexist as first
|
||||||
ARG ZUUL_SIBLINGS=""
|
ARG ZUUL_SIBLINGS=""
|
||||||
RUN echo "Zuul siblings: ${ZUUL_SIBLINGS}"
|
RUN echo "Zuul siblings: ${ZUUL_SIBLINGS}"
|
||||||
RUN cp /test-nonce /test-nonce-is-there
|
RUN cp /test-nonce /test-nonce-is-there
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: intermediate-registry-user-config
|
name: intermediate-registry-user-config
|
||||||
- name: "Build a container image for the previous build with docker roles"
|
- name: "Build a container image for the previous build with docker roles"
|
||||||
when: container_command == 'docker'
|
when: container_role == 'docker'
|
||||||
include_role:
|
include_role:
|
||||||
name: "build-docker-image"
|
name: "build-docker-image"
|
||||||
vars:
|
vars:
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
- context: test-playbooks/registry/docker
|
- context: test-playbooks/registry/docker
|
||||||
repository: "{{ previous_build_repository }}"
|
repository: "{{ previous_build_repository }}"
|
||||||
- name: "Build a container image for the previous build with container-image roles"
|
- name: "Build a container image for the previous build with container-image roles"
|
||||||
when: container_command != 'docker'
|
when: container_role != 'docker'
|
||||||
include_role:
|
include_role:
|
||||||
name: "build-container-image"
|
name: "build-container-image"
|
||||||
vars:
|
vars:
|
||||||
@@ -107,20 +107,28 @@
|
|||||||
zuul_artifacts: "{{ previous_build_zuul.artifacts }}"
|
zuul_artifacts: "{{ previous_build_zuul.artifacts }}"
|
||||||
|
|
||||||
# This simulates a build actually using the previous build.
|
# This simulates a build actually using the previous build.
|
||||||
|
# This only works for podman because docker cannot use speculative images
|
||||||
|
# hosted outside of docker.io during normal operations. That only works
|
||||||
|
# with buildkit and image building when using docker.
|
||||||
|
|
||||||
- hosts: builder
|
- hosts: builder
|
||||||
name: Test that the previous build is available
|
name: Test that the previous build is available
|
||||||
tasks:
|
tasks:
|
||||||
- name: Include intermediate registry vars
|
- name: Simple checks when using podman
|
||||||
include_vars: vars/intermediate-registry-auth.yaml
|
when: container_command != 'docker'
|
||||||
- name: Include previous build vars
|
block:
|
||||||
include_vars: vars/previous-build.yaml
|
- name: Include intermediate registry vars
|
||||||
- name: Pull the previous build from buildset registry to the builder host
|
include_vars: vars/intermediate-registry-auth.yaml
|
||||||
command: "{{ container_command }} pull {{ previous_build_repository }}:latest"
|
- name: Include previous build vars
|
||||||
- name: "Show local container images for debugging"
|
include_vars: vars/previous-build.yaml
|
||||||
command: "{{ container_command }} image ls"
|
- name: Pull the previous build from buildset registry to the builder host
|
||||||
- name: Verify previously built image is in buildset registry
|
command: "{{ container_command }} pull {{ previous_build_repository }}:latest"
|
||||||
command: "{{ container_command }} image inspect {{ previous_build_repository }}:latest"
|
- name: "Show local container images for debugging"
|
||||||
|
command: "{{ container_command }} image ls"
|
||||||
|
- name: Verify previously built image is in buildset registry
|
||||||
|
command: "{{ container_command }} image inspect {{ previous_build_repository }}:latest"
|
||||||
|
- name: Remove the image from local storage to force fetching from the buildset registry
|
||||||
|
command: "{{ container_command }} image prune --all --force"
|
||||||
|
|
||||||
# Back to straightforward use of the roles under test.
|
# Back to straightforward use of the roles under test.
|
||||||
|
|
||||||
@@ -137,7 +145,7 @@
|
|||||||
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
include_role:
|
include_role:
|
||||||
name: "build-{{ (container_command == 'docker') | ternary('docker', 'container') }}-image"
|
name: "build-{{ (container_role == 'docker') | ternary('docker', 'container') }}-image"
|
||||||
vars:
|
vars:
|
||||||
_normal_docker_images:
|
_normal_docker_images:
|
||||||
- context: test-playbooks/registry/docker-siblings
|
- context: test-playbooks/registry/docker-siblings
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
# buildset via provides/requires. This build should be copied from
|
# buildset via provides/requires. This build should be copied from
|
||||||
# the intermediate registry to the buildset registry.
|
# the intermediate registry to the buildset registry.
|
||||||
|
|
||||||
previous_build_repository: docker.io/upstream/image
|
previous_build_repository: quay.io/opendevorg/imagedoesnotexist
|
||||||
previous_build_uuid: 48a84fe22a744cb5b0310f396358d912
|
previous_build_uuid: 48a84fe22a744cb5b0310f396358d912
|
||||||
previous_build_zuul:
|
previous_build_zuul:
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@@ -241,6 +241,7 @@
|
|||||||
post-run: test-playbooks/registry/test-registry-post.yaml
|
post-run: test-playbooks/registry/test-registry-post.yaml
|
||||||
vars:
|
vars:
|
||||||
container_command: docker
|
container_command: docker
|
||||||
|
container_role: docker
|
||||||
multiarch: false
|
multiarch: false
|
||||||
nodeset: ®istry_nodeset
|
nodeset: ®istry_nodeset
|
||||||
nodes:
|
nodes:
|
||||||
@@ -250,6 +251,26 @@
|
|||||||
label: debian-bookworm
|
label: debian-bookworm
|
||||||
- name: builder
|
- name: builder
|
||||||
label: ubuntu-jammy
|
label: ubuntu-jammy
|
||||||
|
# Docker can't currently build with speculative states hosted anywhere
|
||||||
|
# but docker.io. This is nonvoting as we're using quay.io as the
|
||||||
|
# registry. A followup will fix this issue and make the test voting.
|
||||||
|
voting: false
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-registry-docker-container-role
|
||||||
|
parent: zuul-jobs-test-registry-docker
|
||||||
|
description: |
|
||||||
|
Test the intermediate registry roles.
|
||||||
|
|
||||||
|
Like its parent this tests the intermediate registry roles. The
|
||||||
|
difference here is we test with build-container-image to check
|
||||||
|
compatibility with that role using docker as the command.
|
||||||
|
vars:
|
||||||
|
container_role: container
|
||||||
|
# Docker can't currently build with speculative states hosted anywhere
|
||||||
|
# but docker.io. This is nonvoting as we're using quay.io as the
|
||||||
|
# registry. A followup will fix this issue and make the test voting.
|
||||||
|
voting: false
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zuul-jobs-test-registry-docker-multiarch
|
name: zuul-jobs-test-registry-docker-multiarch
|
||||||
@@ -272,9 +293,22 @@
|
|||||||
post-run: test-playbooks/registry/test-registry-post.yaml
|
post-run: test-playbooks/registry/test-registry-post.yaml
|
||||||
vars:
|
vars:
|
||||||
container_command: docker
|
container_command: docker
|
||||||
|
container_role: docker
|
||||||
multiarch: true
|
multiarch: true
|
||||||
nodeset: *registry_nodeset
|
nodeset: *registry_nodeset
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-registry-docker-container-role-multiarch
|
||||||
|
parent: zuul-jobs-test-registry-docker-multiarch
|
||||||
|
description: |
|
||||||
|
Test the intermediate registry roles with multiarch.
|
||||||
|
|
||||||
|
Like its parent this tests the intermediate registry roles. The
|
||||||
|
difference here is we test with build-container-image to check
|
||||||
|
compatibility with that role using docker as the command.
|
||||||
|
vars:
|
||||||
|
container_role: container
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zuul-jobs-test-registry-podman
|
name: zuul-jobs-test-registry-podman
|
||||||
description: |
|
description: |
|
||||||
@@ -297,6 +331,7 @@
|
|||||||
post-run: test-playbooks/registry/test-registry-post.yaml
|
post-run: test-playbooks/registry/test-registry-post.yaml
|
||||||
vars:
|
vars:
|
||||||
container_command: podman
|
container_command: podman
|
||||||
|
container_role: container
|
||||||
multiarch: false
|
multiarch: false
|
||||||
nodeset: *registry_nodeset
|
nodeset: *registry_nodeset
|
||||||
|
|
||||||
@@ -713,7 +748,7 @@
|
|||||||
|
|
||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs: &id001
|
jobs:
|
||||||
- zuul-jobs-test-ensure-docker-centos-9-stream
|
- zuul-jobs-test-ensure-docker-centos-9-stream
|
||||||
- zuul-jobs-test-ensure-docker-debian-bookworm
|
- zuul-jobs-test-ensure-docker-debian-bookworm
|
||||||
- zuul-jobs-test-ensure-docker-debian-bullseye
|
- zuul-jobs-test-ensure-docker-debian-bullseye
|
||||||
@@ -730,7 +765,9 @@
|
|||||||
- zuul-jobs-test-build-docker-image-release
|
- zuul-jobs-test-build-docker-image-release
|
||||||
- zuul-jobs-test-build-docker-image-release-multiarch
|
- zuul-jobs-test-build-docker-image-release-multiarch
|
||||||
- zuul-jobs-test-registry-docker
|
- zuul-jobs-test-registry-docker
|
||||||
|
- zuul-jobs-test-registry-docker-container-role
|
||||||
- zuul-jobs-test-registry-docker-multiarch
|
- zuul-jobs-test-registry-docker-multiarch
|
||||||
|
- zuul-jobs-test-registry-docker-container-role-multiarch
|
||||||
- zuul-jobs-test-registry-podman
|
- zuul-jobs-test-registry-podman
|
||||||
- zuul-jobs-test-registry-buildset-registry
|
- zuul-jobs-test-registry-buildset-registry
|
||||||
- zuul-jobs-test-registry-buildset-registry-k8s-microk8s
|
- zuul-jobs-test-registry-buildset-registry-k8s-microk8s
|
||||||
@@ -755,6 +792,46 @@
|
|||||||
- zuul-jobs-test-ensure-podman-debian-bullseye
|
- zuul-jobs-test-ensure-podman-debian-bullseye
|
||||||
- zuul-jobs-test-mirror-container-images
|
- zuul-jobs-test-mirror-container-images
|
||||||
gate:
|
gate:
|
||||||
jobs: *id001
|
jobs: &id001
|
||||||
|
- zuul-jobs-test-ensure-docker-centos-9-stream
|
||||||
|
- zuul-jobs-test-ensure-docker-debian-bookworm
|
||||||
|
- zuul-jobs-test-ensure-docker-debian-bullseye
|
||||||
|
- zuul-jobs-test-ensure-docker-ubuntu-focal
|
||||||
|
- zuul-jobs-test-ensure-docker-ubuntu-jammy
|
||||||
|
- zuul-jobs-test-ensure-docker-ubuntu-noble
|
||||||
|
- zuul-jobs-test-build-container-image-docker-release
|
||||||
|
- zuul-jobs-test-build-container-image-docker-release-multiarch
|
||||||
|
- zuul-jobs-test-build-container-image-docker-release-multiarch-multinode
|
||||||
|
- zuul-jobs-test-build-container-image-podman-release
|
||||||
|
- zuul-jobs-test-build-container-image-docker-promote
|
||||||
|
- zuul-jobs-test-build-container-image-docker-promote-multiarch
|
||||||
|
- zuul-jobs-test-build-container-image-podman-promote
|
||||||
|
- zuul-jobs-test-build-docker-image-release
|
||||||
|
- zuul-jobs-test-build-docker-image-release-multiarch
|
||||||
|
- zuul-jobs-test-registry-docker-multiarch
|
||||||
|
- zuul-jobs-test-registry-docker-container-role-multiarch
|
||||||
|
- zuul-jobs-test-registry-podman
|
||||||
|
- zuul-jobs-test-registry-buildset-registry
|
||||||
|
- zuul-jobs-test-registry-buildset-registry-k8s-microk8s
|
||||||
|
- zuul-jobs-test-registry-buildset-registry-k8s-crio
|
||||||
|
- zuul-jobs-test-ensure-kubernetes-crio-ubuntu-focal
|
||||||
|
- zuul-jobs-test-ensure-kubernetes-podman-ubuntu-noble
|
||||||
|
- zuul-jobs-test-ensure-kubernetes-microk8s-ubuntu-jammy
|
||||||
|
- zuul-jobs-test-ensure-kubernetes-microk8s-debian-bookworm
|
||||||
|
- zuul-jobs-test-ensure-podman-debian-bookworm
|
||||||
|
- zuul-jobs-test-ensure-podman-debian-bullseye
|
||||||
|
- zuul-jobs-test-ensure-podman-ubuntu-jammy
|
||||||
|
- zuul-jobs-test-ensure-podman-ubuntu-noble
|
||||||
|
- zuul-jobs-test-ensure-podman-socket-debian-bookworm
|
||||||
|
- zuul-jobs-test-ensure-podman-socket-debian-bullseye
|
||||||
|
- zuul-jobs-test-ensure-podman-socket-ubuntu-jammy
|
||||||
|
- zuul-jobs-test-ensure-podman-socket-ubuntu-noble
|
||||||
|
- zuul-jobs-test-ensure-skopeo-debian-bookworm
|
||||||
|
- zuul-jobs-test-ensure-skopeo-debian-bullseye
|
||||||
|
- zuul-jobs-test-ensure-skopeo-ubuntu-focal
|
||||||
|
- zuul-jobs-test-ensure-skopeo-ubuntu-jammy
|
||||||
|
- zuul-jobs-test-ensure-skopeo-ubuntu-noble
|
||||||
|
- zuul-jobs-test-ensure-podman-debian-bullseye
|
||||||
|
- zuul-jobs-test-mirror-container-images
|
||||||
periodic-weekly:
|
periodic-weekly:
|
||||||
jobs: *id001
|
jobs: *id001
|
||||||
|
Reference in New Issue
Block a user