Skip to content

Commit

Permalink
.gitlab-ci.yml: include manager jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
alesmrazek committed Nov 21, 2024
1 parent 0f9d005 commit 7c93446
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 33 deletions.
41 changes: 24 additions & 17 deletions .gitlab-ci.manager.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
stages:
- check

variables:
PYTHON_INTERPRETER: python3.12

default:
.poetry: &poetry
image: $IMAGE_PREFIX/manager:$IMAGE_TAG
needs: []
except:
refs:
- master@knot/knot-resolver
- master@knot/security/knot-resolver
- tags
variables:
- $SKIP_CI == "1"
before_script:
- poetry --version
- poetry env use $PYTHON_INTERPRETER
Expand All @@ -15,27 +17,32 @@ default:
- linux
- amd64

examples:
stage: check
poe:examples:
<<: *poetry
stage: sanity
script:
- poe examples

check:
stage: check
poe:check:
<<: *poetry
stage: sanity
script:
- poe check

format:
stage: check
poe:format:
<<: *poetry
stage: sanity
script:
- poe format

lint:
stage: check
poe:lint:
<<: *poetry
stage: sanity
script:
- poe lint

.python_interpreters: &python_interpreters
<<: *poetry
parallel:
matrix:
- PYTHON_INTERPRETER:
Expand All @@ -46,8 +53,8 @@ lint:
- python3.12
- python3.13

test:
stage: check
poe:pytest:
stage: test
<<: *python_interpreters
script:
- poe test
Expand Down
35 changes: 19 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ variables:
MESON_TEST: meson test -C build_ci* -t 4 --print-errorlogs
PREFIX: $CI_PROJECT_DIR/.local
EMAIL: 'ci@nic'
PYTHON_INTERPRETER: python3.12

# IMAGE_TAG is a Git branch/tag name from https://gitlab.nic.cz/knot/knot-resolver-ci
# In general, keep it pointing to a tag - use a branch only for development.
Expand Down Expand Up @@ -471,19 +472,22 @@ test:valgrind:
--wrap="valgrind --leak-check=full --trace-children=yes --quiet --suppressions=/lj.supp"
--suite snowflake
manager:
stage: test
needs: []
trigger:
include: .gitlab-ci.manager.yml
strategy: depend
except:
refs:
- master@knot/knot-resolver
- master@knot/security/knot-resolver
- tags
variables:
- $SKIP_CI == "1"
include: .gitlab-ci.manager.yml

# manager:
# stage: test
# needs: []
# trigger:
# include: .gitlab-ci.manager.yml
# strategy: depend
# except:
# refs:
# - master@knot/knot-resolver
# - master@knot/security/knot-resolver
# - tags
# variables:
# - $SKIP_CI == "1"

pytests:
<<: *test_flaky
Expand Down Expand Up @@ -811,8 +815,7 @@ pkg:arch:
# docs: {{{

docs:build:
stage: deploy
needs: []
stage: build
script:
- git submodule update --init --recursive
- pip3 install -U -r doc/requirements.txt
Expand Down Expand Up @@ -866,7 +869,7 @@ docs:release:
url: https://www.knot-resolver.cz/documentation/artifacts/$CI_JOB_ID/index.html

# This job deploys the current docs as <https://knot.pages.nic.cz/knot-resolver>
pages:
docs:pages:
stage: deploy
needs:
- docs:build
Expand Down

0 comments on commit 7c93446

Please sign in to comment.