Commit bd873085 authored by Zac Wood's avatar Zac Wood

updated CI

parent ffa2d3d5
Pipeline #2945 failed with stage
in 2 minutes and 11 seconds
......@@ -2,38 +2,17 @@ stages:
- test
- build
test_api:
test:
image: ruby:2.5
stage: test
script:
- cd schedules_api
- cd schedules
- bundle install
- rails db:migrate
- rails test
- rubocop
test_web:
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:
build:
stage: build
retry: 2
image:
......@@ -42,6 +21,6 @@ build_api:
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_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:
- tags
class HomeController < ApplicationController
def index
end
def index; end
end
......@@ -10,6 +10,6 @@ Rails.application.routes.draw do
end
apipie # sets up API docs
root to: 'home#index'
end
......@@ -5,5 +5,4 @@ class HomeControllerTest < ActionDispatch::IntegrationTest
get home_index_url
assert_response :success
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