From: Štěpán Balážik Date: Fri, 30 Jan 2026 16:06:56 +0000 (+0100) Subject: Clone the bind9-qa repo to the project root in CI jobs X-Git-Tag: v9.20.20~5^2~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=929420ed243f18a173cc6b987cc85bed95a8b679;p=thirdparty%2Fbind9.git Clone the bind9-qa repo to the project root in CI jobs Cloning to a stable location allows clearer handling of paths when calling scripts from CI jobs. `unit:gcc:tarball` and `system:gcc:tarball` do `cd bind-*` in `before_script` which lead to the `bind9-qa` directory ending up in a different place in exactly these two jobs and that made reasoning about paths in `.system_test_common` and `.unit_test_common` tricky. (cherry picked from commit 482c1cc72f0ed4b326a1cbdf85082f36f1a95c82) --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d106f4db52..73191e6c82d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -397,7 +397,7 @@ stages: || (test -s config.log && cat config.log; exit 1) .git-clone-bind9-qa: &git_clone_bind9-qa - - git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git + - git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git "$CI_PROJECT_DIR"/bind9-qa # change directory to the workspace before including this .find_python: &find_python @@ -564,7 +564,7 @@ stages: ("$PYTEST" --junit-xml="$CI_PROJECT_DIR"/junit_pytest.xml -n "$TEST_PARALLEL_JOBS" | tee pytest.out.txt) || RET=1 - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_pytest.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" "$CI_PROJECT_DIR"/bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_pytest.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) - '( ! grep -F "grep: warning:" pytest.out.txt )' - test "$CLEAN_BUILD_ARTIFACTS_ON_SUCCESS" -eq 0 || ( cd ../../.. && make clean >/dev/null 2>&1 ) @@ -601,7 +601,7 @@ stages: "$PYTHON" bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit_system.xml - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_system.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" "$CI_PROJECT_DIR"/bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_system.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) after_script: - cat bin/tests/system/test-suite.log || true @@ -632,7 +632,7 @@ stages: - > "$PYTHON" "$CI_PROJECT_DIR"/bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit_unit.xml - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_unit.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" "$CI_PROJECT_DIR"/bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_unit.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) - test "$CLEAN_BUILD_ARTIFACTS_ON_SUCCESS" -eq 0 || make clean >/dev/null 2>&1 artifacts: @@ -664,7 +664,7 @@ stages: - make -j${BUILD_PARALLEL_JOBS:-1} V=1 - *setup_interfaces - *git_clone_bind9-qa - - cd bind9-qa/respdiff + - cd "$CI_PROJECT_DIR"/bind9-qa/respdiff needs: [] artifacts: paths: @@ -736,7 +736,8 @@ ci-orphaned-anchors: <<: *quick_checks_job script: - *git_clone_bind9-qa - - bind9-qa/ci-orphaned-anchors/check-orphaned-anchors-ci.py .gitlab-ci.yml + - > + "$CI_PROJECT_DIR"/bind9-qa/ci-orphaned-anchors/check-orphaned-anchors-ci.py .gitlab-ci.yml rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' changes: @@ -783,7 +784,7 @@ doctest: "$PYTEST" --noconftest --doctest-modules --junit-xml="$CI_PROJECT_DIR/junit_doctest.xml" || RET=1 - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR/junit_doctest.xml" --output "$CI_PROJECT_DIR/junit.xml" + "$PYTHON" "$CI_PROJECT_DIR"/bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR/junit_doctest.xml" --output "$CI_PROJECT_DIR/junit.xml" - (exit $RET) needs: - job: autoreconf @@ -852,7 +853,8 @@ generate-stress-test-configs: <<: *quick_checks_job script: - *git_clone_bind9-qa - - bind9-qa/stress/generate-stress-test-configs.py > stress-test-configs.yml + - > + "$CI_PROJECT_DIR"/bind9-qa/stress/generate-stress-test-configs.py > stress-test-configs.yml artifacts: paths: - stress-test-configs.yml @@ -1097,7 +1099,7 @@ cross-version-config-tests: "$PYTEST" --setup-only --junit-xml="$CI_PROJECT_DIR"/junit_pytest.xml -n "${TEST_PARALLEL_JOBS:-1}" || RET=1 - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_pytest.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" "$CI_PROJECT_DIR"/bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_pytest.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) needs: - job: autoreconf @@ -2052,7 +2054,8 @@ publish: variables: GIT_DEPTH: 1 script: - - bind9-qa/releng/printing_press_mr.py --document "${DOCUMENT}" --metadata bind9-qa/releng/metadata.json ${FORCE_CVE_IDS:+--force-cve-ids ${FORCE_CVE_IDS}} ${FORCE_SECURITY_RELEASES:+--force-security-releases ${FORCE_SECURITY_RELEASES}} + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/printing_press_mr.py --document "${DOCUMENT}" --metadata "$CI_PROJECT_DIR"/bind9-qa/releng/metadata.json ${FORCE_CVE_IDS:+--force-cve-ids ${FORCE_CVE_IDS}} ${FORCE_SECURITY_RELEASES:+--force-security-releases ${FORCE_SECURITY_RELEASES}} artifacts: paths: - printing-press/ @@ -2110,7 +2113,8 @@ merge-tag: variables: GIT_DEPTH: 100 script: - - bind9-qa/releng/merge_tag.py --tag "$CI_COMMIT_TAG" + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/merge_tag.py --tag "$CI_COMMIT_TAG" rules: - *rule_tag_open_source artifacts: @@ -2123,11 +2127,13 @@ update-stable-tag: variables: GIT_DEPTH: 1 script: - - bind9-qa/releng/update_stable_tag.py --tag "$CI_COMMIT_TAG" + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/update_stable_tag.py --tag "$CI_COMMIT_TAG" # Work around https://github.com/readthedocs/readthedocs.org/issues/10838 - sleep 300 - rm -rf ./bind9 # remove already cloned project - - bind9-qa/releng/update_stable_tag.py --tag "$CI_COMMIT_TAG" + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/update_stable_tag.py --tag "$CI_COMMIT_TAG" rules: - *rule_tag_open_source artifacts: @@ -2161,7 +2167,8 @@ customer-git:branch: - *git_clone_bind9-qa script: - git checkout -b "$BRANCH" # ensure refs/heads/$BRANCH exists; GitLab clones with detached HEAD - - bind9-qa/releng/push_to_customer_repository.py --branch "$BRANCH" --customer "$CUSTOMER" --force + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/push_to_customer_repository.py --branch "$BRANCH" --customer "$CUSTOMER" --force customer-git:tag: <<: *customer_git @@ -2174,7 +2181,8 @@ customer-git:tag: - *git_clone_bind9-qa - git clone --depth 1 "https://token:${ISC_CUSTOMERS_WRITE_TOKEN}@gitlab.isc.org/isc-customers/isc-customer-settings.git" script: - - bind9-qa/releng/push_to_customer_repository.py --tag "$CI_COMMIT_TAG" --entitlements isc-customer-settings/entitlements.yaml --force + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/push_to_customer_repository.py --tag "$CI_COMMIT_TAG" --entitlements isc-customer-settings/entitlements.yaml --force # Respdiff tests @@ -2246,7 +2254,7 @@ respdiff-third-party: - autoreconf -fi - *configure - make -j${BUILD_PARALLEL_JOBS:-1} V=1 - - cd bind9-qa/respdiff + - cd "$CI_PROJECT_DIR"/bind9-qa/respdiff - bash respdiff.sh -s named -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/version-under-test" "${CI_PROJECT_DIR}/bin/named/named" respdiff:recent-named: @@ -2398,14 +2406,16 @@ backports: script: # CI job token is not sufficient for push operations - git remote get-url origin | sed -e "s/gitlab-ci-token:$CI_JOB_TOKEN/oauth2:$BIND_TEAM_WRITE_TOKEN/" | xargs git remote set-url --push origin - - bind9-qa/releng/backport_mr.py $CI_PROJECT_ID "$MERGE_REQUEST_ID" + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/backport_mr.py $CI_PROJECT_ID "$MERGE_REQUEST_ID" merged-metadata: <<: *post_merge rules: - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_REF_NAME =~ /^bind-9.[0-9]+(-sub)?$/ || $CI_COMMIT_REF_NAME =~ /^v9.[0-9]+.[0-9]+-release$/ || $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)' script: - - bind9-qa/releng/after_merge.py "$CI_PROJECT_ID" "$MERGE_REQUEST_ID" + - > + "$CI_PROJECT_DIR"/bind9-qa/releng/after_merge.py "$CI_PROJECT_ID" "$MERGE_REQUEST_ID" auto-rebase-trigger: stage: postmerge