Skip to content

Commit 8c3f37e

Browse files
committed
load website directly
adding pause seperating run commands specific location for logs
1 parent 95d6edf commit 8c3f37e

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

.circleci/config.yml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ jobs:
33
build:
44
machine: true
55
working_directory: ~/apache
6-
environment:
7-
CIRCLE_ARTIFACTS: ~/logs/container-build
86

97
steps:
108
- checkout
119

1210
- run:
13-
name: Build Docker image
11+
name: Build Apache Docker image
1412
command: |
15-
echo "Building Docker Image"
1613
docker build -t htmlgraphic/apache:envoyer .
1714
1815
@@ -26,24 +23,23 @@ jobs:
2623
pwd
2724
make run
2825
docker ps -a
26+
sleep 10
2927
3028
31-
- run: |
32-
mkdir -p $CIRCLE_ARTIFACTS
33-
docker logs apache_web_1 > $CIRCLE_ARTIFACTS/log_output.txt
29+
- run: mkdir -p ~/apache/logs/container-build
3430

3531
- run:
36-
name: DEV Build Tests
32+
name: Container Logs
3733
command: |
38-
docker exec apache_web_1 /bin/bash -c "/usr/bin/wget -q -O- http://127.0.0.1"
34+
docker logs apache_web_1 > ~/apache/logs/container-build/log_output-DEV.txt
3935
4036
- run:
41-
name: DEV Build Tests 1
37+
name: Global Environment Vars
4238
command: |
4339
docker exec apache_web_1 /bin/bash -c "export"
4440
4541
- run:
46-
name: DEV Build Tests 2
42+
name: DEV Build Tests
4743
command: |
4844
docker exec apache_web_1 /bin/bash /opt/tests/build_tests.sh
4945
@@ -54,28 +50,31 @@ jobs:
5450
make stop && make rm
5551
5652
53+
# LIVE Build
5754

58-
- store_artifacts:
59-
path: ~/logs/container-build
60-
destination: raw-test-output
55+
- run:
56+
name: Start LIVE Container
57+
command: |
58+
docker-compose up -d
59+
docker ps -a
60+
sleep 10
6161
62-
- store_test_results:
63-
path: ~/logs/container-build
62+
- run:
63+
name: LIVE Build Tests
64+
command: |
65+
docker exec apache_hg-web_1 /bin/bash /opt/tests/build_tests.sh
6466
67+
- run:
68+
name: Container Logs
69+
command: |
70+
docker logs apache_hg-web_1 > ~/apache/logs/container-build/log_output-LIVE.txt
6571
66-
# LIVE Build
6772
68-
# - run:
69-
# name: Start LIVE Container
70-
# command: |
71-
# docker-compose up -d
72-
# docker ps -a
7373
74-
# - run:
75-
# name: LIVE Build Tests
76-
# command: |
77-
# docker exec -it apache_web_1 /bin/bash /opt/tests/build_tests.sh
74+
- store_artifacts:
75+
path: ~/apache/logs/container-build
76+
destination: raw-test-output
77+
78+
- store_test_results:
79+
path: ~/apache/logs/container-build
7880

79-
# - run: |
80-
# docker logs apache_web_1 > log_output
81-
# mv log_output $CIRCLE_ARTIFACTS/log_output-LIVE.txt

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ push:
3535
docker push $(IMAGE_NAME):$(VERSION)
3636

3737
run:
38-
[ ! -f .env ] && echo '.env2 file does not exist, copy env template' && cp .env.example .env || echo "env file exists"
38+
[ ! -f .env ] && echo '.env file does not exist, copy env template' && cp .env.example .env || echo "env file exists"
3939
docker-compose -f docker-compose.local.yml up -d
4040

4141
start: run

0 commit comments

Comments
 (0)