cache: paths: - .bundler/ image: ruby:2.4 stages: - tests - publish rubocop: stage: tests before_script: - gem install rubocop -v '0.48.1' script: - rubocop rspec: stage: tests before_script: - ruby -v - which ruby - gem install bundler --no-ri --no-rdoc - bundle install --jobs $(nproc) "${FLAGS[@]}" --path=.bundler script: - bundle exec rspec publish_gem: stage: publish before_script: - "echo \":rubygems_api_key: '${RUBYGEMS_API_KEY}'\" > ~/.gem/credentials" - chmod 0600 ~/.gem/credentials script: - gem build rancher-api-beta - gem push *.gem only: - master when: manual