Skip to content

Commit 877b037

Browse files
author
Kai Hendry
committed
Don't do tests in the Dockerfile as it would require a truck ton more
depedencies https://techoverflow.net/2018/06/05/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-object-file-no-such-file-or-directory/ So strategy is to do CI in Travis, CD via Docker
1 parent 5b9a921 commit 877b037

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.travis.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
language: generic
1+
language: node_js
22
services:
33
- docker
44

@@ -7,15 +7,29 @@ env:
77
- IMAGE_TAG=${TRAVIS_COMMIT::7}
88

99
before_install:
10+
- curl https://install.meteor.com | /bin/sh
11+
- export PATH="$HOME/.meteor:$PATH"
1012
- pip install --user awscli
1113
- export PATH=$PATH:$HOME/.local/bin
14+
# Used in deploy.sh
1215
- curl -o $HOME/.local/bin/ecs-cli
1316
https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest &&
1417
chmod +x $HOME/.local/bin/ecs-cli
1518

19+
cache:
20+
directories:
21+
- node_modules
22+
23+
install:
24+
- meteor npm install
25+
26+
script:
27+
- npm t
28+
1629
after_success:
17-
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
1830
- docker build -t $DOCKER_CI_REPO_NAME:latest .
31+
# TODO: this should only happen really on branch = master
32+
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
1933
- docker tag $DOCKER_CI_REPO_NAME:latest $DOCKER_CI_REPO_NAME:$IMAGE_TAG
2034
- docker push $DOCKER_CI_REPO_NAME:latest
2135
- docker push $DOCKER_CI_REPO_NAME:$IMAGE_TAG
@@ -53,8 +67,8 @@ matrix:
5367
script: PROFILE=$AWS_PROFILE_PROD
5468
AWS_ACCESS_KEY_ID=$AWS_ACCOUNT_USER_ID_PROD
5569
AWS_SECRET_ACCESS_KEY=$AWS_ACCOUNT_SECRET_PROD
56-
AWS_REGION=$AWS_DEFAULT_REGION .
57-
/deploy.sh -p &&
70+
AWS_REGION=$AWS_DEFAULT_REGION
71+
./deploy.sh -p &&
5872
AWS_ACCESS_KEY_ID=$AWS_ACCOUNT_USER_ID_PROD
5973
AWS_SECRET_ACCESS_KEY=$AWS_ACCOUNT_SECRET_PROD
6074
aws cloudfront create-invalidation --distribution-id E173XT6X8V4A18 --paths '/*'

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ENV PATH="/home/node/.meteor:${PATH}"
1515
WORKDIR $SRC_DIR
1616
RUN npm i
1717
RUN meteor npm install --production
18-
RUN npm t
1918
RUN meteor build --server-only --directory $BUNDLE_DIR
2019
RUN cd ${BUNDLE_DIR}/bundle/programs/server && npm install
2120

0 commit comments

Comments
 (0)