-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec-origin.yml
36 lines (34 loc) · 1.28 KB
/
buildspec-origin.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
env:
parameter-store:
docker_user: docker_user
docker_pass: docker_pass
DefaultConnection: DefaultConnection
phases:
install:
commands:
- echo Starting the service
- echo Configuring DB endpoint
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- apt-get install -y nodejs
- npm install newman --global
build:
commands:
- echo Build started on `date`
- echo Building the Docker image
- docker build -t matsskoglund/devkitapi:latest .
post_build:
commands:
- docker network create devkitapinet
- docker network ls
- docker run --net=devkitapinet --name devkitapidb -e MYSQL_ROOT_PASSWORD=mypass -d mariadb
- docker run -e ASPNETCORE_ENVIRONMENT=Staging -e DBCONNECTION=$DefaultConnection --net=devkitapinet --name devkitapi -d -p 5000:5000 matsskoglund/devkitapi:latest
- sleep 15
- newman run "https://raw.githubusercontent.com/matsskoglund/DevkitApi/master/test/DevkitApi.Test_Nondestructive.postman_collection.json"
- docker stop devkitapidb devkitapi
- docker network rm devkitapinet
- docker login -u=$docker_user -p=$docker_pass
- docker push matsskoglund/devkitapi:latest
artifacts:
files:
- imagedefinitions.json