name: build kind: pipeline type: docker volumes: - name: rubygems host: path: /home/data/drone/rubygems - name: images host: path: /home/data/drone/images - name: bundle host: path: /home/data/drone/gems - name: keys host: path: /home/data/drone/key_cache spec_step_common: &spec_step_common image: abakpress/dind-testing:1.0.3 pull: if-not-exists privileged: true volumes: - name: images path: /images - name: bundle path: /bundle - name: keys path: /ssh_keys commands: - prepare-build - fetch-images --image whilp/ssh-agent --image abakpress/ruby-app:$RUBY_IMAGE_TAG --image redis:$REDIS_IMAGE_TAG - dip ssh add -T -v /ssh_keys -k /ssh_keys/id_rsa - dip provision - dip rspec steps: - name: Tests Ruby 2.4 environment: COMPOSE_FILE_EXT: drone DOCKER_RUBY_VERSION: 2.4 RUBY_IMAGE_TAG: 2.4-latest REDIS_IMAGE_TAG: 4-alpine RAILS_ENV: test <<: *spec_step_common - name: release image: abakpress/gem-publication:latest pull: if-not-exists when: event: push branch: master status: success volumes: - name: rubygems path: /root/.gem commands: - release-gem --public