From a91253784f4a66362d05a9f717454ffe34b8867d Mon Sep 17 00:00:00 2001 From: Andrii Sosiuk <andrii.sosiuk@seco.com> Date: Wed, 12 Mar 2025 09:27:00 +0100 Subject: [PATCH] YT-381: Use gitbot token for custom projects Build process uses GITLAB_PRIVATE_TOKEN for multiple upstream repositories, including private SECO repos. However, the new token rotation mechanism does not support variables with multiple tokens, making this approach inconvenient. This changes: - Use GITBOT_TOKEN for SECO repositories. - Keep GITLAB_PRIVATE_TOKEN for other upstream repos. --- build-pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-pipeline.yml b/build-pipeline.yml index ac6d0184..2fa5e9d7 100644 --- a/build-pipeline.yml +++ b/build-pipeline.yml @@ -47,8 +47,14 @@ workflow: - echo "$SSH_CONFIG" > ~/.ssh/config .setup_git_credentials: &setup_git_credentials + # Set access to SECO repos via token + - git config + --global url.https://gitlab-ci-token:${GITBOT_TOKEN}@git.seco.com/.insteadOf + https://git.seco.com/ + # Set some credentials from private upstream repos - echo "Setup Git Credentials Cache" - git config --global credential.helper 'cache --timeout 86400' + - git config --global credential.helper store - git config --global credential.useHttpPath true - git config --global --add safe.directory "*" # Following format should be used for GITLAB_PRIVATE_TOKEN: -- GitLab