summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 471904ee2a4deb0a6a955bfed37920975ea0b150 (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
---
stages:
  - production

production:
  image: 0xacab.org:4567/leap/docker/ruby:stretch_amd64
  stage: production
  environment:
    name: production
  only:
    - master@leap/leap_se
  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