Commit 8becba49 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

ci: add the ci for the FDO_BASE_IMAGE



As suggested by Benjamin, this merely runs a container-build job off
the base image without any "content". The order (for Arch) is thus:

arch:latest@container-build creates an image with curl+wget installed
and pushes that to the registry.

arch:latest@base-image starts with that base image but doesn't install
anything. The DISTRO_EXEC script runs curl and wget though - which we
expect to be present since we have our custom base image. If that
succeeds we don't need to do anything else, we expect the rest to work
since it's just the container-build job.

The only unfortunate hack is that we cannot use the global
FDO_DISTRIBUTION_TAG to reference the image. Gitlab doesn't do
double-expansion of variables so we need to hardcode the same value.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 271d179d
......@@ -78,6 +78,22 @@ alpine:latest@check:
- alpine:latest@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
alpine:latest@base-image:
extends: alpine:latest@container-build
stage: alpine_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/alpine/latest:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- alpine:latest@container-build
- sanity check
#
# /cache alpine check (in build stage)
......
......@@ -67,6 +67,22 @@ arch:rolling@check:
- arch:rolling@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
arch:rolling@base-image:
extends: arch:rolling@container-build
stage: arch_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/arch/rolling:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- arch:rolling@container-build
- sanity check
#
# /cache arch check (in build stage)
......
......@@ -68,6 +68,22 @@ centos:7@check:
- centos:7@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
centos:7@base-image:
extends: centos:7@container-build
stage: centos_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/centos/7:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- centos:7@container-build
- sanity check
#
# /cache centos check (in build stage)
......
......@@ -131,6 +131,22 @@ debian:stretch@check:
- debian:stretch@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
debian:stretch@base-image:
extends: debian:stretch@container-build
stage: debian_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/debian/stretch:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- debian:stretch@container-build
- sanity check
#
# /cache debian check (in build stage)
......
......@@ -131,6 +131,22 @@ fedora:31@check:
- fedora:31@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
fedora:31@base-image:
extends: fedora:31@container-build
stage: fedora_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/fedora/31:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- fedora:31@container-build
- sanity check
#
# /cache fedora check (in build stage)
......
......@@ -131,6 +131,22 @@ ubuntu:19.10@check:
- ubuntu:19.10@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
ubuntu:19.10@base-image:
extends: ubuntu:19.10@container-build
stage: ubuntu_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/ubuntu/19.10:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- ubuntu:19.10@container-build
- sanity check
#
# /cache ubuntu check (in build stage)
......
......@@ -141,6 +141,22 @@
- {{distribution}}:{{ versions[0] }}@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
{{distribution}}:{{ versions[0] }}@base-image:
extends: {{distribution}}:{{ versions[0]}}@container-build
stage: {{distribution}}_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
FDO_BASE_IMAGE: registry.freedesktop.org/$CI_PROJECT_PATH/{{distribution}}/{{versions[0]}}:fdo-ci-$CI_PIPELINE_ID
FDO_DISTRIBUTION_PACKAGES: ''
FDO_DISTRIBUTION_EXEC: 'test/test-wget-curl.sh'
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- {{distribution}}:{{ versions[0] }}@container-build
- sanity check
#
# /cache {{distribution}} check (in build stage)
......
#!/bin/bash
set -xe
wget --no-check-certificate https://gitlab.freedesktop.org
curl --insecure https://gitlab.freedesktop.org
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment