From 750877a95988e7d6b8196886d85674373e82537b Mon Sep 17 00:00:00 2001 From: Walter Lozano <walter.lozano@collabora.com> Date: Wed, 21 Aug 2024 13:19:29 -0300 Subject: [PATCH] Avoid using python-gitlab.cfg In order to simply configuration and to avoid duplication drop the use of python-gitlab.cfg by specifying settings from command line. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> --- .gitlab-ci/branching.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci/branching.yml b/.gitlab-ci/branching.yml index 52a610ff..78e815aa 100644 --- a/.gitlab-ci/branching.yml +++ b/.gitlab-ci/branching.yml @@ -5,6 +5,7 @@ branch-protection-relax: extends: .custom_globals_default variables: RULES: gitlab-scripts/rulez-relax.yaml + ARGS: --gitlab-server-url ${CI_SERVER_URL} --gitlab-api-token ${GITLAB_TOKEN} stage: branch-protection-relax needs: - explain-done @@ -14,18 +15,17 @@ branch-protection-relax: - apt install -y --no-install-recommends gitlab-rulez/bookworm-backports # required to avoid python deprecation warnings script: - - export PYTHON_GITLAB_CFG=${PYTHON_GITLAB_CFG:-$PYTHON_GITLAB} - test "$NOACT" -eq 1 && ACTION=diff || ACTION=apply # ignore gitlab-rulez telling us "I found some diffs compare to the desired state" # since it is indeed something expected by design when running with NOACT=1 - - gitlab-rulez "$ACTION" --filter 'pkg/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'infrastructure/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'tests/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'apertis/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'appfw/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'docs/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'hmi/*' $RULES || test "$?" -eq 10 - - gitlab-rulez "$ACTION" --filter 'sample-applications/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'pkg/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'infrastructure/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'tests/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'apertis/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'appfw/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'docs/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'hmi/*' $RULES || test "$?" -eq 10 + - gitlab-rulez $ARGS "$ACTION" --filter 'sample-applications/*' $RULES || test "$?" -eq 10 branch-update-image-recipes: extends: .custom_globals_default @@ -100,7 +100,6 @@ branch-mass-create-branches: curl ca-certificates git - - cat ${PYTHON_GITLAB} > /root/.python-gitlab.cfg script: - cd release-scripts - test "$NOACT" -eq 1 && DRY_RUN=--dry-run || DRY_RUN= @@ -115,6 +114,8 @@ branch-mass-create-branches: --filter 'hmi/*' --filter 'infrastructure/*' --filter 'pkg/*' + --gitlab-server-url ${CI_SERVER_URL} + --gitlab-api-token ${GITLAB_TOKEN} $DRY_RUN branch-update-tests-projects: -- GitLab