mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-01-12 08:44:46 +00:00
Sends message to DCOS when Docker Hub image is updated
This commit is contained in:
parent
124f358984
commit
b74e5798d2
14
.travis.yml
14
.travis.yml
@ -20,11 +20,19 @@ install:
|
|||||||
script:
|
script:
|
||||||
- pytest
|
- pytest
|
||||||
|
|
||||||
before_deploy:
|
after_success:
|
||||||
- docker build -t sartography/protocol-builder-mock .
|
- pip install --user awscli
|
||||||
|
- export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
script: bash docker_push.sh
|
script: bash deploy.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
on_success: change
|
||||||
|
on_failure: always
|
||||||
|
recipients:
|
||||||
|
- dan@sartography.com
|
||||||
|
9
deploy.sh
Executable file
9
deploy.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Build and push Docker image to Docker Hub
|
||||||
|
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
docker build --no-cache -t sartography/protocol-builder-mock:latest . || exit 1;
|
||||||
|
docker push sartography/protocol-builder-mock:latest || exit 1;
|
||||||
|
|
||||||
|
# Notify UVA DCOS that Docker image has been updated
|
||||||
|
aws sqs send-message --queue-url 'https://queue.amazonaws.com/474683445819/dcos-refresh' --message-body 'crconnect/pb' || exit 1;
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
||||||
docker push sartography/protocol-builder-mock || true
|
|
Loading…
x
Reference in New Issue
Block a user