Skip to content

Commit

Permalink
ci(travis): build/tag/deploy 'current' tag for production
Browse files Browse the repository at this point in the history
  • Loading branch information
adufr committed Aug 25, 2020
1 parent d0de887 commit 2423e53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- chmod +x send.sh
- ./send.sh failure $DISCORD_WEBHOOK_URL

# Build and push both current version & latest version
# Build and push both versionned and current versions
- stage: Build Docker image
if: branch = master
script:
Expand All @@ -48,9 +48,9 @@ jobs:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t calendz/api-calendar .
- docker images
- docker tag calendz/api-calendar calendz/api-calendar:latest
- docker tag calendz/api-calendar calendz/api-calendar:current
- docker tag calendz/api-calendar calendz/api-calendar:${PACKAGE_VERSION}
- docker push calendz/api-calendar:latest
- docker push calendz/api-calendar:current
- docker push calendz/api-calendar:${PACKAGE_VERSION}

# Deploy latest API-CALENDAR version
Expand Down
2 changes: 1 addition & 1 deletion .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ssh-add .travis/deploy_key # Add the private key to SSH
ssh -o "StrictHostKeyChecking=no" $SSH_USER@$SSH_IP -p $SSH_PORT <<EOF
cd /home/calendz/calendz-conf
git pull
docker pull calendz/api-calendar:latest
docker pull calendz/api-calendar:current
docker-compose -f docker/docker-compose.prod.yml stop calendz-api-calendar
docker-compose -f docker/docker-compose.prod.yml rm -f calendz-api-calendar
docker-compose -f docker/docker-compose.prod.yml up -d --no-deps --build calendz-api-calendar
Expand Down

0 comments on commit 2423e53

Please sign in to comment.