travis-ci: trigger a build in the other repository instead of cloning and building it here

This commit is contained in:
Dana Van Aken 2020-01-23 14:06:04 -05:00
parent 6f0fcfd952
commit 0cbc7ba334
3 changed files with 22 additions and 27 deletions

View File

@ -17,20 +17,20 @@ matrix:
include:
- name: Docker
env:
- secure: "JdRlS4MAXv1wMBdQf98r4ugit1v0Emq7S/K3CpyP2jpj0QL0VFhPr/r3GFwq2BRM2y0vXQjD29AoZdiQLv4LULgp4AavcmL3kbD7SNNWileqCLbl3rHdGY1gNW4fYOYCPGMPxntYdm18vpXzoF/A81JUX0MMsw3Wh0dBtiQZQP7O4V+bX5hyuCqlxasfTI0Tl323MWao86I2nSmExvGTcYlissPKGb0+TS+qQjOshvJHtmv0PRxJ2a45fB1h1wkAqGKu0X7fXWAhoo9uPt4T9+oCW6bCklAZPbzm4wc3jurnQ//jS44ThtP4n+xH2mwwU9n0unMKl3I+so+R7nH7pE0YGTD+p/4p8lPXYCLlqllvuhNTf+JXLJoC+lIgQXl4qhtURPokohPxJXNRQRd1SWOyep85h9svX3Z+c3dj5160bM/ArB8jKuFtL1Cq/S7Je+liF3xE25BaFQ5P2DlVM1KxLbtvtaTAcvkxq/jr4zu7ZMAjJtDmF6hsuzflGYqNcElZlhMNtKoGeAfVNmpXvFoLt0Iezbafvc6izAqn/h6A+FKnCgmlOit+TyihqnAtIhj+TBgyOw0TFqJ4QKAb3pqL+FxFrH78yR/HGafNHBfvi6ND3b9BefQ0in2RimSSZbE90pdnxhtSxKUDch3hBd4Q0RxZbA/rRyiKQexxE9M="
- secure: "MdkCbzD+Toqrnz++93EUDf7hOgkP4h8rU42lnHQ5iShnlnwYzMmI90jCFwF5DYThmaDleBn54EB8lsaFcdmjhrhPWPkDhcRZgRAdfCwq+OIV1lH3KbVwBeLnnfKeci+TNldWinoOgS3cFkz+uXm8tFcRZgGJ/IW8Tu/oD9QWZixP7Zyfp28GMzm+6Hmb1lVbpsnMwiKQQSyPQTv9NB4jG1pzvP45cID1WrmgZFYhpDWOr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FrO0+JX7Z47hkeXcqJN4LxP3R4BQgZZQCtYpXYfMAEvPs+nJp7IOQ6cTe80Xiz9eAD3385Hpcmz7tiZcgnnc/Eys90RqjK1GZyWRfeekXVvz39e08goW2y4W5DXZWGQ6QDqLr3Wrg7aK6A9e01otNxJGs8eqd12wzkeSiYi8l96taUnLKW9uUIMhhdoDPrHt4o6BjeWmW7OWzWbppcd3oV1IrUo2WngBsamUohL8PYilt/aEDItsdgLb7RBkFoP0prAlOUIPW6Plk34rk4Sk03KFxeBWSXULE+DgGlJZCFobj8MgxW9IQnJBg3Gk6nmadWAA831Aa3LzmC3dhShwQzFrGAxw/xeVHxodUDD0lwVb1UA4EZJuuNCr4/oyDqgjUcSiTHvR+wLdMFzG0+ySnxtoYt+hmTZJaV6ZffFMn8MIdR1tz+W56H+BwJeDxCpGhBuzyYDFDWH3u5Q08lBK3icgpG6wqfCCaZpjCOuGL8GIMkOEtznmGrrYzqsgJ0AbGizahXIQ57Qh/Wob0qVKGXnDqz6jxPH99aRugNa+snp+SaChz6Q5ojY1bbe4jIW03iOY1m51394A="
- DOCKER_REPO="${DOCKER_USER}/ottertune"
- GIT_REPO="ottertune-driver-internal"
services:
- docker
before_install:
- docker --version
- docker-compose --version
- env | sort
install: []
install: true
before_script:
- sudo service mysql stop || true
- sudo service postgresql stop || true
@ -48,7 +48,7 @@ matrix:
- docker-compose -f $dcfile_postgres rm -f -s -v
- docker-compose -f $dcfile_mysql run --rm web bash -c "./wait-for-it.sh && python3 manage.py makemigrations website && python3 manage.py test --noinput -v 2"
- docker-compose -f $dcfile_mysql rm -f -s -v
after_success: []
after_success: true
before_deploy:
- /$ROOT/.travis/before_deploy.sh
deploy:
@ -57,6 +57,10 @@ matrix:
on:
repo: cmu-db/ottertune
branch: master
after_deploy:
- curl -LO --retry 3 https://raw.github.com/mernst/plume-lib/master/bin/trigger-travis.sh
- sh trigger-travis.sh --pro --branch master "$TRIGGER_USER" "$TRIGGER_REPO" "$TRIGGER_TOKEN"
- docker logout
- name: Unit Tests (MySQL v5.7)
env:
@ -114,7 +118,7 @@ matrix:
script:
- cd $WEB && python manage.py runserver 0.0.0.0:8000 &
- sleep 10 && cd $DRIVER && fab integration_tests
after_success: []
after_success: true
- name: Integration Tests (PostgreSQL v9.6)
env:
@ -132,7 +136,7 @@ matrix:
script:
- cd $WEB && python manage.py runserver 0.0.0.0:8000 &
- sleep 10 && cd $DRIVER && fab integration_tests
after_success: []
after_success: true
install:
- pip install -r $WEB/requirements.txt

View File

@ -1,17 +1,10 @@
#!/bin/bash
cd $ROOT/docker
mkdir tmp
cd tmp
git clone "https://${GIT_TOKEN}@github.com/${GIT_ORG}/${GIT_REPO}"
cd $GIT_REPO
cp $ROOT/docker/install.sh $WEB/requirements.txt .
git_commit=`git log --format="%H" -n 1`
docker-compose -f docker-compose.build.yml build --build-arg GIT_COMMIT="$git_commit"
set -ex
for tag in base web driver; do
docker tag "ottertune-${tag}" "${DOCKER_REPO}:${tag}"
done
docker tag ottertune-base "${DOCKER_REPO}:base"
docker tag ottertune-web "${DOCKER_REPO}:web"
docker tag ottertune-driver "${DOCKER_REPO}:driver"
docker tag ottertune-driver-internal "${DOCKER_REPO}:driver-internal"
echo "$DOCKER_PASSWD" | docker login -u "$DOCKER_USER" --password-stdin

View File

@ -1,9 +1,7 @@
#!/bin/bash
images="base web driver driver-internal"
set -ex
for img in $images
do
docker push "${DOCKER_REPO}:${img}"
for tag in base web driver; do
docker push "${DOCKER_REPO}:${tag}"
done