-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
36 lines (33 loc) · 1.58 KB
/
buildspec.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
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
docker: 18
commands:
- yum update -y
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &
- timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
pre_build:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
- TAG=$(echo $CODEBUILD_WEBHOOK_TRIGGER | cut -c 5-15)
- IMAGE_TAG=${TAG:=latest}
- echo $IMAGE_TAG
- echo Build started on `date`
- echo Building the Docker image...
- docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG . -f Dockerfile
- docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
- echo Build completed on `date`
build:
commands:
-echo Executing Robot framework for Automated testing
-NOW=$( date '+%s' )
-docker run -v /var/www/test:/app/results -it $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME /app/entrypoint.sh TA_$NOW 1,2,3,4,5
post_build:
commands:
-echo Robot Framework Automated testing execution is completed.
-echo The reports and output file is hosted on
-echo http://results.test.stv.amagi.tv/
-echo The folder name is `date`