-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.gitlab-ci.yml
25 lines (24 loc) · 966 Bytes
/
.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
variables:
GIT_SUBMODULE_STRATEGY: recursive
deployToStore:
stage: deploy
only:
- triggers
- web
- api
image: python:3.7
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh && touch ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- ssh-keyscan $DEPLOY_DOMAIN >> ~/.ssh/known_hosts
- apt-get update -qq && apt-get install git -qq
- python3 -m pip install --upgrade pip
- pip3 install requests jinja2 gitpython
script:
- python3 ci_sources/store.py
- ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $DEPLOY_USERNAME@$DEPLOY_DOMAIN "mkdir -p www/$DEPLOY_DOMAIN/assets/store"
- scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -rp store/* "$DEPLOY_USERNAME@$DEPLOY_DOMAIN:www/$DEPLOY_DOMAIN/assets/store"
allow_failure: true