]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
ci: confine docker and macOS jobs to main repository
authorOto Šťáva <oto.stava@nic.cz>
Wed, 13 Jul 2022 06:21:48 +0000 (08:21 +0200)
committerOto Šťáva <oto.stava@nic.cz>
Wed, 13 Jul 2022 06:51:57 +0000 (08:51 +0200)
Some of our CI jobs use project-specific GitLab runners (e.g. requiring
the `dind` tag). The jobs then fail when someone forks the repository
and opens a merge request. This commit confines those jobs to the
`knot/knot-resolver` repository.

.gitlab-ci.yml

index 43313f0b79e188e15939908280a55d5a05b90d62..be79367a32777491d3c32b0de3cc8b9c689dac27 100644 (file)
@@ -27,7 +27,6 @@ stages:
   - deploy
   - pkgtest
 
-
  # https://docs.gitlab.com/ce/ci/jobs/job_control.html#select-different-runner-tags-for-each-parallel-matrix-job
 .multi_platform: &multi_platform
   parallel:
@@ -115,9 +114,9 @@ build-asan:
 
 build:macOS:
   <<: *nodep
-  except:
+  only:
     refs:
-      - branches@knot/security/knot-resolver
+      - branches@knot/knot-resolver
   stage: build
   when: delayed
   start_in: 3 minutes  # allow some time for mirroring, job creation
@@ -129,6 +128,9 @@ docker:
   stage: build
   image: docker:latest
   <<: *multi_platform
+  only:
+    refs:
+      - branches@knot/knot-resolver
   tags:
     - ${PLATFORM}
     - dind
@@ -356,6 +358,9 @@ pkgtest:
 pytests:
   # these are executed on LXC runners to increase stability
   image: $CI_REGISTRY/knot/knot-resolver/ci/lxc-debian-11:knot-$KNOT_VERSION
+  only:
+    refs:
+      - branches@knot/knot-resolver
   needs: []
   tags:
     - lxc