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