forked from python-discord/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
92 lines (70 loc) · 2.28 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# https://aka.ms/yaml
variables:
PIPENV_HIDE_EMOJIS: 1
PIPENV_IGNORE_VIRTUALENVS: 1
PIPENV_NOSPIN: 1
PIPENV_VENV_IN_PROJECT: 1
jobs:
- job: test
displayName: 'Lint & Test'
pool:
vmImage: 'Ubuntu 16.04'
variables:
PIPENV_CACHE_DIR: ".cache/pipenv"
PIP_CACHE_DIR: ".cache/pip"
steps:
- script: |
sudo apt-get update
sudo apt-get install autoconf automake build-essential cmake curl libtool nodejs ruby-full ruby-dev
displayName: 'Install base dependencies'
- script: |
sudo apt-get install rabbitmq-server
sudo service rabbitmq-server start
displayName: 'Install and start RabbitMQ'
- script: |
source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb
mkdir ./rdb
sudo rethinkdb create -d ./rdb
sudo rethinkdb serve --daemon -d ./rdb
displayName: 'Install and start RethinkDB'
- task: UsePythonVersion@0
displayName: 'Set Python version'
inputs:
versionSpec: '3.6.x'
addToPath: true
- script: sudo pip install pipenv
displayName: 'Install pipenv'
- script: sudo gem install scss_lint
displayName: 'Install SCSS linter'
- script: sudo npm install -g eslint gulp-cli
displayName: 'Install ESLint and gulp'
- script: pipenv install --dev --deploy
displayName: 'Install project using pipenv'
- script: pipenv run lint
displayName: 'Lint Python'
- script: pipenv run lintjs
displayName: 'Lint JS'
- script: pipenv run lintscss
displayName: 'Lint SCSS'
- script: pipenv run python gunicorn_config.py
displayName: 'Set up database'
- script: pipenv run test
displayName: 'Run tests'
- job: build
displayName: 'Build Containers'
dependsOn: 'test'
steps:
- task: Docker@1
displayName: 'Login: Docker Hub'
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'DockerHub'
command: 'login'
- task: ShellScript@2
displayName: 'Build and deploy containers'
inputs:
scriptPath: scripts/deploy.sh
args: '$(AUTODEPLOY_TOKEN) $(AUTODEPLOY_WEBHOOK)'