Skip to content

Commit f5782e5

Browse files
committed
project name & log correction, circleci
1 parent 3532ed7 commit f5782e5

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

.circleci/config.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- run:
1717
name: Build Apache Docker image
1818
command: |
19+
cp .env.example .env
1920
make build
2021
2122
@@ -31,13 +32,6 @@ jobs:
3132
docker ps -a
3233
sleep 10
3334
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-
4135
- run:
4236
name: Global Environment Vars
4337
command: |
@@ -48,6 +42,12 @@ jobs:
4842
command: |
4943
docker exec apache /bin/bash /opt/tests/build_tests.sh
5044
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
5151
5252
- run:
5353
name: Kill running containers
@@ -60,26 +60,28 @@ jobs:
6060
- run:
6161
name: Start LIVE Container
6262
command: |
63-
docker-compose up -d
63+
docker-compose --project-name apache up -d
6464
docker ps -a
6565
sleep 10
6666
6767
- run:
6868
name: LIVE Build Tests
6969
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
7171
7272
- run:
7373
name: Container Logs
7474
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
7678
7779
7880
7981
- store_artifacts:
80-
path: ~/logs/container-build
82+
path: ~/project/container-build
8183
destination: raw-test-output
8284

8385
- store_test_results:
84-
path: ~/logs/container-build
86+
path: ~/project/container-build
8587

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ restart: stop start
6969

7070
rm:
7171
@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"
7373
docker rm -f $(NAME)
74-
docker rm -f $(NAME)_db_1
74+
docker rm -f $(NAME)_db
7575

7676
state:
7777
docker ps -a | grep $(NAME)

docker-compose.local.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ services:
1717
- .env
1818
db:
1919
image: 'htmlgraphic/mysql:5.7.18'
20+
container_name: apache_db
2021
volumes:
2122
- "db-data:/var/lib/mysql"
2223
ports:

shippable.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99

1010
build:
1111
pre_ci:
12+
- cp .env.example .env
1213
- make build
1314
pre_ci_boot:
1415
image_name: htmlgraphic/apache

0 commit comments

Comments
 (0)