forked from prestodb/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 1.25 KB
/
.travis.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
language: generic
dist: trusty
# Prevent duplicate builds on tag pushes.
# See https://github.com/mockito/mockito/commit/500519aac4cc13770aa47c1eb7d28e905c27e7aa
branches:
except:
- /^release.*/
- /^latest-snapshot.*/
services:
- docker
before_install:
- sudo apt-get install dc
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- docker --version
install: make
before_deploy:
# decrypt the github deploy key
- openssl aes-256-cbc -K $encrypted_cd2beb64619c_key -iv $encrypted_cd2beb64619c_iv
-in .travis/github_tags_push_deploy_key.enc -out .travis/github_tags_push_deploy_key -d
- chmod 600 .travis/github_tags_push_deploy_key
- eval "$(ssh-agent -s)"
- ssh-add .travis/github_tags_push_deploy_key
- docker login --username=${DOCKERHUB_LOGIN} --password=${DOCKERHUB_PASSWORD}
# Publish snapshots to Dockerhub for commits tagged `latest-snapshot-*`
deploy:
on:
all_branches: true
condition: $( git tag --points-at HEAD | grep '^latest-snapshot' ) != ''
skip_cleanup: true
provider: script
script: make snapshot