forked from Teradata/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (39 loc) · 1.47 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
41
42
43
44
45
46
language: generic
dist: trusty
env:
matrix:
- IMAGES='teradatalabs/centos6-java8-oracle.dependants'
- IMAGES='teradatalabs/centos6-ssh-oj8.dependants'
- IMAGES=$( echo teradatalabs/{dns,ubuntu-trusty-python2.6,presto-admin-devenv} )
# 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 ${IMAGES[@]}
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