Sha256: 417e2e5210b1c9064400ea1449047dc664f7352e2994edbabdab7d59cb8a1c38

Contents?: true

Size: 1.8 KB

Versions: 1

Compression:

Stored size: 1.8 KB

Contents

image: ruby:2.6
stages:
  - test
  - deploy

rubocop-testing:
  stage: test
  allow_failure: true
  script:
  - gem install rubocop
  - rubocop --lint

security-testing:
  stage: test
  allow_failure: true
  script:
  - gem install brakeman
  - brakeman

ruby:test:
  stage: test
  cache:
    key: ruby:$RUBY_VERSION-rails:$RAILS_VERSION
    paths:
      - vendor/ruby
  parallel:
    matrix:
      - RUBY_VERSION: "2.7"
        RAILS_VERSION: ["5.0", "5.1", "5.2", "6.0"]
  before_script:
    - bundle config set path 'vendor/ruby'
    - bundle config --global gemfile "gemfiles/Gemfile-rails.$RAILS_VERSION.x"
    - bundle install
  script:
    - bundle exec rails -v
    - bundle exec rspec
  coverage: '/\(\d+.\d+\%\) covered/'

rubygems-deploy:
  stage: deploy
  allow_failure: false
  script:
  - echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list
  - apt-get update
  - apt-get install -y git
  - apt-get clean all
  - gem install dpl
  - if [[ "staging"  == $CI_BUILD_REF_SLUG ]];then  export VERSION=`git describe --match "[0-9]*\.[0-9]*\.[0-9]*[a-z]" --abbrev=0 --tags HEAD`; fi
  - if [[ "master"  == $CI_BUILD_REF_SLUG ]];then export VERSION=`git describe --exclude "[0-9]*\.[0-9]*\.[0-9]*[a-z]" --abbrev=0 --tags HEAD`; fi
  - echo $VERSION
  - sed -i "s/0.0.1/$VERSION/" lib/zuora_api/version.rb
  - git add lib/zuora_api/version.rb
  - git config --global user.email "connect@zuora.com"
  - git config --global user.name "Connect Automation"
  - git commit -m "Automated Version Update $VERSION"
  - bundle install
  - gem install rake
  - version=$(rake install | grep -o 'pkg/zuora_api-.*gem')
  - curl -u $USERNAME:$PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
  - gem push $version
  only:
    - master
    - staging

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zuora_api-1.8.2 .gitlab-ci.yml