From 9eee218effd7ffb6a3a6290de0b9bc331e8c03e7 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 2 Mar 2020 13:35:21 -0300 Subject: [PATCH] ci/cd: si con esto no se aceptan las llaves ssh la voy a tener que hardcodear --- .gitlab-ci.yml | 2 ++ config/deploy.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b73369e..63f959b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,8 @@ deploy_application: - bundle install --path=./vendor - eval $(ssh-agent) - echo -e "-----BEGIN OPENSSH PRIVATE KEY-----\n$SSH_PRIVATE_KEY\n-----END OPENSSH PRIVATE KEY-----" | ssh-add - + - mkdir -p ~/.ssh + - echo -e "Host *\nVerifyHostKeyDNS yes" > ~/.ssh/config - echo "$RAILS_MASTER_KEY" > config/master.key - bundle exec cap production deploy - rm -f config/master.key diff --git a/config/deploy.rb b/config/deploy.rb index 1bf3e2e..a00a269 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -11,7 +11,7 @@ set :bundle_flags, '--deployment' set :bundle_jobs, 1 set :bundle_env_variables, nokogiri_use_system_libraries: 1 set :keep_releases, 2 -set :ssh_options, verify_host_key_dns: true, check_host_ip: true +set :ssh_options, check_host_ip: true set :default_env, rails_env: 'production',