forked from Playfloor/openhoi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (47 loc) · 1.42 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
47
os: linux
dist: bionic
language: minimal
jobs:
include:
- name: Debian Buster (10 LTS)
env:
- DOCKER_DIST=debian
- DOCKER_DIST_VERSION=buster
- name: Ubuntu Bionic Beaver (18.04 LTS)
env:
- DOCKER_DIST=ubuntu
- DOCKER_DIST_VERSION=bionic
- name: Ubuntu Eoan Ermine (19.10)
env:
- DOCKER_DIST=ubuntu
- DOCKER_DIST_VERSION=eoan
- name: Ubuntu Focal Fossa (20.04 LTS)
env:
- DOCKER_DIST=ubuntu
- DOCKER_DIST_VERSION=focal
- name: Fedora (31)
env:
- DOCKER_DIST=fedora
- DOCKER_DIST_VERSION=31
notifications:
email: false
git:
depth: 3
before_install:
# Update Docker
- 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 -o Dpkg::Options::="--force-confnew" install docker-ce
# Fetch docker files
- git clone https://github.com/openhoi/docker.git
install:
# Specifiy docker image name
- DOCKER_IMAGE_NAME=openhoi-ogre:${DOCKER_DIST}-${DOCKER_DIST_VERSION}
# Get and update our desired Dockerfile
- cp docker/${DOCKER_DIST} Dockerfile
- sed -i "s/DOCKER_DIST_VERSION/$DOCKER_DIST_VERSION/g" Dockerfile
# Build docker image
- docker build -t $DOCKER_IMAGE_NAME .
# Run docker image
- docker run $DOCKER_IMAGE_NAME