Seperate dev and prod builds
This commit is contained in:
@@ -32,6 +32,16 @@ sass:lint:
|
||||
ts:build:
|
||||
image: node:12
|
||||
stage: build
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- API_URL=http://web.sik.party:8000 npm run build
|
||||
|
||||
prod:build:
|
||||
image: node:12
|
||||
stage: build
|
||||
only:
|
||||
- production
|
||||
script:
|
||||
- API_URL=https://sika.sik.party/api npm run build
|
||||
|
||||
@@ -44,6 +54,8 @@ ts:build:
|
||||
test:e2e:
|
||||
image: circleci/node:12-browsers
|
||||
stage: test
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- npm run test:e2e
|
||||
|
||||
@@ -60,6 +72,19 @@ publish:
|
||||
- docker build . -t "$IMAGE_NAME"
|
||||
- docker push "$IMAGE_NAME"
|
||||
|
||||
publish_prod:
|
||||
stage: publish
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:stable-dind
|
||||
only:
|
||||
- production
|
||||
script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":prod
|
||||
- docker push "$IMAGE_NAME":prod
|
||||
|
||||
deploy_dev:
|
||||
stage: deploy
|
||||
image: alpine:latest
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ version: '3.4'
|
||||
|
||||
services:
|
||||
frontend:
|
||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-frontend:latest
|
||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-frontend:prod
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
|
||||
Reference in New Issue
Block a user