Commit c32cc69f authored by Cool Fire's avatar Cool Fire

Initial commit

parents
Pipeline #317 failed with stages
in 29 seconds
---
stages:
- syntax
- linting
- testing
- deploy
syntax_ruby:
stage: syntax
image: ruby:2.4
script:
- find . -name '*\.rb' -exec bash -c 'echo -ne "{}\t\t\t" && ruby -c {}' \;
syntax_erb:
stage: syntax
image: ruyb:2.4
script:
- find . -name '*\.erb' -exec bash -c 'echo -ne "{}\t\t\t" && erb -P -x {} | ruby -c' \;
lint_ruby:
stage: linting
image: ruby:2.4
script:
- gem install rubocop --no-ri --no-rdoc
- rubocop -l -f s
lint_yaml:
stage: linting
image: ruby:2.4
script:
- gem install yamllint --no-ri --no-rdoc
- yamllint *.yaml
tests:
stage: testing
image: ruby:2.4
script:
- bundle install
- rake test
deploy:
stage: deploy
image: ubuntu:16.04
only:
- master
script:
- '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 deploy.sh
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'sinatra'
GEM
remote: https://rubygems.org/
specs:
mustermann (1.0.0)
rack (2.0.3)
rack-protection (2.0.0)
rack
sinatra (2.0.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.0)
tilt (~> 2.0)
tilt (2.0.7)
PLATFORMS
ruby
DEPENDENCIES
sinatra
BUNDLED WITH
1.15.1
# frozen_string_literal: true
require File.expand_path '../signup_site.rb', __FILE__
run SignupSite.new
#!/usr/bin/bash
for c in {1..4}
do
ssh deploy_user@insomnia247.nl "cd /home/deploy_user/public_html && git pull && touch tmp/restart" && break || sleep 3 && echo "retry"
done
# frozen_string_literal: true
require 'sinatra/base'
# Main class for signup site
class SignupSite < Sinatra::Base
enable :sessions
set :title, 'Shell signup - Insomnia 24/7'
get '/' do
@body = 'test'
erb :index
end
end
<!DOCTYPE html>
<html>
<head>
<title><%= settings.title %></title>
</head>
<body>
<%= @body %>
</body>
</html>
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