about summary refs log tree commit diff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-09-01 22:38:35 +0200
committerMichael Biebl <biebl@debian.org>2024-09-01 22:38:35 +0200
commitf9bfd1158b8d08d6a5ed3bb7cc1ba7a6455e5201 (patch)
tree10267dcf5b842b7c638a79bd6851549cd849b81d /.gitlab-ci.yml
parent681dfc70ef98f6ed0c05bcb0fbff00e3fc0799ea (diff)
New upstream version 1.49.90 upstream/1.49.90
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml248
1 files changed, 169 insertions, 79 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5164b0c6..d46b80d0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,6 +39,8 @@ include:
   - project: 'freedesktop/ci-templates'
     ref: *template_sha
     file: '/templates/ubuntu.yml'
+  - project: 'freedesktop/ci-templates'
+    file: '/templates/ci-fairy.yml'
 
 stages:
   - prep
@@ -47,6 +49,7 @@ stages:
   - tier3
   - deploy
   - triage
+  - coverity
 
 variables:
   FDO_UPSTREAM_REPO: NetworkManager/NetworkManager
@@ -57,11 +60,11 @@ variables:
   #
   # This is done by running `ci-fairy generate-template` and possibly bumping
   # ".default_tag".
-  ALPINE_TAG:  'tag-d8c61f882b9d'
-  CENTOS_TAG:  'tag-8044890d9044'
-  DEBIAN_TAG:  'tag-538b968b666b'
-  FEDORA_TAG:  'tag-8044890d9044'
-  UBUNTU_TAG:  'tag-538b968b666b'
+  ALPINE_TAG:  'tag-961e70a41177'
+  CENTOS_TAG:  'tag-fe6805b2c8f4'
+  DEBIAN_TAG:  'tag-806721d9d354'
+  FEDORA_TAG:  'tag-fe6805b2c8f4'
+  UBUNTU_TAG:  'tag-806721d9d354'
 
   ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
   CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
@@ -106,26 +109,36 @@ tier1:fedora:40@prep:
     FDO_DISTRIBUTION_VERSION: '40'
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
     FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
-tier1:fedora:rawhide@prep:
+tier2:centos:stream9@prep:
   extends:
-    - .fdo.container-build@fedora
+    - .fdo.container-build@centos
   stage: prep
   variables:
     GIT_STRATEGY: none
-    FDO_DISTRIBUTION_VERSION: 'rawhide'
-    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
-    FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
+    FDO_DISTRIBUTION_VERSION: 'stream9'
+    FDO_DISTRIBUTION_TAG: $CENTOS_TAG
+    FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
-tier1:centos:stream9@prep:
+tier2:fedora:rawhide@prep:
   extends:
-    - .fdo.container-build@centos
+    - .fdo.container-build@fedora
   stage: prep
   variables:
     GIT_STRATEGY: none
-    FDO_DISTRIBUTION_VERSION: 'stream9'
-    FDO_DISTRIBUTION_TAG: $CENTOS_TAG
-    FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
+    FDO_DISTRIBUTION_VERSION: 'rawhide'
+    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier2:debian:sid@prep:
   extends:
@@ -136,7 +149,10 @@ tier2:debian:sid@prep:
     FDO_DISTRIBUTION_VERSION: 'sid'
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
     FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier2:debian:testing@prep:
   extends:
@@ -147,7 +163,10 @@ tier2:debian:testing@prep:
     FDO_DISTRIBUTION_VERSION: 'testing'
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
     FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier2:ubuntu:devel@prep:
   extends:
@@ -158,7 +177,10 @@ tier2:ubuntu:devel@prep:
     FDO_DISTRIBUTION_VERSION: 'devel'
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
     FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier2:alpine:edge@prep:
   extends:
@@ -169,7 +191,10 @@ tier2:alpine:edge@prep:
     FDO_DISTRIBUTION_VERSION: 'edge'
     FDO_DISTRIBUTION_TAG: $ALPINE_TAG
     FDO_DISTRIBUTION_EXEC: $ALPINE_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:fedora:39@prep:
   extends:
@@ -180,7 +205,10 @@ tier3:fedora:39@prep:
     FDO_DISTRIBUTION_VERSION: '39'
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
     FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:ubuntu:20.04@prep:
   extends:
@@ -191,7 +219,10 @@ tier3:ubuntu:20.04@prep:
     FDO_DISTRIBUTION_VERSION: '20.04'
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
     FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:ubuntu:22.04@prep:
   extends:
@@ -202,7 +233,10 @@ tier3:ubuntu:22.04@prep:
     FDO_DISTRIBUTION_VERSION: '22.04'
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
     FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:ubuntu:24.04@prep:
   extends:
@@ -213,7 +247,10 @@ tier3:ubuntu:24.04@prep:
     FDO_DISTRIBUTION_VERSION: '24.04'
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
     FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:ubuntu:rolling@prep:
   extends:
@@ -224,7 +261,10 @@ tier3:ubuntu:rolling@prep:
     FDO_DISTRIBUTION_VERSION: 'rolling'
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
     FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:debian:stable@prep:
   extends:
@@ -235,7 +275,10 @@ tier3:debian:stable@prep:
     FDO_DISTRIBUTION_VERSION: 'stable'
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
     FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:debian:oldstable@prep:
   extends:
@@ -246,7 +289,10 @@ tier3:debian:oldstable@prep:
     FDO_DISTRIBUTION_VERSION: 'oldstable'
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
     FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 tier3:alpine:latest@prep:
   extends:
@@ -257,7 +303,10 @@ tier3:alpine:latest@prep:
     FDO_DISTRIBUTION_VERSION: 'latest'
     FDO_DISTRIBUTION_TAG: $ALPINE_TAG
     FDO_DISTRIBUTION_EXEC: $ALPINE_EXEC
-  when: manual
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
+      when: manual
+      allow_failure: true
 
 #################################################################
 #                                                               #
@@ -284,13 +333,9 @@ t_fedora:40:
   parallel:
     matrix:
       - NM_TEST_SELECT_RUN:
-        - autotools+gcc+docs+valgrind
         - meson+gcc+docs+valgrind
-        - autotools+clang
         - meson+clang
-        - rpm+autotools
         - rpm+meson
-        - tarball+autotools
         - tarball+meson
         - tarball
         - subtree
@@ -299,56 +344,36 @@ t_fedora:40:
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
   needs:
     - "tier1:fedora:40@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
-t_fedora:rawhide:
+t_centos:stream9:
   extends:
     - .build@template
-    - .fdo.distribution-image@fedora
-    - .nm_artifacts
-  stage: tier1
-  parallel:
-    matrix:
-      - NM_TEST_SELECT_RUN:
-        - autotools+gcc+docs+valgrind
-        - meson+gcc+docs+valgrind
-        - autotools+clang
-        - meson+clang
-        - rpm+autotools
-        - rpm+meson
-        - tarball+autotools
-        - tarball+meson
-        - tarball
-        - subtree
+    - .fdo.distribution-image@centos
+    - .nm_artifacts_debug
+  stage: tier2
   variables:
-    FDO_DISTRIBUTION_VERSION: 'rawhide'
-    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FDO_DISTRIBUTION_VERSION: 'stream9'
+    FDO_DISTRIBUTION_TAG: $CENTOS_TAG
   needs:
-    - "tier1:fedora:rawhide@prep"
+    - "tier2:centos:stream9@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
-t_centos:stream9:
+t_fedora:rawhide:
   extends:
     - .build@template
-    - .fdo.distribution-image@centos
+    - .fdo.distribution-image@fedora
     - .nm_artifacts_debug
-  stage: tier1
-  parallel:
-    matrix:
-      - NM_TEST_SELECT_RUN:
-        - autotools+gcc+docs+valgrind
-        - meson+gcc+docs+valgrind
-        - autotools+clang
-        - meson+clang
-        - rpm+autotools
-        - rpm+meson
-        - tarball+autotools
-        - tarball+meson
-        - tarball
-        - subtree
+  stage: tier2
   variables:
-    FDO_DISTRIBUTION_VERSION: 'stream9'
-    FDO_DISTRIBUTION_TAG: $CENTOS_TAG
+    FDO_DISTRIBUTION_VERSION: 'rawhide'
+    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
   needs:
-    - "tier1:centos:stream9@prep"
+    - "tier2:fedora:rawhide@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_debian:sid:
   extends:
@@ -361,6 +386,8 @@ t_debian:sid:
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
   needs:
     - "tier2:debian:sid@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_debian:testing:
   extends:
@@ -373,6 +400,8 @@ t_debian:testing:
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
   needs:
     - "tier2:debian:testing@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_ubuntu:devel:
   extends:
@@ -385,6 +414,8 @@ t_ubuntu:devel:
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
   needs:
     - "tier2:ubuntu:devel@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_alpine:edge:
   extends:
@@ -397,6 +428,8 @@ t_alpine:edge:
     FDO_DISTRIBUTION_TAG: $ALPINE_TAG
   needs:
     - "tier2:alpine:edge@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_fedora:39:
   extends:
@@ -409,6 +442,8 @@ t_fedora:39:
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
   needs:
     - "tier3:fedora:39@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_ubuntu:20.04:
   extends:
@@ -421,6 +456,8 @@ t_ubuntu:20.04:
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
   needs:
     - "tier3:ubuntu:20.04@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_ubuntu:22.04:
   extends:
@@ -433,6 +470,8 @@ t_ubuntu:22.04:
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
   needs:
     - "tier3:ubuntu:22.04@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_ubuntu:24.04:
   extends:
@@ -445,6 +484,8 @@ t_ubuntu:24.04:
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
   needs:
     - "tier3:ubuntu:24.04@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_ubuntu:rolling:
   extends:
@@ -457,6 +498,8 @@ t_ubuntu:rolling:
     FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
   needs:
     - "tier3:ubuntu:rolling@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_debian:stable:
   extends:
@@ -469,6 +512,8 @@ t_debian:stable:
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
   needs:
     - "tier3:debian:stable@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_debian:oldstable:
   extends:
@@ -481,6 +526,8 @@ t_debian:oldstable:
     FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
   needs:
     - "tier3:debian:oldstable@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 t_alpine:latest:
   extends:
@@ -493,6 +540,8 @@ t_alpine:latest:
     FDO_DISTRIBUTION_TAG: $ALPINE_TAG
   needs:
     - "tier3:alpine:latest@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
 
 #################################################################
 #                                                               #
@@ -508,6 +557,8 @@ check-patch:
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
   needs:
     - "tier1:fedora:40@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
   stage: tier1
   script:
     - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh
@@ -521,6 +572,8 @@ check-tree:
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
   needs:
     - "tier1:fedora:40@prep"
+  rules:
+    - if: $CI_PIPELINE_SOURCE != 'schedule'
   stage: tier1
   script:
     - date '+%Y%m%d-%H%M%S'; clang-format --version
@@ -539,25 +592,62 @@ pages:
     expire_in: 20 days
     paths:
       - public
-  only:
-    - main
+  rules:
+    - if: $CI_PIPELINE_SOURCE == 'schedule'
+      when: never
+    - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
   dependencies:
-    - "t_fedora:40: [autotools+gcc+docs+valgrind]"
+    - "t_fedora:40: [meson+gcc+docs+valgrind]"
   needs:
-    - "t_fedora:40: [autotools+gcc+docs+valgrind]"
+    - "t_fedora:40: [meson+gcc+docs+valgrind]"
 
 triage:issues:
   stage: triage
-  image: ruby:2.7
+  image: ruby:3
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "daily"
+  tags:
+    - placeholder-job  # The job mostly waits on network requests, so use only one CPU: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/1358#note_2457416
   script:
     - gem install gitlab-triage
-    - gitlab-triage -d --token $API_TOKEN --source-id $SOURCE_ID
-  only:
-    - schedules
+    - gitlab-triage --debug --token $API_TOKEN --source-id $CI_PROJECT_ID
+
+coverity:
+  extends:
+    - .fdo.distribution-image@fedora
+  variables:
+    FDO_DISTRIBUTION_VERSION: '40'
+    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+  stage: coverity
+  needs: []
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
+  script:
+    - dnf install -y curl
+    - BUILD_TYPE=meson CC=gcc CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
+    - cd build
+    - ../.gitlab-ci/coverity.sh download
+    - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
+    - ../.gitlab-ci/coverity.sh upload
+
+# Clean the generated images periodically to get updated snapshots of the distribution images.
+# Create an scheduled pipeline to run it, passing an AUTHFILE environment variable of type
+# 'File' with an authentication token with API access level.
+clean-images:
+  extends:
+    - .fdo.ci-fairy
+  stage: prep
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
+  script:
+    - ci-fairy -v --authfile $AUTHFILE delete-image --project NetworkManager/NetworkManager --all
 
 # Have detached MR pipeline (https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html)
 # https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg
 workflow:
   rules:
     - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
-    - if: $CI_PIPELINE_SOURCE == 'push'
+    - if: $CI_PIPELINE_SOURCE == 'schedule'
+    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
+      when: never
+    - if: $CI_COMMIT_BRANCH