Moving to Quay.io

dropping deploy step from Travis and removing the deployment script, as this is handled by Quay.
This commit is contained in:
Dan 2021-02-12 09:17:52 -05:00
parent 0cf7a00dcf
commit 48f866c2cf
3 changed files with 5 additions and 57 deletions

View File

@ -40,13 +40,6 @@ env:
script:
- npm run ci
deploy:
provider: script
script: bash ./deploy.sh sartography/cr-connect-bpmn
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(dev|testing|demo|training|staging|master|rrt\/.*)$
notifications:
email:
on_success: change

View File

@ -1,45 +0,0 @@
#!/bin/bash
#########################################################################
# Builds the Docker image for the current git branch on Travis CI and
# publishes it to Docker Hub.
#
# Parameters:
# $1: Docker Hub repository to publish to
#
# Required environment variables (place in Settings menu on Travis CI):
# $DOCKER_USERNAME: Docker Hub username
# $DOCKER_TOKEN: Docker Hub access token
#########################################################################
echo 'Building Docker image...'
DOCKER_REPO="$1"
function branch_to_tag () {
if [ "$1" == "master" ]; then echo "latest"; else echo "$1" ; fi
}
function branch_to_deploy_group() {
if [[ $1 =~ ^(rrt\/.*)$ ]]; then echo "rrt"; else echo "crconnect" ; fi
}
DOCKER_TAG=$(branch_to_tag "$TRAVIS_BRANCH")
DEPLOY_GROUP=$(branch_to_deploy_group "$TRAVIS_BRANCH")
if [ "$DEPLOY_GROUP" == "rrt" ]; then
IFS='/' read -ra ARR <<< "$TRAVIS_BRANCH" # Split branch on '/' character
DOCKER_TAG=$(branch_to_tag "rrt_${ARR[1]}")
fi
echo "DOCKER_REPO = $DOCKER_REPO"
echo "DOCKER_TAG = $DOCKER_TAG"
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
docker build -f Dockerfile -t "$DOCKER_REPO:$DOCKER_TAG" . || exit 1
# Push Docker image to Docker Hub
echo "Publishing to Docker Hub..."
docker push "$DOCKER_REPO" || exit 1
echo "Done."

View File

@ -2,7 +2,7 @@ version: "3.3"
services:
db:
container_name: db
image: sartography/cr-connect-db:$E2E_TAG
image: quay.io/sartography/cr-connect-db:$E2E_TAG
ports:
- "5432:5432"
environment:
@ -19,7 +19,7 @@ services:
container_name: pb
depends_on:
- db
image: sartography/protocol-builder-mock:$E2E_TAG
image: quay.io/sartography/protocol-builder-mock:$E2E_TAG
environment:
- APPLICATION_ROOT=/
- CORS_ALLOW_ORIGINS=localhost:5000,backend:5000,localhost:5002,bpmn:5002,localhost:4200,frontend:4200
@ -39,7 +39,7 @@ services:
depends_on:
- db
- pb
image: sartography/cr-connect-workflow:$E2E_TAG
image: quay.io/sartography/cr-connect-workflow:$E2E_TAG
environment:
- APPLICATION_ROOT=/
- CORS_ALLOW_ORIGINS=localhost:5002,bpmn:5002,localhost:4200,frontend:4200
@ -67,7 +67,7 @@ services:
# depends_on:
# - db
# - backend
# image: sartography/cr-connect-bpmn:dev
# image: quay.io/sartography/cr-connect-bpmn:dev
# environment:
# - API_URL=http://localhost:5000/api/v1.0
# - BASE_HREF=/bpmn/
@ -83,7 +83,7 @@ services:
# depends_on:
# - db
# - backend
# image: sartography/cr-connect-frontend:dev
# image: quay.io/sartography/cr-connect-frontend:dev
# environment:
# - API_URL=http://localhost:5000/api/v1.0
# - BASE_HREF=/app/