stages: - static_analysis - security_test - behavior_test - release image: ruby:2.3.3 cache: key: "$CI_BUILD_NAME" paths: - vendor/bundle variables: NORAD_ROOT: 'http://127.0.0.1' before_script: - bundle install --jobs=4 rubocop: stage: static_analysis script: bundle exec rake rubocop bundle_audit: stage: security_test script: bundle exec bundle-audit check --update rspec: stage: behavior_test script: bundle exec rspec publish: stage: release script: - echo "---" > ~/.gem/credentials - COLON=':' && echo "${COLON}rubygems_api_key${COLON} ${RUBYGEMS_API_KEY}" >> ~/.gem/credentials - git config --global user.email "norad.dev@gmail.com" - git config --global user.name "Norad Release" - git config --global push.default simple - chmod 0600 ~/.gem/credentials - bundle exec rake build - bundle exec rake release:guard_clean - gem push `ls ./pkg/norad_beacon-*.gem` - rm -fr ~/.gem only: - master