--- 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