Skip to content

Commit e054a2c

Browse files
committed
running tests, outside containers
1 parent 69be42c commit e054a2c

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

.circleci/config.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ jobs:
33
build:
44
machine: true
55
working_directory: ~/apache
6+
parallelism: 3
67
steps:
78
- checkout
89

@@ -12,30 +13,46 @@ jobs:
1213
echo "Building Docker Image"
1314
docker build -t htmlgraphic/apache:envoyer .
1415
15-
# WORKS TO HERE
16+
17+
# DEV Build
1618

1719
- run:
18-
name: Start Container & Verify
20+
name: Start DEV Container
1921
command: |
2022
set -x
2123
ls -la
2224
pwd
2325
make run
2426
docker ps -a
2527
26-
27-
2828
- run:
29-
name: Build Tests
29+
name: DEV Build Tests
3030
command: |
31-
bash -c /opt/tests/build_tests.sh
31+
docker exec -it apache_web_1 /bin/bash /opt/tests/build_tests.sh
3232
3333
- run: |
3434
docker logs apache_web_1 > log_output
3535
mv log_output $CIRCLE_ARTIFACTS/log_output.txt
3636
37+
- run:
38+
name: Kill running containers
39+
command: |
40+
make stop && make rm
41+
42+
43+
# LIVE Build
44+
45+
- run:
46+
name: Start LIVE Container
47+
command: |
48+
docker-compose up -d
49+
docker ps -a
50+
51+
- run:
52+
name: LIVE Build Tests
53+
command: |
54+
docker exec -it apache_web_1 /bin/bash /opt/tests/build_tests.sh
55+
3756
- run: |
38-
docker-compose up -d; sleep 5
39-
docker run -d --name apache_web_1
40-
bash -c /opt/tests/build_tests.sh
41-
docker ps -a
57+
docker logs apache_web_1 > log_output
58+
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 a base env template' && cp .env.example .env || echo "env file exists"
38+
[ ! -f .env ] && echo '.env2 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)