image: registry.roqua.nl/roqua/rq

before_script:
  - docker login registry.roqua.nl -u "$REGISTRY_USERNAME" -p "$REGISTRY_PASSWORD"

docker:
  retry: 2
  script:
    - rq build
    - rq test shell bundle exec rake db:create
    - rq test shell bin/rails db:environment:set RAILS_ENV=test
    - rq test shell bundle exec rake db:schema:load
    - rq test shell bundle exec rspec
    - rq teardown
    - sed -i 's/postgres:9.4/postgres:10/g' infrastructure.yml
    - rq test shell bundle exec rake db:create
    - rq test shell bin/rails db:environment:set RAILS_ENV=test
    - rq test shell bundle exec rake db:schema:load
    - rq test shell bundle exec rspec    
    - rq test shell bundle exec rubocop -D
    - rq push

dependency_scanning:
  image: registry.roqua.nl/roqua/dependency_scanning
  variables:
    DOCKER_DRIVER: overlay2
  services:
    - docker:stable-dind
  script:
    - scan_dependencies.sh
  artifacts:
    paths: [gl-dependency-scanning-report.json]

image: registry.roqua.nl/roqua/rq

before_script:
  - docker login registry.roqua.nl -u "$REGISTRY_USERNAME" -p "$REGISTRY_PASSWORD"

docker:
  retry: 2
  script:
    - rq build
    - rq test shell bundle exec rake db:create
    - rq test shell bin/rails db:environment:set RAILS_ENV=test
    - rq test shell bundle exec rake db:schema:load
    - rq test shell bundle exec rspec
    - rq teardown
    - sed -i 's/postgres:9.4/postgres:10/g' infrastructure.yml
    - rq test shell bundle exec rake db:create
    - rq test shell bin/rails db:environment:set RAILS_ENV=test
    - rq test shell bundle exec rake db:schema:load
    - rq test shell bundle exec rspec    
    - rq test shell bundle exec rubocop -D
    - rq push
  after_script:
    - rq teardown

dependency_scanning:
  image: registry.roqua.nl/roqua/dependency_scanning
  variables:
    DOCKER_DRIVER: overlay2
  services:
    - docker:stable-dind
  script:
    - scan_dependencies.sh
  artifacts:
    paths: [gl-dependency-scanning-report.json]

Add missing 'rq teardown' command to GitLab CI
Add missing 'rq teardown' command to GitLab CI