Commit 8082ab70 authored by Cool Fire's avatar Cool Fire

Merge branch 'development' into 'master'

Test new deployment CI jobs

See merge request !4
parents a4a7593a 7af7cb6d
Pipeline #358 failed with stages
in 6 minutes and 57 seconds
......@@ -48,7 +48,7 @@ rack_test:
- bundle install
- touch .current
- ruby test.rb
deploy:
pull_code:
stage: deploy
image: ubuntu:16.04
only:
......@@ -60,4 +60,45 @@ deploy:
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- bash deploy.sh
- bash deployment/pull_code.sh
set_git_tag:
stage: deploy
image: ubuntu:16.04
only:
- master
script:
- apt-get update
- 'which ssh-agent || (apt-get install -y -qq openssh-client)'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- bash deployment/set_git_tag.sh
populate_config:
stage: deploy
image: ubuntu:16.04
only:
- master
script:
- apt-get update
- apt-get install ruby
- ruby deployment/create_config.rb > config.yaml
- 'which ssh-agent || (apt-get install -y -qq openssh-client)'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- bash deployment/populate_config.sh
restart_application:
stage: deploy
image: ubuntu:16.04
only:
- master
script:
- apt-get update
- 'which ssh-agent || (apt-get install -y -qq openssh-client)'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- bash deployment/restart_application.sh
---
error_message_username: Username appears to be invald.
error_message_email: Email address appears to be invalid.
error_message_phone: Phone number appears to be invald.
error_message_username: The username you entered appears to be invalid. Please go back and try again.
error_message_email: The e-mail address you entered appears to be invalid. Please go back and try again.
error_message_phone: The phone number you entered appears to be invalid. Please go back and try again. Note that the phone number is an optional field and may be left empty.
error_message_reason: It appears you have not specified a reason. This is technically allowed but makes it extremely unlikely your application will be accepted.
require 'yaml'
config = {
messagebird: {
key: ENV['MESSAGEBIRD_KEY']
},
db: {
host: ENV['DB_HOST'],
name: ENV['DB_NAME'],
user: ENV['DB_USER'],
pass: ENV['DB_PASS']
}
}
puts config.to_yaml
#!/usr/bin/bash
for c in {1..4}
do
scp config.yaml signup@insomnia247.nl:/home/signup/public_html && break || sleep 3 && echo "retry"
done
......@@ -2,5 +2,5 @@
for c in {1..4}
do
ssh signup@insomnia247.nl "cd /home/signup/public_html && git pull && git log -n1 --pretty=%h > .current && touch tmp/restart.txt" && break || sleep 3 && echo "retry"
ssh signup@insomnia247.nl "cd /home/signup/public_html && git pull" && break || sleep 3 && echo "retry"
done
#!/usr/bin/bash
for c in {1..4}
do
ssh signup@insomnia247.nl "cd /home/signup/public_html && touch tmp/restart.txt" && break || sleep 3 && echo "retry"
done
#!/usr/bin/bash
for c in {1..4}
do
ssh signup@insomnia247.nl "cd /home/signup/public_html && git log -n1 --pretty=%h > .current" && break || sleep 3 && echo "retry"
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment