-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
@ #423 | update travis-ci
- Loading branch information
Showing
37 changed files
with
1,546 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,8 @@ Session.vim | |
!.gitmodules | ||
!.chef | ||
!.travis | ||
!.rubocop.yml | ||
!.rubocop_todo.yml | ||
|
||
# docs | ||
_deploy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
AllCops: | ||
DisplayCopNames: true | ||
StyleGuideCopsOnly: false | ||
Exclude: | ||
- "tmp/**/*" | ||
- "vendor/**/*" | ||
- "docs/**/*" | ||
- "spec/fixtures/**/*" | ||
- "workspace/**/*" | ||
- "extensions/**/*" | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Layout/TrailingWhitespace: | ||
Enabled: true | ||
|
||
Metrics/ClassLength: | ||
Enabled: false | ||
|
||
Metrics/LineLength: | ||
Max: 100 | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
|
||
Documentation: | ||
Enabled: false | ||
|
||
Style/DoubleNegation: | ||
Enabled: false | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 50 | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 50 | ||
|
||
Performance/RangeInclude: | ||
Enabled: false | ||
|
||
Style/RescueStandardError: | ||
EnforcedStyle: implicit | ||
|
||
Style/IfInsideElse: | ||
Enabled: false | ||
|
||
Style/RegexpLiteral: | ||
Enabled: false | ||
|
||
Style/RedundantReturn: | ||
Enabled: false | ||
|
||
Style/RaiseArgs: | ||
EnforcedStyle: compact | ||
|
||
Metrics/BlockNesting: | ||
Max: 5 | ||
|
||
Layout/SpaceAroundOperators: | ||
Enabled: false | ||
|
||
Style/MultilineIfModifier: | ||
Enabled: false | ||
|
||
Style/PreferredHashMethods: | ||
EnforcedStyle: verbose | ||
|
||
Style/RedundantBegin: | ||
Enabled: false | ||
|
||
Naming/FileName: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
sudo: required | ||
dist: xenial | ||
|
||
services: | ||
- docker | ||
git: | ||
depth: 1 | ||
|
||
script: | ||
- echo "OK" | ||
jobs: | ||
include: | ||
- stage: "Check Style" | ||
name: "check style" | ||
before_install: bundle install | ||
script: bundle exec rubocop | ||
|
||
- stage: "Tests" | ||
name: "tests" | ||
script: bundle exec rspec | ||
|
||
- stage: Deploy | ||
services: | ||
- docker | ||
env: | ||
- DOCKER_FILE=Dockerfile CI_REGISTRY_IMAGE=$DOCS_DOCKER_IMAGE CI_BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
before_script: | ||
- chmod ugo+x ./.travis/deploy.sh | ||
- git config --global user.name "Teracy Bot" | ||
- git config --global user.email "teracy.com@gmail.com" | ||
- export REPO_URL="https://$GH_TOKEN@github.com/$GH_REPO.git" | ||
- . ./.travis/setup.sh | ||
- echo $DEPLOY_HTML_DIR | ||
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH | sed -e 's/[\/]/-/g' | sed -e 's/[\#]//g'; fi` | ||
- export CONTAINER_IMAGE=$CI_REGISTRY_IMAGE:$TAG | ||
script: ./.travis/deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
function docker_build { | ||
docker build -f $DOCKER_FILE \ | ||
--build-arg CI_BUILD_ID=$TRAVIS_BUILD_ID \ | ||
--build-arg CI_BUILD_REF=$TRAVIS_COMMIT \ | ||
--build-arg CI_BUILD_REF_NAME=$TRAVIS_BRANCH \ | ||
--build-arg CI_BUILD_TIME=$CI_BUILD_TIME \ | ||
--build-arg CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE \ | ||
--build-arg CI_PROJECT_NAME=$TRAVIS_REPO_SLUG \ | ||
--pull -t $CONTAINER_IMAGE . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
. ./.travis/common.sh | ||
|
||
docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD | ||
|
||
function deploy_docs { | ||
cd docs | ||
make setup_gh_pages | ||
make deploy | ||
cd .. | ||
} | ||
|
||
function deploy_docker_img { | ||
docker push $CONTAINER_IMAGE | ||
} | ||
|
||
# build teracy-dev-docs distributed Docker image | ||
cd docs | ||
docker_build | ||
deploy_docker_img | ||
cd .. | ||
# allow this to be failed | ||
deploy_docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
#setup travis-ci configuration basing one the being-built branch | ||
|
||
if [[ $TRAVIS_BRANCH == 'master' ]] ; then | ||
export DEPLOY_HTML_DIR=docs | ||
else | ||
export DEPLOY_HTML_DIR=docs/$TRAVIS_BRANCH | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
ruby '>= 2.4.4' | ||
|
||
# gem 'rake', >= 11.2.2' | ||
|
||
group:test do | ||
gem 'rspec' | ||
gem 'rubocop', require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.0) | ||
diff-lcs (1.3) | ||
jaro_winkler (1.5.2) | ||
parallel (1.14.0) | ||
parser (2.6.0.0) | ||
ast (~> 2.4.0) | ||
powerpack (0.1.2) | ||
psych (3.1.0) | ||
rainbow (3.0.0) | ||
rspec (3.8.0) | ||
rspec-core (~> 3.8.0) | ||
rspec-expectations (~> 3.8.0) | ||
rspec-mocks (~> 3.8.0) | ||
rspec-core (3.8.0) | ||
rspec-support (~> 3.8.0) | ||
rspec-expectations (3.8.2) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.8.0) | ||
rspec-mocks (3.8.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.8.0) | ||
rspec-support (3.8.0) | ||
rubocop (0.65.0) | ||
jaro_winkler (~> 1.5.1) | ||
parallel (~> 1.10) | ||
parser (>= 2.5, != 2.5.1.1) | ||
powerpack (~> 0.1) | ||
psych (>= 3.1.0) | ||
rainbow (>= 2.2.2, < 4.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (~> 1.4.0) | ||
ruby-progressbar (1.10.0) | ||
unicode-display_width (1.4.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
rspec | ||
rubocop | ||
|
||
RUBY VERSION | ||
ruby 2.6.1p33 | ||
|
||
BUNDLED WITH | ||
2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.