forked from BugRoger/coreos-nvidia-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (40 loc) · 2.18 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
dist: trusty
sudo: required
env:
global:
- IMAGE=coreos-nvidia-driver
matrix:
- COREOS_TRACK=stable NVIDIA_DRIVER_VERSION=390.25 NVIDIA_PRODUCT_TYPE=geforce NVIDIA_SITE=us.download.nvidia.com/XFree86/Linux-x86_64
- COREOS_TRACK=beta NVIDIA_DRIVER_VERSION=390.25 NVIDIA_PRODUCT_TYPE=geforce NVIDIA_SITE=us.download.nvidia.com/XFree86/Linux-x86_64
- COREOS_TRACK=alpha NVIDIA_DRIVER_VERSION=390.25 NVIDIA_PRODUCT_TYPE=geforce NVIDIA_SITE=us.download.nvidia.com/XFree86/Linux-x86_64
- COREOS_TRACK=stable NVIDIA_DRIVER_VERSION=390.30 NVIDIA_PRODUCT_TYPE=tesla NVIDIA_SITE=us.download.nvidia.com/tesla
- COREOS_TRACK=beta NVIDIA_DRIVER_VERSION=390.30 NVIDIA_PRODUCT_TYPE=tesla NVIDIA_SITE=us.download.nvidia.com/tesla
- COREOS_TRACK=alpha NVIDIA_DRIVER_VERSION=390.30 NVIDIA_PRODUCT_TYPE=tesla NVIDIA_SITE=us.download.nvidia.com/tesla
before_script:
- curl https://${COREOS_TRACK}.release.core-os.net/amd64-usr/current/version.txt -o version.txt
- cat version.txt
- export $(cat version.txt | xargs)
- if [ "$TRAVIS_EVENT_TYPE" != "push" ]; then
curl -s https://hub.docker.com/v2/repositories/${DOCKER_USERNAME}/${IMAGE}/tags/?page_size=10000 |
jq -e "[.results | .[] | .name == \"${COREOS_VERSION}-${NVIDIA_DRIVER_VERSION}-${NVIDIA_PRODUCT_TYPE}\"] | any | not" ||
travis_terminate 0;
fi
script:
- docker build
--build-arg NVIDIA_DRIVER_VERSION=${NVIDIA_DRIVER_VERSION}
--build-arg NVIDIA_PRODUCT_TYPE=${NVIDIA_PRODUCT_TYPE}
--build-arg NVIDIA_SITE=${NVIDIA_SITE}
--build-arg COREOS_VERSION=${COREOS_VERSION}
--tag ${DOCKER_USERNAME}/${IMAGE}:${COREOS_VERSION}-${NVIDIA_DRIVER_VERSION}-${NVIDIA_PRODUCT_TYPE}
--tag ${DOCKER_USERNAME}/${IMAGE}:${COREOS_TRACK}-${NVIDIA_DRIVER_VERSION}-${NVIDIA_PRODUCT_TYPE}
.
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker push ${DOCKER_USERNAME}/${IMAGE}:${COREOS_VERSION}-${NVIDIA_DRIVER_VERSION}-${NVIDIA_PRODUCT_TYPE}
- docker push ${DOCKER_USERNAME}/${IMAGE}:${COREOS_TRACK}-${NVIDIA_DRIVER_VERSION}-${NVIDIA_PRODUCT_TYPE}
notifications:
slack:
rooms:
- d26a:3WFB88N8V6onXGdA4fCwOvd4
on_success: change
on_failure: always