-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
16 lines (16 loc) · 927 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
language: bash
before_install:
- openssl aes-256-cbc -K $encrypted_2f750192930e_key -iv $encrypted_2f750192930e_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- echo -e "Host ${DEPLOY_HOST}\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add /tmp/deploy_rsa
- ssh -i /tmp/deploy_rsa ${DEPLOY_USER}@${DEPLOY_HOST} -p ${DEPLOY_PORT} pwd
install:
- git symbolic-ref --short HEAD || git checkout ${TRAVIS_BRANCH}
script:
- ./bs docker --buildNum=${TRAVIS_BUILD_NUMBER}
- docker login docker.pkg.github.com -u ${GH_DOCKER_USER} -p ${GH_DOCKER_PW}
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then ./bs dockerPush; fi'
after_success:
- ssh -i /tmp/deploy_rsa ${DEPLOY_USER}@${DEPLOY_HOST} -p ${DEPLOY_PORT} "docker login docker.pkg.github.com -u ${GH_DOCKER_USER} -p ${GH_DOCKER_PW} && cd ${DEPLOY_DIR} && docker-compose pull && docker-compose up -d"