Commit bd873085 authored by Zac Wood's avatar Zac Wood
Browse files

updated CI

parent ffa2d3d5
Pipeline #2945 failed with stage
in 2 minutes and 11 seconds
...@@ -2,38 +2,17 @@ stages: ...@@ -2,38 +2,17 @@ stages:
- test - test
- build - build
test_api: test:
image: ruby:2.5 image: ruby:2.5
stage: test stage: test
script: script:
- cd schedules_api - cd schedules
- bundle install - bundle install
- rails db:migrate - rails db:migrate
- rails test - rails test
- rubocop - rubocop
test_web: build:
image: node:9
stage: test
script:
- cd schedules_web
- yarn
- yarn build
build_web:
stage: build
retry: 2
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/schedules_web --dockerfile $CI_PROJECT_DIR/schedules_web/Dockerfile --destination $CI_REGISTRY_IMAGE/web:$CI_COMMIT_TAG
only:
- tags
build_api:
stage: build stage: build
retry: 2 retry: 2
image: image:
...@@ -42,6 +21,6 @@ build_api: ...@@ -42,6 +21,6 @@ build_api:
script: script:
- mkdir -p /root/.docker - mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/schedules_api --dockerfile $CI_PROJECT_DIR/schedules_api/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG - /kaniko/executor --context $CI_PROJECT_DIR/schedules --dockerfile $CI_PROJECT_DIR/schedules/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG
only: only:
- tags - tags
class HomeController < ApplicationController class HomeController < ApplicationController
def index def index; end
end
end end
...@@ -10,6 +10,6 @@ Rails.application.routes.draw do ...@@ -10,6 +10,6 @@ Rails.application.routes.draw do
end end
apipie # sets up API docs apipie # sets up API docs
root to: 'home#index' root to: 'home#index'
end end
...@@ -5,5 +5,4 @@ class HomeControllerTest < ActionDispatch::IntegrationTest ...@@ -5,5 +5,4 @@ class HomeControllerTest < ActionDispatch::IntegrationTest
get home_index_url get home_index_url
assert_response :success assert_response :success
end end
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment