summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 9fdbaadd63633b76e13966624bdf96dccd377396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
image: 0xacab.org:4567/leap/docker/ruby:stretch_amd64

deploy:
  environment:
    name: production
  only:
    - master
  before_script:
    # install ssh-agent
    - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
    # run ssh-agent
    - eval $(ssh-agent -s)
    # add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
    # see https://gitlab.com/gitlab-org/gitlab-ee/issues/2940 for fixing
    # broken line endings
    - ssh-add <(echo "$SSH_PRIVATE_KEY" | sed 's/\r$//')
  script:
    - apt-get update
    - apt-get install -y --no-install-recommends capistrano
    - cap deploy