This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
63 lines (58 loc) · 1.82 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: erlang
otp_release: 20.2
sudo: true
dist: trusty
cache:
directories:
- .travis/ejabberd
- tests/node_modules
stages:
# We want to build and test each and every branch.
- name: build
- name: test
# We just run the release stage, when we have a tag build.
- name: release
if: tag =~ .* AND type IN (push, api)
jobs:
include:
- stage: build
install: skip
script:
# Reown the build workspace to the travis user (due to Docker,
# and caching)
- sudo chown travis:travis -R $PWD/..
# Build the ejabberd module
- make -C .travis build
- stage: test
install:
# Install docker-compose version 1.22.0
- sudo rm /usr/local/bin/docker-compose
- curl -L http://bit.ly/2B4msDT > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# Fix some travis/2000 common/1000 user id mapping issues
- source .travis/exe/docker-glue
# Install the test suite dependencies
- make install
script:
- docker --version
- docker-compose --version
- START=background make start reload test
- stage: release
install: skip
script:
# Reown the build workspace to the travis user (due to Docker,
# and caching)
- sudo chown travis:travis -R $PWD/..
# Setup the module version environment variable for the release
- export MOD_VERSION=${TRAVIS_TAG}
- \[ -n "${MOD_VERSION}" \] || export MOD_VERSION=latest
# Build and package the ejabberd module
- make -C .travis build package
deploy:
provider: releases
api_key: ${GITHUB_AUTH_TOKEN}
file: .travis/ejabberd-read-markers-${MOD_VERSION}.tar.gz
skip_cleanup: true
on:
tags: true