forked from 5afe/safe-relay-service
-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yml
70 lines (58 loc) · 2.05 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
batch: false
branches:
include:
- master
# Disable PR trigger
pr: none
pool:
vmImage: 'ubuntu-latest'
variables:
- group: aws-credentials
steps:
- task: Docker@1
displayName: docker login
inputs:
command: login
containerRegistryType: Container Registry
dockerRegistryEndpoint: dockerhub-augurproject
- bash: |
set -exuo pipefail
docker-compose build
docker images
displayName: 'docker compose build'
- bash: |
docker tag s_scheduler:latest augurproject/safe-relay-service_scheduler:latest
docker tag s_web:latest augurproject/safe-relay-service_web:latest
docker tag s_worker:latest augurproject/safe-relay-service_worker:latest
docker push augurproject/safe-relay-service_scheduler:latest
docker push augurproject/safe-relay-service_web:latest
docker push augurproject/safe-relay-service_worker:latest
displayName: 'docker compose push'
condition: succeeded()
- task: Docker@1
displayName: docker logout
inputs:
command: logout
containerRegistryType: Container Registry
dockerRegistryEndpoint: dockerhub-augurproject
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
- bash: |
set -euo pipefail
python3 -m venv venv && \
source venv/bin/activate && \
python3 -m pip install --no-cache-dir awscli
aws --region=us-east-1 ecs update-service --service gnosis-web --cluster kovan-v2-ecs --force-new-deployment
aws --region=us-east-1 ecs update-service --service gnosis-scheduler --cluster kovan-v2-ecs --force-new-deployment
aws --region=us-east-1 ecs update-service --service gnosis-worker --cluster kovan-v2-ecs --force-new-deployment
displayName: 'push build to aws'
condition: succeeded()
env:
AWS_ACCESS_KEY_ID: $(AWS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_KEY)