Add remark
This commit is contained in:
+22
-13
@@ -1,12 +1,5 @@
|
||||
image: python:3.5
|
||||
|
||||
services:
|
||||
- postgres:latest
|
||||
|
||||
variables:
|
||||
POSTGRES_DB: ci
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
IMAGE_NAME: "86.50.143.82:5000/web20:latest"
|
||||
|
||||
stages:
|
||||
- test
|
||||
@@ -15,8 +8,14 @@ stages:
|
||||
- deploy
|
||||
|
||||
test:
|
||||
image: python:3.5
|
||||
stage: test
|
||||
services:
|
||||
- postgres:latest
|
||||
variables:
|
||||
POSTGRES_DB: ci
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
|
||||
script:
|
||||
- python -V
|
||||
@@ -28,6 +27,7 @@ test:
|
||||
- python manage.py test
|
||||
|
||||
pep8:
|
||||
image: python:3.5
|
||||
stage: lint
|
||||
script:
|
||||
- pip install pep8
|
||||
@@ -36,9 +36,18 @@ pep8:
|
||||
eslint:
|
||||
image: node:7.10.0
|
||||
stage: lint
|
||||
before_script:
|
||||
- npm install
|
||||
script:
|
||||
- npm install -g eslint
|
||||
- eslint .
|
||||
- npm run eslint
|
||||
|
||||
remark:
|
||||
image: node:7.10.0
|
||||
stage: lint
|
||||
before_script:
|
||||
- npm install
|
||||
script:
|
||||
- npm run remark
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
@@ -48,8 +57,8 @@ publish:
|
||||
before_script:
|
||||
- docker info
|
||||
script:
|
||||
- docker build . -t 86.50.143.82:5000/web20:latest
|
||||
- docker push 86.50.143.82:5000/web20:latest
|
||||
- docker build . -t "$IMAGE_NAME"
|
||||
- docker push "$IMAGE_NAME"
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
@@ -67,5 +76,5 @@ deploy:
|
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
script:
|
||||
- scp docker-compose.yml $SSH_USER@web.sik.party:~/deployment/docker-compose.yml
|
||||
- ssh $SSH_USER@web.sik.party 'cd deployment && docker-compose down && docker-compose pull web20:latest && docker-compose up -d'
|
||||
- ssh $SSH_USER@web.sik.party 'cd deployment && docker-compose down && docker-compose pull "$IMAGE_NAME" && docker-compose up -d'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user