This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
54 lines (42 loc) · 2.17 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
# 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:
- master
pr: none
pool:
vmImage: 'Ubuntu-20.04'
variables:
- group: 'AWS ECR-PUSH PROD'
#- name: DEPLOY_AWS_ACCESS_KEY_ID // Set in ADO
#- name: DEPLOY_AWS_SECRET_ACCESS_KEY // Set in ADO as a secret
steps:
- task: InstallSSHKey@0
inputs:
hostName: github.com,192.30.253.113 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCSRatCN0LXkS1sWlzphG6FhtZIwvIlx4w4s6U+Z3TZCSnFCDN0tpD20WQ4qkRT8Q/9FvIyXzn6EQihN+hNtDUdnKecEYADCNuo2r2EzZUjYc4nYOQMUcaSCilu4oWiicR+GuEdUTxzWLqW7K6vRcwUKFsq4zpwva/Gr7SZHzT4IichI25UIOTtmWsnQvfPCSGTtwFocmB06WYNgCBsQxB3Y0RF2Q6BzGiKblOwnLhrp8gEJBm9wLdQiYGcumQPuG5ZxtT/d2EfBuj1+cGQmmhb/QVDY1xi5H7hC83IKGFytZDVGibwcQQUIV2proALE3S/DNSEQoi+cRjmvQkNkVv jandr@DKCPH-LR90PUUNN
sshKeySecureFile: tika_rsa
- bash: |
set -eu -o pipefail
sudo pip3 install setuptools
sudo pip3 install awscli
# Configure AWS Creds
export AWS_ACCESS_KEY_ID=$(DEPLOY_AWS_ACCESS_KEY_ID)
export AWS_SECRET_ACCESS_KEY=$(DEPLOY_AWS_SECRET_ACCESS_KEY)
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
cd server
# Use credentials for S3 bucket
aws sts get-caller-identity
make prereqs
# Use credentials for ECR push
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
export AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID)
export AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY)
aws sts get-caller-identity
make release BUILD_NUMBER=$(Build.BuildId)
displayName: 'Build a deployment artifact'
env:
DEPLOY_AWS_ACCESS_KEY_ID: $(DEPLOY_AWS_ACCESS_KEY_ID)
DEPLOY_AWS_SECRET_ACCESS_KEY: $(DEPLOY_AWS_SECRET_ACCESS_KEY)