Skip to content

Commit

Permalink
Merge pull request #143 from ePages-de/develop
Browse files Browse the repository at this point in the history
Release v0.1.0
  • Loading branch information
Unai Abrisketa authored Dec 7, 2017
2 parents 430b245 + 53bd653 commit 331cb15
Show file tree
Hide file tree
Showing 759 changed files with 38,394 additions and 157 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gemfile.lock export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
_site
.sass-cache
.jekyll-metadata
.tweet-cache
.bundle
_config_write.yml
log/
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.2
24 changes: 0 additions & 24 deletions 404.html

This file was deleted.

38 changes: 38 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"

# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
# require "capistrano/rvm"
# require "capistrano/rbenv"
# require "capistrano/chruby"
# require "capistrano/bundler"
# require "capistrano/rails/assets"
# require "capistrano/rails/migrations"
# require "capistrano/passenger"

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ruby:2.4.2

RUN apt-get update \
&& apt-get install -y \
node \
python-pygments \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/

RUN gem install \
jekyll \
jekyll-redirect-from \
kramdown \
rdiscount \
rouge

EXPOSE 4000

WORKDIR /src

COPY build.sh .

CMD jekyll serve
37 changes: 16 additions & 21 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
source "https://rubygems.org"
source 'https://rubygems.org'
ruby RUBY_VERSION

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.6.0"
gem 'jekyll'
gem 'rake'
gem 'colorize'
gem 'html-proofer'
gem 'capistrano', '3.8.1', require: false
gem 'capistrano-rbenv', require: false
gem 'capistrano-bundler', require: false

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-feed'
gem 'jekyll-admin'
gem 'bourbon'
gem 'neat'
gem 'rouge'
gem 'jekyll-twitter-plugin'
gem 'jekyll-paginate-v2'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

111 changes: 104 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,49 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
airbrussh (1.3.0)
sshkit (>= 1.6.1, != 1.7.0)
backports (3.10.3)
bourbon (4.3.4)
sass (~> 3.4)
thor (~> 0.19)
capistrano (3.8.1)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (1.3.0)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-rbenv (2.1.2)
capistrano (~> 3.1)
sshkit (~> 1.3)
colorator (1.1.0)
colorize (0.8.1)
concurrent-ruby (1.0.5)
ethon (0.11.0)
ffi (>= 1.3.0)
ffi (1.9.18)
forwardable-extended (2.6.0)
jekyll (3.6.0)
html-proofer (3.7.4)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
colorize (~> 0.8)
mercenary (~> 0.3.2)
nokogiri (~> 1.7)
parallel (~> 1.3)
typhoeus (~> 0.7)
yell (~> 2.0)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
jekyll (3.6.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
Expand All @@ -17,10 +54,18 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-admin (0.7.0)
addressable (~> 2.4)
jekyll (~> 3.3)
sinatra (~> 1.4)
sinatra-contrib (~> 1.4)
jekyll-feed (0.9.2)
jekyll (~> 3.3)
jekyll-paginate-v2 (1.9.0)
jekyll (~> 3.0)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-twitter-plugin (2.0.0)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.15.0)
Expand All @@ -29,30 +74,82 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
minima (2.1.1)
jekyll (~> 3.3)
mini_portile2 (2.3.0)
minitest (5.10.3)
multi_json (1.12.2)
neat (2.1.0)
sass (~> 3.4)
thor (~> 0.19)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (4.2.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
parallel (1.12.0)
pathutil (0.16.0)
forwardable-extended (~> 2.6)
public_suffix (3.0.0)
rack (1.6.8)
rack-protection (1.5.3)
rack
rack-test (0.7.0)
rack (>= 1.0, < 3)
rake (12.2.1)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
safe_yaml (1.0.4)
sass (3.5.2)
sass (3.5.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sinatra-contrib (1.4.7)
backports (>= 2.0)
multi_json
rack-protection
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
sshkit (1.15.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.4)
thread_safe (~> 0.1)
yell (2.0.7)

PLATFORMS
ruby

DEPENDENCIES
jekyll (~> 3.6.0)
jekyll-feed (~> 0.6)
minima (~> 2.0)
bourbon
capistrano (= 3.8.1)
capistrano-bundler
capistrano-rbenv
colorize
html-proofer
jekyll
jekyll-admin
jekyll-feed
jekyll-paginate-v2
jekyll-twitter-plugin
neat
rake
rouge
tzinfo-data

RUBY VERSION
ruby 2.4.2p198

BUNDLED WITH
1.15.4
64 changes: 47 additions & 17 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
pipeline {
agent any
stages {
stage('Build and deploy') {
stage('Build') {
when { anyOf { branch 'master'; branch 'develop'; expression { BRANCH_NAME ==~ /PR-\d*/ } } }
steps {
sh '''source ~/.bash_profile
export PATH=$PATH:/usr/local/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims
eval "$(rbenv init -)"
rbenv local 2.4.0
gem install bundler
bundle install
rbenv rehash
jekyll build
if [ "$BRANCH_NAME" = "master" ]; then
aws s3 sync ./_site s3://epages-devblog/
elif [ "$BRANCH_NAME" = "develop" ]; then
aws s3 sync ./_site s3://epages-devblog-stg/
else
echo "$BRANCH_NAME"
fi'''
sh '''
source ~/.bash_profile
export PATH=$PATH:/usr/local/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims
eval "$(rbenv init -)"
rbenv local 2.4.2
gem install bundler
bundle install
rbenv rehash
jekyll build
'''
}
}
stage('Test') {
when { anyOf { branch 'master'; branch 'develop'; expression { BRANCH_NAME ==~ /PR-\d*/ } } }
steps {
sh '''
source ~/.bash_profile
export PATH=$PATH:/usr/local/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims
eval "$(rbenv init -)"
rbenv local 2.4.2
gem install bundler
bundle install
rbenv rehash
rake test_html
rake test_files
rake test_posts
'''
}
}
stage('Deploy') {
when { branch 'master' }
steps {
sh '''
source ~/.bash_profile
export PATH=$PATH:/usr/local/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims
eval "$(rbenv init -)"
rbenv local 2.4.2
gem install bundler
bundle install
rbenv rehash
eval `ssh-agent -s`
ssh-add
bundle exec cap production deploy --trace
'''
}
}
}
}
}
Loading

0 comments on commit 331cb15

Please sign in to comment.