forked from dlang/dub-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (45 loc) · 1.38 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
48
49
language: d
d:
- dmd
- ldc
sudo: false
addons:
apt:
packages:
- libevent-dev
- libssl-dev
env:
- VIBED_SSL=openssl
- VIBED_SSL=botan
# Data definition directives inside inline asm are not supported yet.
matrix:
allow_failures:
- d: ldc
env: VIBED_SSL=botan
script: dub test --override-config="vibe-d:tls/${VIBED_SSL}"
jobs:
include:
- stage: dockerhub-stable
d: dmd
os: linux
script:
- echo "Deploying to DockerHub..."
- dub build --build=release
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- LATEST_TAG="$(git describe --abbrev=0 --tags)"
- docker build -t "dlangcommunity/dub-registry:${LATEST_TAG} ."
- docker push "dlangcommunity/dub-registry:${LATEST_TAG}"
on:
tags: true
- stage: dockerhub-latest
d: dmd
os: linux
script:
- echo "Deploying to DockerHub..."
- dub build --build=release
- docker build -t dlangcommunity/dub-registry:latest .
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" ; fi
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then docker push dlangcommunity/dub-registry:latest ; fi
stages:
- name: dockerhub-stable
if: branch = master AND tag IS present