File tree Expand file tree Collapse file tree 4 files changed +18
-14
lines changed Expand file tree Collapse file tree 4 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 16
16
- run :
17
17
name : Build Apache Docker image
18
18
command : |
19
+ cp .env.example .env
19
20
make build
20
21
21
22
31
32
docker ps -a
32
33
sleep 10
33
34
34
- - run : mkdir -p ~/logs/container-build
35
-
36
- - run :
37
- name : Container Logs
38
- command : |
39
- docker logs apache > ~/logs/container-build/log_output-DEV.txt
40
-
41
35
- run :
42
36
name : Global Environment Vars
43
37
command : |
48
42
command : |
49
43
docker exec apache /bin/bash /opt/tests/build_tests.sh
50
44
45
+ - run :
46
+ name : Container Logs
47
+ command : |
48
+ mkdir -p ~/project/container-build
49
+ docker logs apache > ~/project/container-build/log_output-DEV_Apache.txt
50
+ docker logs apache_db > ~/project/container-build/log_output-DEV_MySQL.txt
51
51
52
52
- run :
53
53
name : Kill running containers
@@ -60,26 +60,28 @@ jobs:
60
60
- run :
61
61
name : Start LIVE Container
62
62
command : |
63
- docker-compose up -d
63
+ docker-compose --project-name apache up -d
64
64
docker ps -a
65
65
sleep 10
66
66
67
67
- run :
68
68
name : LIVE Build Tests
69
69
command : |
70
- docker exec apache /bin/bash /opt/tests/build_tests.sh
70
+ docker exec apache_hg-web_1 /bin/bash /opt/tests/build_tests.sh
71
71
72
72
- run :
73
73
name : Container Logs
74
74
command : |
75
- docker logs apache > ~/logs/container-build/log_output-LIVE.txt
75
+ mkdir -p ~/project/container-build
76
+ docker logs apache_hg-web_1 > ~/project/container-build/log_output-LIVE_Apache.txt
77
+ docker logs apache_hg-db_1 > ~/project/container-build/log_output-LIVE_MySQL.txt
76
78
77
79
78
80
79
81
- store_artifacts :
80
- path : ~/logs /container-build
82
+ path : ~/project /container-build
81
83
destination : raw-test-output
82
84
83
85
- store_test_results :
84
- path : ~/logs /container-build
86
+ path : ~/project /container-build
85
87
Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ restart: stop start
69
69
70
70
rm :
71
71
@echo " On remove, containers are specifally referenced, as to not destroy ANY persistent data"
72
- @echo " Removing $( NAME) and $( NAME) _db_1 "
72
+ @echo " Removing $( NAME) and $( NAME) _db "
73
73
docker rm -f $(NAME )
74
- docker rm -f $(NAME ) _db_1
74
+ docker rm -f $(NAME ) _db
75
75
76
76
state :
77
77
docker ps -a | grep $(NAME )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ services:
17
17
- .env
18
18
db :
19
19
image : ' htmlgraphic/mysql:5.7.18'
20
+ container_name : apache_db
20
21
volumes :
21
22
- " db-data:/var/lib/mysql"
22
23
ports :
Original file line number Diff line number Diff line change 9
9
10
10
build :
11
11
pre_ci :
12
+ - cp .env.example .env
12
13
- make build
13
14
pre_ci_boot :
14
15
image_name : htmlgraphic/apache
You can’t perform that action at this time.
0 commit comments