-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support tagged releases in Travis, Ansible
This configures Travis to deploy Docker containers with tags matching the built tag on the master branch. It also adds an Ansible variable called `app_version` that can be used to specify which Docker container gets deployed when running production deployments. In development, tags are not used, only `latest` is used.
- Loading branch information
Showing
14 changed files
with
92 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
for image in app editor web gradle analysis; | ||
do | ||
docker push "quay.io/azavea/driver-${image}:${TRAVIS_COMMIT:0:7}" | ||
docker tag "quay.io/azavea/driver-${image}:${TRAVIS_COMMIT:0:7}" "quay.io/azavea/driver-${image}:latest" | ||
docker push "quay.io/azavea/driver-${image}:latest" | ||
done | ||
|
||
# TODO: The below was for deploying to our staging environment, which we no longer have. | ||
# If staging is ever resurrected, we can re-enable this. | ||
# Set up group vars | ||
#echo "setting up group vars..." | ||
#set +x | ||
#grep -v nominatim_key deployment/ansible/group_vars/all.example \ | ||
# > deployment/ansible/group_vars/all | ||
#echo "web_js_nominatim_key: \"${NOMINATIM_API_KEY}\"" \ | ||
# >> deployment/ansible/group_vars/all | ||
#echo "oauth_client_id: \"${OAUTH_CLIENT_ID}\"" \ | ||
# >> deployment/ansible/group_vars/all | ||
#echo "oauth_client_secret: \"${OAUTH_CLIENT_SECRET}\"" \ | ||
# >> deployment/ansible/group_vars/all | ||
#echo "forecast_io_api_key: \"${FORECAST_IO_API_KEY}\"" \ | ||
# >> deployment/ansible/group_vars/all | ||
#echo "keystore_password: \"${DRIVER_KEYSTORE_PASSWORD}\"" \ | ||
# >> deployment/ansible/group_vars/all | ||
#set -x | ||
|
||
#ansible-galaxy install -f -r deployment/ansible/roles.yml -p deployment/ansible/roles | ||
|
||
#chmod 0600 deployment/driver.pem | ||
|
||
#ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook \ | ||
# -i deployment/ansible/inventory/staging \ | ||
# --private-key="${TRAVIS_BUILD_DIR}/deployment/driver.pem" \ | ||
# deployment/ansible/database.yml deployment/ansible/app.yml deployment/ansible/celery.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters