From 6e0d4d53d51e8aa9d537e404a886eab131e311cc Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Wed, 4 Jan 2023 15:06:09 +0100 Subject: ci: Refresh and add Fedora 37 target Signed-off-by: Erik Skultety --- ci/buildenv/fedora-35.sh | 32 ---------------------- ci/buildenv/fedora-37.sh | 32 ++++++++++++++++++++++ ci/containers/fedora-35.Dockerfile | 44 ------------------------------ ci/containers/fedora-37.Dockerfile | 44 ++++++++++++++++++++++++++++++ ci/gitlab.yml | 1 + ci/gitlab/build-templates.yml | 18 ++++++------ ci/gitlab/builds.yml | 56 ++++++++------------------------------ ci/gitlab/container-templates.yml | 1 + ci/gitlab/containers.yml | 8 +++--- ci/gitlab/sanity-checks.yml | 1 + ci/manifest.yml | 4 +-- 11 files changed, 107 insertions(+), 134 deletions(-) delete mode 100644 ci/buildenv/fedora-35.sh create mode 100644 ci/buildenv/fedora-37.sh delete mode 100644 ci/containers/fedora-35.Dockerfile create mode 100644 ci/containers/fedora-37.Dockerfile diff --git a/ci/buildenv/fedora-35.sh b/ci/buildenv/fedora-35.sh deleted file mode 100644 index a7d0e1b..0000000 --- a/ci/buildenv/fedora-35.sh +++ /dev/null @@ -1,32 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool manifest ci/manifest.yml -# -# https://gitlab.com/libvirt/libvirt-ci - -function install_buildenv() { - dnf update -y - dnf install -y \ - ca-certificates \ - ccache \ - gcc \ - git \ - glibc-langpack-en \ - libvirt-devel \ - pkgconfig \ - python3 \ - python3-devel \ - python3-lxml \ - python3-pip \ - python3-pytest \ - python3-setuptools \ - rpm-build - rpm -qa | sort > /packages.txt - mkdir -p /usr/libexec/ccache-wrappers - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -} - -export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" -export LANG="en_US.UTF-8" -export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/fedora-37.sh b/ci/buildenv/fedora-37.sh new file mode 100644 index 0000000..a7d0e1b --- /dev/null +++ b/ci/buildenv/fedora-37.sh @@ -0,0 +1,32 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf update -y + dnf install -y \ + ca-certificates \ + ccache \ + gcc \ + git \ + glibc-langpack-en \ + libvirt-devel \ + pkgconfig \ + python3 \ + python3-devel \ + python3-lxml \ + python3-pip \ + python3-pytest \ + python3-setuptools \ + rpm-build + rpm -qa | sort > /packages.txt + mkdir -p /usr/libexec/ccache-wrappers + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export PYTHON="/usr/bin/python3" diff --git a/ci/containers/fedora-35.Dockerfile b/ci/containers/fedora-35.Dockerfile deleted file mode 100644 index d52ee48..0000000 --- a/ci/containers/fedora-35.Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool manifest ci/manifest.yml -# -# https://gitlab.com/libvirt/libvirt-ci - -FROM registry.fedoraproject.org/fedora:35 - -RUN dnf install -y nosync && \ - echo -e '#!/bin/sh\n\ -if test -d /usr/lib64\n\ -then\n\ - export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\ -else\n\ - export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\ -fi\n\ -exec "$@"' > /usr/bin/nosync && \ - chmod +x /usr/bin/nosync && \ - nosync dnf update -y && \ - nosync dnf install -y \ - ca-certificates \ - ccache \ - gcc \ - git \ - glibc-langpack-en \ - libvirt-devel \ - pkgconfig \ - python3 \ - python3-devel \ - python3-lxml \ - python3-pip \ - python3-pytest \ - python3-setuptools \ - rpm-build && \ - nosync dnf autoremove -y && \ - nosync dnf clean all -y && \ - rpm -qa | sort > /packages.txt && \ - mkdir -p /usr/libexec/ccache-wrappers && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc - -ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" -ENV LANG "en_US.UTF-8" -ENV PYTHON "/usr/bin/python3" diff --git a/ci/containers/fedora-37.Dockerfile b/ci/containers/fedora-37.Dockerfile new file mode 100644 index 0000000..fa91002 --- /dev/null +++ b/ci/containers/fedora-37.Dockerfile @@ -0,0 +1,44 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +FROM registry.fedoraproject.org/fedora:37 + +RUN dnf install -y nosync && \ + echo -e '#!/bin/sh\n\ +if test -d /usr/lib64\n\ +then\n\ + export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\ +else\n\ + export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\ +fi\n\ +exec "$@"' > /usr/bin/nosync && \ + chmod +x /usr/bin/nosync && \ + nosync dnf update -y && \ + nosync dnf install -y \ + ca-certificates \ + ccache \ + gcc \ + git \ + glibc-langpack-en \ + libvirt-devel \ + pkgconfig \ + python3 \ + python3-devel \ + python3-lxml \ + python3-pip \ + python3-pytest \ + python3-setuptools \ + rpm-build && \ + nosync dnf autoremove -y && \ + nosync dnf clean all -y && \ + rpm -qa | sort > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" +ENV LANG "en_US.UTF-8" +ENV PYTHON "/usr/bin/python3" diff --git a/ci/gitlab.yml b/ci/gitlab.yml index bdc5e0a..3866dcf 100644 --- a/ci/gitlab.yml +++ b/ci/gitlab.yml @@ -67,6 +67,7 @@ workflow: debug: image: docker.io/library/alpine:3 stage: sanity_checks + interruptible: true needs: [] script: - printenv | sort diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml index 1a30baa..4ce0706 100644 --- a/ci/gitlab/build-templates.yml +++ b/ci/gitlab/build-templates.yml @@ -9,14 +9,14 @@ # We use pre-built containers for any pipelines that are: # # - Validating code committed on default upstream branch -# - Validating patches targetting default upstream branch +# - Validating patches targeting default upstream branch # which do not have CI changes # # We use a local build env for any pipelines that are: # # - Validating code committed to a non-default upstream branch -# - Validating patches targetting a non-default upstream branch -# - Validating patches targetting default upstream branch which +# - Validating patches targeting a non-default upstream branch +# - Validating patches targeting default upstream branch which # include CI changes # - Validating code committed to a fork branch # @@ -26,6 +26,7 @@ .gitlab_native_build_job_prebuilt_env: image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libvirt-python/ci-$NAME:latest stage: builds + interruptible: true before_script: - cat /packages.txt rules: @@ -36,14 +37,14 @@ - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' when: on_success - # upstream: other web/api/scheduled pipelines targetting the default branch + # upstream: other web/api/scheduled pipelines targeting the default branch - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' when: manual allow_failure: true - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' when: on_success - # upstream+forks: merge requests targetting the default branch, without CI changes + # upstream+forks: merge requests targeting the default branch, without CI changes - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' changes: - ci/gitlab/container-templates.yml @@ -61,6 +62,7 @@ .gitlab_native_build_job_local_env: image: $IMAGE stage: builds + interruptible: true before_script: - source ci/buildenv/$NAME.sh - install_buildenv @@ -79,7 +81,7 @@ - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' when: on_success - # upstream: other web/api/scheduled pipelines targetting non-default branches + # upstream: other web/api/scheduled pipelines targeting non-default branches - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' when: manual allow_failure: true @@ -93,7 +95,7 @@ - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/' when: on_success - # upstream+forks: merge requests targetting the default branch, with CI changes + # upstream+forks: merge requests targeting the default branch, with CI changes - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' changes: - ci/gitlab/container-templates.yml @@ -106,7 +108,7 @@ - ci/containers/$NAME.Dockerfile when: on_success - # upstream+forks: merge requests targetting non-default branches + # upstream+forks: merge requests targeting non-default branches - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' when: manual allow_failure: true diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 669b082..524d213 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -15,10 +15,6 @@ x86_64-centos-stream-8-prebuilt-env: allow_failure: false variables: NAME: centos-stream-8 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms x86_64-centos-stream-8-local-env: extends: .native_build_job_local_env @@ -27,10 +23,6 @@ x86_64-centos-stream-8-local-env: variables: IMAGE: quay.io/centos/centos:stream8 NAME: centos-stream-8 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms x86_64-centos-stream-8-git-prebuilt-env: @@ -69,10 +61,6 @@ x86_64-centos-stream-9-prebuilt-env: allow_failure: false variables: NAME: centos-stream-9 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms x86_64-centos-stream-9-local-env: extends: .native_build_job_local_env @@ -81,10 +69,6 @@ x86_64-centos-stream-9-local-env: variables: IMAGE: quay.io/centos/centos:stream9 NAME: centos-stream-9 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms x86_64-debian-10-prebuilt-env: @@ -123,56 +107,40 @@ x86_64-debian-sid-local-env: NAME: debian-sid -x86_64-fedora-35-prebuilt-env: +x86_64-fedora-36-prebuilt-env: extends: .native_build_job_prebuilt_env needs: - - job: x86_64-fedora-35-container + - job: x86_64-fedora-36-container optional: true allow_failure: false variables: - NAME: fedora-35 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms + NAME: fedora-36 -x86_64-fedora-35-local-env: +x86_64-fedora-36-local-env: extends: .native_build_job_local_env needs: [] allow_failure: false variables: - IMAGE: registry.fedoraproject.org/fedora:35 - NAME: fedora-35 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms + IMAGE: registry.fedoraproject.org/fedora:36 + NAME: fedora-36 -x86_64-fedora-36-prebuilt-env: +x86_64-fedora-37-prebuilt-env: extends: .native_build_job_prebuilt_env needs: - - job: x86_64-fedora-36-container + - job: x86_64-fedora-37-container optional: true allow_failure: false variables: - NAME: fedora-36 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms + NAME: fedora-37 -x86_64-fedora-36-local-env: +x86_64-fedora-37-local-env: extends: .native_build_job_local_env needs: [] allow_failure: false variables: - IMAGE: registry.fedoraproject.org/fedora:36 - NAME: fedora-36 - artifacts: - expire_in: 1 hour - paths: - - libvirt-python-rpms + IMAGE: registry.fedoraproject.org/fedora:37 + NAME: fedora-37 x86_64-fedora-rawhide-prebuilt-env: diff --git a/ci/gitlab/container-templates.yml b/ci/gitlab/container-templates.yml index a577028..edb4aba 100644 --- a/ci/gitlab/container-templates.yml +++ b/ci/gitlab/container-templates.yml @@ -16,6 +16,7 @@ .container_job: image: docker:stable stage: containers + interruptible: false needs: [] services: - docker:dind diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index 2ebe5dd..1d0ed09 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -35,18 +35,18 @@ x86_64-debian-sid-container: NAME: debian-sid -x86_64-fedora-35-container: +x86_64-fedora-36-container: extends: .container_job allow_failure: false variables: - NAME: fedora-35 + NAME: fedora-36 -x86_64-fedora-36-container: +x86_64-fedora-37-container: extends: .container_job allow_failure: false variables: - NAME: fedora-36 + NAME: fedora-37 x86_64-fedora-rawhide-container: diff --git a/ci/gitlab/sanity-checks.yml b/ci/gitlab/sanity-checks.yml index f843c7f..cdcfb9b 100644 --- a/ci/gitlab/sanity-checks.yml +++ b/ci/gitlab/sanity-checks.yml @@ -9,6 +9,7 @@ check-dco: stage: sanity_checks needs: [] image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master + interruptible: true script: - /check-dco "$RUN_UPSTREAM_NAMESPACE" rules: diff --git a/ci/manifest.yml b/ci/manifest.yml index 7532126..c003f23 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -31,10 +31,10 @@ targets: debian-sid: x86_64 - fedora-35: x86_64 - fedora-36: x86_64 + fedora-37: x86_64 + fedora-rawhide: x86_64 opensuse-leap-153: -- cgit v1.2.1