Sha256: 0c74b100d47d0c644e893cf57fad732e655af3f7ec6f3fb3b8d1904b28596239

Contents?: true

Size: 935 Bytes

Versions: 2

Compression:

Stored size: 935 Bytes

Contents

image: "ruby:2.4"

stages:
  - test
  - release

cache:
  paths:
    - vendor/ruby

before_script:
  - gem install bundler  --no-ri --no-rdoc
  - bundle install --jobs $(nproc) --path vendor
  - mkdir -p tmp

rubocop:
  stage: test
  script:
    - rubocop

rspec:
  stage: test
  services:
    - name: docker.elastic.co/elasticsearch/elasticsearch:5.6.3
      alias: elasticsearch
  variables:
    ELASTICSEARCH_URL: elasticsearch:9200
    ELASTICSEARCH_USERNAME: elastic
    ELASTICSEARCH_PASSWORD: changeme
  script:
    - rspec

release-gem:
  stage: release
  only:
    - tags
  script:
    - mkdir -p ~/.gem
    - 'echo -e "---\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials'
    - chmod 0600 ~/.gem/credentials
    - GEM_VERSION=$(echo $CI_COMMIT_TAG|sed 's/[^.0-9]//g')
    - sed -i -e "s/0.0.0/$GEM_VERSION/g" lib/mindex/version.rb
    - gem build mindex.gemspec
    - gem push mindex-$GEM_VERSION.gem -k rubygems

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mindex-0.2.0 .gitlab-ci.yml
mindex-0.1.0 .gitlab-ci.yml