-
Notifications
You must be signed in to change notification settings - Fork 0
/
dr-restore.yml
38 lines (38 loc) · 1.18 KB
/
dr-restore.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
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
commands:
- python --version
pre_build:
commands:
- export STARTTIME=`date +%s`
- export BUILDNAME="$GIT_BRANCH-`date +%Y-%m-%d`"
- export BRANCH="$GIT_BRANCH"
- export SOURCE_VERSION="$CODEBUILD_SOURCE_VERSION"
- echo "BRANCH $BRANCH"
- echo "SOURCE_VERSION $SOURCE_VERSION"
- $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)
- IMAGE_TAG=build-$(git rev-parse HEAD)
build:
commands:
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- apt-get -y update
- apt-get install -y nfs-common
- echo Build started on `date`
- bash ./datasync.sh $DR_TASK
- mkdir ./data/
- mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport $DR_EFS_DATA:/ ./data/
- chown 1000:1000 -R ./data/
- sleep 3
- echo Deploy Server
- aws ecs update-service --force-new-deployment --service dungeon-revealer --cluster ttrpg-cluster
post_build:
commands:
- echo Build completed on `date`
- pwd
- ls -al
artifacts:
files:
- '**/*'