1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-12-01 08:23:47 +03:00

ci: re-generate containers/gitlab config from manifest

This uses the command "lcitool manifest ci/manifest.yml" to re-generate
all existing dockerfiles and gitlab CI config.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2021-09-01 18:52:06 +01:00
parent cf3c20bb4f
commit d5d4676631
13 changed files with 271 additions and 210 deletions

View File

@@ -2,28 +2,8 @@
stages:
- containers
- builds
- docs
- sanity_checks
.container_job:
image: docker:stable
stage: containers
needs: []
services:
- name: registry.gitlab.com/libvirt/libvirt-ci/docker-dind:master
alias: docker
before_script:
- export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest"
- export COMMON_TAG="$CI_REGISTRY/libvirt/libvirt-python/ci-$NAME:latest"
- docker info
- docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
script:
- docker pull "$TAG" || docker pull "$COMMON_TAG" || true
- docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/containers/ci-$NAME.Dockerfile" ci/containers
- docker push "$TAG"
after_script:
- docker logout
.git_build_vars: &git_build_vars |
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
export SCRATCH_DIR="$PWD/scratch"
@@ -34,9 +14,8 @@ stages:
export PKG_CONFIG_PATH="$LIBDIR/pkgconfig"
export CFLAGS="-Werror"
.git_build_job:
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
stage: builds
.native_git_build_job:
extends: .gitlab_native_build_job
before_script:
- *git_build_vars
script:
@@ -54,9 +33,8 @@ stages:
- $PYTHON setup.py sdist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta dist/libvirt-python*tar.gz ; fi
.dist_build_job:
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
stage: builds
.native_build_job:
extends: .gitlab_native_build_job
before_script:
- export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
- export CFLAGS="-Werror"
@@ -67,173 +45,13 @@ stages:
- $PYTHON setup.py sdist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta dist/libvirt-python*tar.gz ; fi
# Check that all commits are signed-off for the DCO.
# Skip on "libvirt" namespace, since we only need to run
# this test on developer's personal forks from which
# merge requests are submitted
check-dco:
stage: sanity_checks
needs: []
image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
script:
- /check-dco
except:
variables:
- $CI_PROJECT_NAMESPACE == 'libvirt'
centos-8-container:
extends: .container_job
variables:
NAME: centos-8
centos-stream-8-container:
extends: .container_job
variables:
NAME: centos-stream-8
debian-10-container:
extends: .container_job
variables:
NAME: debian-10
debian-sid-container:
extends: .container_job
variables:
NAME: debian-sid
fedora-33-container:
extends: .container_job
variables:
NAME: fedora-33
fedora-34-container:
extends: .container_job
variables:
NAME: fedora-34
fedora-rawhide-container:
extends: .container_job
variables:
NAME: fedora-rawhide
opensuse-leap-152-container:
extends: .container_job
variables:
NAME: opensuse-leap-152
opensuse-tumbleweed-container:
extends: .container_job
variables:
NAME: opensuse-tumbleweed
ubuntu-1804-container:
extends: .container_job
variables:
NAME: ubuntu-1804
ubuntu-2004-container:
extends: .container_job
variables:
NAME: ubuntu-2004
centos-8-git-build:
extends: .git_build_job
needs:
- centos-8-container
variables:
NAME: centos-8
artifacts:
expire_in: 2 days
paths:
- scratch
- build
centos-8-dist-build:
extends: .dist_build_job
needs:
- centos-8-container
variables:
NAME: centos-8
centos-stream-8-dist-build:
extends: .dist_build_job
needs:
- centos-stream-8-container
variables:
NAME: centos-stream-8
debian-10-dist-build:
extends: .dist_build_job
needs:
- debian-10-container
variables:
NAME: debian-10
debian-sid-dist-build:
extends: .dist_build_job
needs:
- debian-sid-container
variables:
NAME: debian-sid
fedora-33-dist-build:
extends: .dist_build_job
needs:
- fedora-33-container
variables:
NAME: fedora-33
fedora-34-dist-build:
extends: .dist_build_job
needs:
- fedora-34-container
variables:
NAME: fedora-34
fedora-rawhide-dist-build:
extends: .dist_build_job
needs:
- fedora-rawhide-container
variables:
NAME: fedora-rawhide
opensuse-leap-152-dist-build:
extends: .dist_build_job
needs:
- opensuse-leap-152-container
variables:
NAME: opensuse-leap-152
RPM: skip
opensuse-tumbleweed-dist-build:
extends: .dist_build_job
needs:
- opensuse-tumbleweed-container
variables:
NAME: opensuse-tumbleweed
RPM: skip
ubuntu-1804-dist-build:
extends: .dist_build_job
needs:
- ubuntu-1804-container
variables:
NAME: ubuntu-1804
ubuntu-2004-dist-build:
extends: .dist_build_job
needs:
- ubuntu-2004-container
variables:
NAME: ubuntu-2004
include: '/ci/gitlab.yml'
api-coverage:
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
stage: sanity_checks
needs:
- job: centos-8-git-build
- job: x86_64-centos-8-git
artifacts: true
before_script:
- *git_build_vars

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile centos-8 libvirt+minimal,libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/centos:8

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile centos-stream-8 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM quay.io/centos/centos:stream8

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile debian-10 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:10-slim

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile debian-sid libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:sid-slim

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile fedora-33 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:33

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile fedora-34 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:34

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile fedora-rawhide libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:rawhide

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile opensuse-leap-152 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.opensuse.org/opensuse/leap:15.2

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile opensuse-tumbleweed libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.opensuse.org/opensuse/tumbleweed:latest

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile ubuntu-1804 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/ubuntu:18.04

View File

@@ -1,8 +1,8 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool dockerfile ubuntu-2004 libvirt+dist,libvirt-python
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci/-/commit/1c5d87ecd2283614a8b0c31cead0b6d7883afd28
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/ubuntu:20.04

243
ci/gitlab.yml Normal file
View File

@@ -0,0 +1,243 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
.container_job:
image: docker:stable
stage: containers
needs: []
services:
- name: registry.gitlab.com/libvirt/libvirt-ci/docker-dind:master
alias: docker
before_script:
- export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest"
- export COMMON_TAG="$CI_REGISTRY/libvirt/libvirt-python/ci-$NAME:latest"
- docker info
- docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
script:
- docker pull "$TAG" || docker pull "$COMMON_TAG" || true
- docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/containers/$NAME.Dockerfile" ci/containers
- docker push "$TAG"
after_script:
- docker logout
.gitlab_native_build_job:
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
stage: builds
.gitlab_cross_build_job:
image: $CI_REGISTRY_IMAGE/ci-$NAME-cross-$CROSS:latest
stage: builds
check-dco:
stage: sanity_checks
needs: []
image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
script:
- /check-dco libvirt
except:
variables:
- $CI_PROJECT_NAMESPACE == 'libvirt'
variables:
GIT_DEPTH: 1000
# Native container jobs
x86_64-centos-8-container:
extends: .container_job
allow_failure: false
variables:
NAME: centos-8
x86_64-centos-stream-8-container:
extends: .container_job
allow_failure: false
variables:
NAME: centos-stream-8
x86_64-debian-10-container:
extends: .container_job
allow_failure: false
variables:
NAME: debian-10
x86_64-debian-sid-container:
extends: .container_job
allow_failure: false
variables:
NAME: debian-sid
x86_64-fedora-33-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-33
x86_64-fedora-34-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-34
x86_64-fedora-rawhide-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-rawhide
x86_64-opensuse-leap-152-container:
extends: .container_job
allow_failure: false
variables:
NAME: opensuse-leap-152
x86_64-opensuse-tumbleweed-container:
extends: .container_job
allow_failure: false
variables:
NAME: opensuse-tumbleweed
x86_64-ubuntu-1804-container:
extends: .container_job
allow_failure: false
variables:
NAME: ubuntu-1804
x86_64-ubuntu-2004-container:
extends: .container_job
allow_failure: false
variables:
NAME: ubuntu-2004
# Native build jobs
x86_64-centos-8:
extends: .native_build_job
needs:
- x86_64-centos-8-container
allow_failure: false
variables:
NAME: centos-8
x86_64-centos-8-git:
extends: .native_git_build_job
needs:
- x86_64-centos-8-container
allow_failure: false
variables:
NAME: centos-8
artifacts:
expire_in: 2 days
paths:
- scratch
- build
x86_64-centos-stream-8:
extends: .native_build_job
needs:
- x86_64-centos-stream-8-container
allow_failure: false
variables:
NAME: centos-stream-8
x86_64-debian-10:
extends: .native_build_job
needs:
- x86_64-debian-10-container
allow_failure: false
variables:
NAME: debian-10
x86_64-debian-sid:
extends: .native_build_job
needs:
- x86_64-debian-sid-container
allow_failure: false
variables:
NAME: debian-sid
x86_64-fedora-33:
extends: .native_build_job
needs:
- x86_64-fedora-33-container
allow_failure: false
variables:
NAME: fedora-33
x86_64-fedora-34:
extends: .native_build_job
needs:
- x86_64-fedora-34-container
allow_failure: false
variables:
NAME: fedora-34
x86_64-fedora-rawhide:
extends: .native_build_job
needs:
- x86_64-fedora-rawhide-container
allow_failure: false
variables:
NAME: fedora-rawhide
x86_64-opensuse-leap-152:
extends: .native_build_job
needs:
- x86_64-opensuse-leap-152-container
allow_failure: false
variables:
NAME: opensuse-leap-152
RPM: skip
x86_64-opensuse-tumbleweed:
extends: .native_build_job
needs:
- x86_64-opensuse-tumbleweed-container
allow_failure: false
variables:
NAME: opensuse-tumbleweed
RPM: skip
x86_64-ubuntu-1804:
extends: .native_build_job
needs:
- x86_64-ubuntu-1804-container
allow_failure: false
variables:
NAME: ubuntu-1804
x86_64-ubuntu-2004:
extends: .native_build_job
needs:
- x86_64-ubuntu-2004-container
allow_failure: false
variables:
NAME: ubuntu-2004