forked from TerezaLic/adform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
28 lines (25 loc) · 1.17 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e
# Obtain the application repository and log in
docker pull quay.io/keboola/developer-portal-cli-v2:latest
export REPOSITORY=`docker run --rm \
-e KBC_DEVELOPERPORTAL_USERNAME \
-e KBC_DEVELOPERPORTAL_PASSWORD \
quay.io/keboola/developer-portal-cli-v2:latest \
ecr:get-repository ${KBC_DEVELOPERPORTAL_VENDOR} ${KBC_DEVELOPERPORTAL_APP}`
eval $(docker run --rm \
-e KBC_DEVELOPERPORTAL_USERNAME \
-e KBC_DEVELOPERPORTAL_PASSWORD \
quay.io/keboola/developer-portal-cli-v2:latest \
ecr:get-login ${KBC_DEVELOPERPORTAL_VENDOR} ${KBC_DEVELOPERPORTAL_APP})
# Push to the repository
docker tag ${APP_IMAGE}:latest ${REPOSITORY}:${TRAVIS_TAG}
docker tag ${APP_IMAGE}:latest ${REPOSITORY}:latest
docker push ${REPOSITORY}:${TRAVIS_TAG}
docker push ${REPOSITORY}:latest
# Deploy to KBC -> update the tag in Keboola Developer Portal (needs $KBC_DEVELOPERPORTAL_VENDOR & $KBC_DEVELOPERPORTAL_APP)
docker run --rm \
-e KBC_DEVELOPERPORTAL_USERNAME \
-e KBC_DEVELOPERPORTAL_PASSWORD \
quay.io/keboola/developer-portal-cli-v2:latest \
update-app-repository ${KBC_DEVELOPERPORTAL_VENDOR} ${KBC_DEVELOPERPORTAL_APP} ${TRAVIS_TAG} ecr ${REPOSITORY}