forked from External/greenlight
Updated scripts for CI (#380)
This commit is contained in:
parent
c60e25f71c
commit
fff8a52cc2
|
@ -13,11 +13,9 @@ test:
|
||||||
- bundle install --path /cache
|
- bundle install --path /cache
|
||||||
- bundle exec rake db:create RAILS_ENV=test
|
- bundle exec rake db:create RAILS_ENV=test
|
||||||
- bundle exec rake test & bundle exec rspec & bundle exec rubocop
|
- bundle exec rake test & bundle exec rspec & bundle exec rubocop
|
||||||
only:
|
except:
|
||||||
refs:
|
|
||||||
- branches
|
|
||||||
variables:
|
variables:
|
||||||
- $GITLAB_TEST
|
- $CD_TEST_IGNORE
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -34,7 +32,11 @@ build:
|
||||||
- ./scripts/image_build.sh $CI_PROJECT_PATH $CI_COMMIT_REF_NAME $CI_COMMIT_SHA
|
- ./scripts/image_build.sh $CI_PROJECT_PATH $CI_COMMIT_REF_NAME $CI_COMMIT_SHA
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $GITLAB_BUILD
|
- $CD_DOCKER_USERNAME
|
||||||
|
- $CD_DOCKER_PASSWORD
|
||||||
|
except:
|
||||||
|
variables:
|
||||||
|
- $CD_BUILD_IGNORE
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -53,4 +55,9 @@ deploy:
|
||||||
refs:
|
refs:
|
||||||
- branches
|
- branches
|
||||||
variables:
|
variables:
|
||||||
- $GITLAB_DEPLOY
|
- $CD_DOCKER_USERNAME
|
||||||
|
- $CD_DOCKER_PASSWORD
|
||||||
|
- $CD_DEPLOY_SCRIPT
|
||||||
|
except:
|
||||||
|
variables:
|
||||||
|
- $CD_DEPLOY_IGNORE
|
||||||
|
|
18
.travis.yml
18
.travis.yml
|
@ -5,8 +5,22 @@ language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 2.5.1
|
- 2.5.1
|
||||||
|
|
||||||
script:
|
jobs:
|
||||||
- bundle install && bundle exec rubocop && bundle exec rspec
|
include:
|
||||||
|
- stage: test
|
||||||
|
name: rubocop
|
||||||
|
script: bundle exec rubocop
|
||||||
|
if: env(CD_TEST_IGNORE) IS NOT present
|
||||||
|
|
||||||
|
- stage: test
|
||||||
|
name: rspec
|
||||||
|
script: bundle exec rspec
|
||||||
|
if: env(CD_TEST_IGNORE) IS NOT present
|
||||||
|
|
||||||
|
- stage: build
|
||||||
|
name: build docker image
|
||||||
|
script: bash scripts/image_build.sh $TRAVIS_REPO_SLUG $TRAVIS_BRANCH $TRAVIS_COMMIT
|
||||||
|
if: !env(TRAVIS_PULL_REQUEST) AND env(CD_BUILD_IGNORE) IS NOT present AND env(CD_DOCKER_USERNAME) IS present AND env(CD_DOCKER_PASSWORD) IS present
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
# as part of the development process.
|
# as part of the development process.
|
||||||
#
|
#
|
||||||
|
|
||||||
echo "v1.0.3"
|
|
||||||
|
|
||||||
display_usage() {
|
display_usage() {
|
||||||
echo "This script should be used as part of a CI strategy."
|
echo "This script should be used as part of a CI strategy."
|
||||||
echo -e "Usage:\n build_image.sh [ARGUMENTS]"
|
echo -e "Usage:\n build_image.sh [ARGUMENTS]"
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
# or reviewing work as part of development process.
|
# or reviewing work as part of development process.
|
||||||
#
|
#
|
||||||
|
|
||||||
echo "v1.0.3"
|
|
||||||
|
|
||||||
display_usage() {
|
display_usage() {
|
||||||
echo "This script should be used as part of a CI strategy."
|
echo "This script should be used as part of a CI strategy."
|
||||||
echo -e "Usage:\n build_image.sh [ARGUMENTS]"
|
echo -e "Usage:\n build_image.sh [ARGUMENTS]"
|
||||||
|
|
Loading…
Reference in New Issue