Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit 150e594

Browse files
committed
automatically build and push the image to ecr
1 parent f1a65f5 commit 150e594

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ script:
1414
else
1515
pytest -m hermetic
1616
fi
17+
18+
# Publish the Docker image to the infra AWS registry
19+
before_deploy:
20+
- pip install --user awscli; export PATH=$PATH:$HOME/.local/bin
21+
deploy:
22+
provider: script
23+
script: sh ci/publish-docker.sh
24+
on:
25+
branch: master

ci/publish-docker.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
5+
ECR_IMAGE="890664054962.dkr.ecr.us-west-1.amazonaws.com/rust-highfive:latest"
6+
7+
$(aws ecr get-login --no-include-email --region us-west-1)
8+
9+
docker build -t rust-highfive .
10+
docker tag rust-highfive:latest "${ECR_IMAGE}"
11+
docker push "${ECR_IMAGE}"

0 commit comments

Comments
 (0)