aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: f0210116817ffad91642d0874405ca6dcdfab5f3 (plain)
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
image: 'python:3'

before_script:
  - 'command -v ssh-agent >/dev/null || ( 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
  - chmod 700 ~/.ssh
  - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'

stages:         
  - deploy

deploy-job:    
  stage: deploy  
  script:
    - apt update -y && apt install -y sshpass
    - echo "Deploying application..."
    - echo "Application successfully deployed."
    - git clone --branch install --depth 1 https://gitlab.com/kdam0/vps.git
    - cd vps
    - echo $VAULT_PASS > vaultid
    - make install
    - cat hosts
    - ls -al
    - make facts group=compute args="-v"