Commit 5df49408 authored by sagnowski's avatar sagnowski
Browse files

Remove `git remote add` from mirroring job

Trying to add a remote that already exists causes an error.
This would be a problem when the job is run multiple times
on a runner with caching or persistent state. Better to avoid
using remote aliases and instead specify the url directly.
parent 7cc82502
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -181,9 +181,8 @@ pull-from-3gpp-forge:
    - git checkout $CI_COMMIT_BRANCH
    
    # Pull commits from upstream
    - git remote add upstream https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec.git
    - git pull --ff-only --tags upstream $MIRROR_SOURCE_BRANCH
    - git lfs pull upstream
    - git pull --ff-only --tags https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec.git $MIRROR_SOURCE_BRANCH
    - git lfs pull https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec.git

    # Push to mirror, include tags. Option `-o ci.skip` tells GitLab to skip CI for the pushed commits (assumed already tested upstream)
    - git push --tags -o ci.skip "https://${GITLAB_USER_LOGIN}:${MIRROR_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_BRANCH}"