2018-06-20 04:22:35 +02:00
|
|
|
sudo: required
|
2017-10-16 05:35:58 +02:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
2018-06-20 00:22:18 +02:00
|
|
|
- "8.11.1"
|
2018-06-26 01:13:31 +02:00
|
|
|
python:
|
|
|
|
- "3.4"
|
|
|
|
- "pypy-5.3.1"
|
2018-06-20 00:22:18 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
# eventually set up AWS stuff here
|
2018-06-20 19:01:11 +02:00
|
|
|
- docker-compose -f docker-compose-development.yml up -d
|
2018-06-20 00:22:18 +02:00
|
|
|
- docker ps -a
|
|
|
|
|
2018-06-20 05:01:04 +02:00
|
|
|
install: true
|
|
|
|
|
2018-06-20 04:22:35 +02:00
|
|
|
script:
|
|
|
|
# Run unit tests in the app container
|
|
|
|
- docker-compose exec -T app npm run test --verbose
|
|
|
|
|
2018-06-20 19:01:11 +02:00
|
|
|
after_success:
|
2018-06-26 01:13:31 +02:00
|
|
|
# only run this if on the master branch eventually, not while testing tho
|
2018-06-27 04:05:08 +02:00
|
|
|
# - sudo apt-get install -y python3.4
|
|
|
|
# - sudo apt-get install --upgrade -y python-pip
|
|
|
|
# - sudo apt-get install jq
|
|
|
|
# - sudo pip install --user virtualenv
|
|
|
|
# # Create a virtual environment for AWS CLI
|
|
|
|
# - virtualenv my_py3 --python=/usr/bin/python3.4
|
|
|
|
# - source my_py3/bin/activate
|
|
|
|
# - pip install --upgrade awscli
|
|
|
|
# - pip install --upgrade awsebcli
|
|
|
|
# # Set AWS information
|
|
|
|
# - aws configure set aws_access_key_id $AWS_ACCESS_KEY
|
|
|
|
# - aws configure set aws_secret_access_key $AWS_SECRET_KEY
|
|
|
|
# - aws configure set default.region $AWS_REGION
|
|
|
|
# - aws configure set metadata_service_timeout 1200
|
|
|
|
# - aws configure set metadata_service_num_attempts 3
|
|
|
|
# - aws configure list
|
2018-06-26 01:13:31 +02:00
|
|
|
# build images
|
2018-06-20 19:01:11 +02:00
|
|
|
- docker-compose stop
|
2018-06-20 20:29:13 +02:00
|
|
|
- docker-compose build --no-cache
|
2018-08-13 21:28:44 +02:00
|
|
|
- docker image ls
|
2018-06-20 20:29:13 +02:00
|
|
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
2018-07-03 03:08:00 +02:00
|
|
|
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
|
|
|
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
2018-06-20 20:29:13 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2018-06-20 22:34:09 +02:00
|
|
|
- APP_IMAGE_NAME=p5jswebeditor_app
|