atst/.travis.yml
Devon Mackay 1430ed79b3 Modify submodule config on Travis before update
I guess this is a known issue when using Travis and SSH-based
submodules. The other option is to change the submodule config to be
HTTPS-based, but this should work.
2018-07-13 09:16:00 -04:00

38 lines
1.1 KiB
YAML

sudo: required
language: python
python: "3.6"
services: docker
git:
submodules: false
env:
global:
- TESTER_IMAGE_NAME=atst-tester
- PROD_IMAGE_NAME=atst-prod
before_install:
# Use sed to replace the SSH URL with the public URL
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
# Manually initialize submodules
- git submodule update --init --recursive
before_script:
- docker login -u $ATAT_DOCKER_REGISTRY_USERNAME -p $ATAT_DOCKER_REGISTRY_PASSWORD $ATAT_DOCKER_REGISTRY_URL
- docker build --tag "${TESTER_IMAGE_NAME}" . -f deploy/docker/tester/Dockerfile
script:
- docker run "${TESTER_IMAGE_NAME}"
before_deploy:
- docker build --tag "${PROD_IMAGE_NAME}" . -f deploy/docker/prod/Dockerfile
- git_sha="$(git rev-parse --short HEAD)"
- remote_image_name="${ATAT_DOCKER_REGISTRY_URL}/${PROD_IMAGE_NAME}:${git_sha}"
- docker tag "${PROD_IMAGE_NAME}" "${remote_image_name}"
- docker images
- docker push "${remote_image_name}"
deploy:
provider: script
script: echo "** Image push only for now... stay tuned! **"
on:
branch: master