Skip to content
Snippets Groups Projects
Commit 1ba228e5 authored by ladoramkershner's avatar ladoramkershner Committed by Jesse Mapel
Browse files

adding gitlab mirror ci yaml

parent e8be510c
No related branches found
No related tags found
No related merge requests found
image: ubuntu:18.04
clone_github:
stage: deploy
before_script:
- apt-get update -y && apt-get install openssh-client -y
- apt install git -y
- eval $(ssh-agent -s)
- echo "$GIT_SSH_PRIVATE_KEY" | openssl base64 -A -d | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan $GIT_LAB_HOST >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- git config --global user.name "${GIT_USER_NAME}"
- git config --global user.email "${GIT_USER_EMAIL}"
- ssh "git@$GIT_LAB_HOST"
script:
- echo $SOURCE_REPOSITORY
- git config --global http.sslVerify false # Epic....
- rm -rf usgscsm # Needed to allow multiple CI runs
- git clone --mirror $SOURCE_REPOSITORY usgscsm
- cd usgscsm
- git remote remove origin
- git remote add origin $DESTINATION_REPOSITORY
- git push -f --prune --all
- git push -f --prune --tags
only:
- branches
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment