Skip to content
Snippets Groups Projects
Commit ca7261ad authored by Anusha Ranganathan's avatar Anusha Ranganathan
Browse files

Merge branch 'setup-gitlab-ci-sagar' into 'develop'

Setup gitlab ci sagar

See merge request FDM/rdm-system/rdms!18
parents d84d867e 42327f6b
No related branches found
No related tags found
2 merge requests!19Develop,!18Setup gitlab ci sagar
Pipeline #4266 passed
image: docker:stable
image: ruby:2.7.5
stages:
- build
- test
- deploy
services:
- docker:dind
- postgres:13-alpine
- redis:6
variables:
POSTGRES_DB: 'hyrax_test'
POSTGRES_DB_TEST: 'hyrax_test'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'password'
POSTGRES_HOST_AUTH_METHOD: trust
build-job:
stage: build
before_script:
- apt-get update -qq && apt-get install -y -qq nodejs
- cd hyrax
- bundle install --jobs 4 --retry 3
script:
- export FITS_ROOT=~/rdms-hyrax/
- mkdir -p ${FITS_ROOT}
- wget -q https://github.com/harvard-lts/fits/releases/download/1.5.0/fits-1.5.0.zip -O ${FITS_ROOT}/fits-1.5.0.zip
- unzip -q ${FITS_ROOT}/fits-1.5.0.zip -d ${FITS_ROOT}/fits-1.5.0
- chmod a+x ${FITS_ROOT}/fits-1.5.0/fits.sh
- rm ${FITS_ROOT}/fits-1.5.0.zip
- bundle exec rake db:test:prepare
test-job:
stage: test
coverage: '/coverage: \d+.\d+% of statements/'
before_script:
- apt-get update -qq && apt-get install -y -qq nodejs
- apt-get update -qq && apt-get install -y -qq software-properties-common
- apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main'
- apt-get update && apt-get -y install openjdk-8-jdk libmediainfo-dev
- update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
- cd hyrax
- bundle install --jobs 4 --retry 3
script:
- export FITS_PATH=~/rdms-hyrax/fits-1.3.0/fits.sh
- if test -f "lib/tasks/test_servers.rake"; then echo 'Running full tests' && bundle exec rake test:servers:start && bundle exec rspec && bundle exec rake test:servers:stop; else echo "Running limited tests"; bundle exec rspec --exclude-pattern "**/features/*_spec.rb"; fi
deploy-job:
stage: deploy
script:
- echo "Deploying application..."
- echo "Application successfully deployed."
......@@ -15,6 +15,7 @@ gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
gem 'therubyracer'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
......
......@@ -537,6 +537,7 @@ GEM
rdf (~> 3.0)
legato (0.7.0)
multi_json
libv8 (3.16.14.19)
link_header (0.0.8)
linkeddata (3.2.0)
json-ld (~> 3.2)
......@@ -738,6 +739,7 @@ GEM
redis (>= 3.0.4)
redlock (1.2.2)
redis (>= 3.0.0, < 5.0)
ref (2.0.0)
reform (2.5.0)
disposable (>= 0.4.2, < 0.5.0)
representable (>= 2.4.0, < 3.1.0)
......@@ -889,6 +891,9 @@ GEM
temple (0.8.2)
term-ansicolor (1.7.1)
tins (~> 1.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
......@@ -983,6 +988,7 @@ DEPENDENCIES
spring
spring-watcher-listen (~> 2.0.0)
sqlite3 (~> 1.3.0)
therubyracer
turbolinks (~> 5)
twitter-typeahead-rails (= 0.11.1.pre.corejavascript)
tzinfo-data
......
#config/solr_wrapper_test.yml
# version: 6.1.0
version: 8.11.2
port: 8985
instance_dir: tmp/solr-test
solr_options: {
force: true
}
collection:
persist: false
dir: solr/conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment