Skip to content
Snippets Groups Projects
Commit 9be1cebc authored by Dean Lovett's avatar Dean Lovett
Browse files

fix: added new gems for users

parent 9eb851d1
No related branches found
No related tags found
No related merge requests found
Pipeline #8468 passed
...@@ -2,7 +2,7 @@ image: docker:latest ...@@ -2,7 +2,7 @@ image: docker:latest
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
IMAGE_NAME: gitlab.nexdev.uk:5555/web-dev/users IMAGE_NAME: gitlab.nexdev.uk:5555/pub/rails-base-image-builder
stages: stages:
- prebuild - prebuild
...@@ -20,7 +20,7 @@ docker_lint: ...@@ -20,7 +20,7 @@ docker_lint:
tags: tags:
- nexus_runner - nexus_runner
build_image: build:
stage: build stage: build
script: script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.nexdev.uk:5555 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.nexdev.uk:5555
...@@ -29,87 +29,6 @@ build_image: ...@@ -29,87 +29,6 @@ build_image:
tags: tags:
- nexus_runner - nexus_runner
rubocop_lint:
variables:
PRONTO_GITLAB_API_ENDPOINT: "https://gitlab.nexdev.uk/api/v4"
stage: testing
image: $IMAGE_NAME:$CI_COMMIT_SHA
script:
- cd /builds/web-dev/users
- git fetch
# - bundle exec pronto run -c=origin/master --exit-code -f gitlab
tags:
- nexus_runner
dependency_scanning:
stage: testing
image: ruby:2.6.2
allow_failure: true
script:
- gem install bundler-audit
- bundle audit check --update
artifacts:
paths: [gl-dependency-scanning-report.json]
tags:
- nexus_runner
test:unit:
stage: testing
image: $IMAGE_NAME:$CI_COMMIT_SHA
services:
- name: postgres:12.2
alias: user_db
- name: mysql:5.6
alias: mysql
variables:
# Set variables for the MySQL image
FW_DB_TEST_HOST: mysql
MYSQL_DATABASE: nexus_api_forum_test
MYSQL_USER: runner
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
OTP_ENC_KEY: 'avQrhpsxSNtx26xdM6M65Z7KUARctq5z'
TWILIO_NUMBER: '+15005550006'
TWILIO_SID: 'ACe28fd8b14f682e46536a3a2910f5ea0e'
TWILIO_TOKEN: 'd117d8463ebf05cf8ed5b9584b1a6d66'
POSTGRES_PASSWORD: password
script:
- bundle exec rake db:create RAILS_ENV=test
- bundle exec rake db:migrate RAILS_ENV=test
- bundle exec rake fw_test_db:import_forum RAILS_ENV=test
- COVERAGE=true bundle exec rspec --format documentation
tags:
- nexus_runner
test:integration:
stage: testing
image: $IMAGE_NAME:$CI_COMMIT_SHA
allow_failure: true
services:
- name: postgres:12.2
alias: user_db
- name: mysql:5.6
alias: mysql
variables:
# Set variables for the MySQL image
FW_DB_TEST_HOST: mysql
MYSQL_DATABASE: nexus_api_forum_test
MYSQL_USER: runner
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
OTP_ENC_KEY: 'avQrhpsxSNtx26xdM6M65Z7KUARctq5z'
TWILIO_NUMBER: '+15005550006'
TWILIO_SID: 'ACe28fd8b14f682e46536a3a2910f5ea0e'
TWILIO_TOKEN: 'd117d8463ebf05cf8ed5b9584b1a6d66'
POSTGRES_PASSWORD: password
script:
- bundle exec rake db:create RAILS_ENV=test
- bundle exec rake db:migrate RAILS_ENV=test
- bundle exec rake fw_test_db:import_forum RAILS_ENV=test
- bundle exec rspec --format documentation --tag integration
tags:
- nexus_runner
release:version: release:version:
image: gitlab.nexdev.uk:5555/pub/nexus-release-image/master image: gitlab.nexdev.uk:5555/pub/nexus-release-image/master
stage: release stage: release
...@@ -118,64 +37,21 @@ release:version: ...@@ -118,64 +37,21 @@ release:version:
- echo "$CI_DEPLOY_KEY" | tr -d '\r' | ssh-add - - echo "$CI_DEPLOY_KEY" | tr -d '\r' | ssh-add -
- ssh-keyscan gitlab.nexdev.uk >> ~/.ssh/known_hosts - ssh-keyscan gitlab.nexdev.uk >> ~/.ssh/known_hosts
script: script:
- /build/release.sh - /build/release.sh --run-tag-pipeline
tags: tags:
- nexus_runner - nexus_runner
only: only:
- master - master
release_staging: release_tag:
stage: release stage: release
script: script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.nexdev.uk:5555 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.nexdev.uk:5555
- docker tag $IMAGE_NAME:$CI_COMMIT_SHA $IMAGE_NAME:staging - docker tag $IMAGE_NAME:$CI_COMMIT_SHA $IMAGE_NAME:$CI_COMMIT_REF_NAME
- docker push $IMAGE_NAME:$CI_COMMIT_SHA - docker push $IMAGE_NAME:$CI_COMMIT_SHA
- docker push $IMAGE_NAME:staging - docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME
only: only:
- staging - tags
tags:
- nexus_runner
deploy_staging:
stage: deploy
image: nexusmods/gitlab-ci-kube-deploy
script:
- mkdir /root/.kube
- echo "$STAGING_KUBE_CONFIG" > /root/.kube/config
- kubectl apply -f deploy/staging
- kubectl -n staging-nexus set image deployment/users users=$IMAGE_NAME:$CI_COMMIT_SHA
environment: staging
when: manual
except:
- master
tags:
- nexus_runner
release:
stage: release
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.nexdev.uk:5555
- docker tag $IMAGE_NAME:$CI_COMMIT_SHA $IMAGE_NAME:latest
- docker push $IMAGE_NAME:$CI_COMMIT_SHA
- docker push $IMAGE_NAME:latest
only:
- release
- master
tags:
- nexus_runner
deploy_production:
stage: deploy
image: nexusmods/gitlab-ci-kube-deploy
script:
- mkdir /root/.kube
- echo "$KUBE_CONFIG" > /root/.kube/config
- kubectl apply -f deploy/production
- kubectl -n production set image deployment/users users=$IMAGE_NAME:$CI_COMMIT_SHA
environment: production
only:
- master
tags: tags:
- nexus_runner - nexus_runner
\ No newline at end of file
FROM ruby:2.6.4-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cmake \
pkg-config \
default-libmysqlclient-dev \
nodejs \
curl \
git \
ruby-dev \
telnet \
nano \
build-essential \
cmake pkg-config \
libpq-dev \
nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app
RUN adduser nexus --system --group -u 1000 && mkdir -p /app
RUN chown -R nexus:nexus /app
USER nexus
WORKDIR /app
COPY --chown=nexus:nexus Gemfile Gemfile.lock ./
RUN bundle config --local build.sassc --disable-march-tune-native && gem install bundler -v 1.17.3 && bundle install --jobs 20 --retry 5
\ No newline at end of file
Gemfile 0 → 100644
source 'https://rubygems.org'
ruby '2.6.4'
gem 'rails', '>= 6.0.3.2'
gem 'puma', '~> 4'
gem 'sass-rails'
gem 'uglifier'
gem 'mini_racer', platforms: :ruby
gem 'coffee-rails'
gem 'graphiql-rails'
gem 'graphql-voyager-rails'
gem 'bootstrap'
gem 'jquery-rails'
gem 'actionpack-cloudflare'
gem 'turbolinks', '~> 5'
gem 'pronto-rubocop'
gem 'rubocop'
gem 'rubocop-shopify', require: false
gem 'maxmind-db'
gem 'mysql2'
gem 'pg'
gem 'bunny', '>= 2.14.0'
gem 'premailer-rails'
gem 'devise', '~> 4.7'
gem 'devise-argon2', '~> 1.1.0'
gem 'devise-encryptable', '~> 0.2.0'
gem 'devise-two-factor'
gem 'doorkeeper', '~> 5.1'
gem 'doorkeeper-jwt', '~> 0.4.0'
gem 'rqrcode_png'
gem 'twilio-ruby', '~> 5.26'
gem 'active_model_serializers', '~> 0.10'
gem 'stripe'
gem 'hcaptcha', git: 'git://github.com/Nexus-Mods/hcaptcha.git'
gem 'bunny_events', '~> 0.3.0'
gem 'country_select', '~> 4.0'
gem 'rack-cors'
gem 'ruby-mailchecker'
gem 'httparty'
gem 'useragent'
gem 'ddtrace'
gem 'rack-attack', '~> 6.3'
gem 'dotenv-rails'
gem 'redis-rails'
gem 'ipstack'
gem 'vatlayer', '~> 0.3.5'
gem 'braintree', '~> 2.103'
gem 'nexus_cqrs'
gem 'graphql', '~> 1.10.0'
gem 'graphql-guard'
gem 'pundit'
gem 'batch-loader', '1.4.1'
group :test do
gem 'bunny-mock'
gem 'factory_bot_rails'
gem 'faker', git: 'git://github.com/stympy/faker.git', branch: 'master'
gem 'rails-controller-testing'
gem 'rspec-rails', '~> 4.0'
gem 'shoulda-matchers'
gem 'simplecov', require: false
gem 'webmock'
end
group :development do
gem 'listen', '~> 3.0.5'
gem 'web-console', '>= 3.3.0'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test , :development do
gem 'byebug', platform: :mri
gem 'guard', '~>2.14.2',require:false
gem 'guard-livereload','~>2.5.2', require: false
gem 'guard-minitest', '~>2.4.6', require: false
gem 'rack-livereload'
gem 'foreman'
gem 'sinatra'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
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