-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
31 lines (30 loc) · 1.17 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
image: continuumio/miniconda3:latest
clone_github:
stage: deploy
image: ubuntu:18.04
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 "krodriguez"
- git config --global user.email "[email protected]"
- ssh "git@$GIT_LAB_HOST"
script:
- echo $SOURCE_REPOSITORY
- git config --global http.sslVerify false
- rm -rf spiceql # Needed to allow multiple CI runs
- git config --global user.name "krodriguez"
- git config --global user.email "[email protected]"
- git clone --mirror https://github.com/DOI-USGS/asc-public-docs.git asc-public-docs
- cd spiceql
- git remote remove origin
- git remote add origin $DESTINATION_REPOSITORY
- git push -f --prune --all
- git push -f --prune --tags
only:
- branches