forked from packpack/packpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (57 loc) · 1.81 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
sudo: false
language: Python
services:
- docker
git:
depth: 100500
env:
matrix:
- OS=el DIST=6
- OS=el DIST=7
- OS=el DIST=8
- OS=fedora DIST=28
- OS=fedora DIST=29
- OS=fedora DIST=30
- OS=fedora DIST=31
- OS=ubuntu DIST=trusty
- OS=ubuntu DIST=xenial
- OS=ubuntu DIST=bionic
- OS=ubuntu DIST=eoan
- OS=debian DIST=jessie
- OS=debian DIST=stretch
- OS=debian DIST=buster
- OS=ubuntu DIST=trusty ARCH=i386
- OS=ubuntu DIST=xenial ARCH=i386
- OS=ubuntu DIST=bionic ARCH=i386
- OS=ubuntu DIST=eoan ARCH=i386
- OS=debian DIST=jessie ARCH=i386
- OS=debian DIST=stretch ARCH=i386
- OS=debian DIST=buster ARCH=i386
script:
- git submodule update --init --recursive
- git fetch -a
- git describe --long --always
# Omit enabling of the packagecloud repository during build, because:
# 1. We don't use it during build.
# 2. It does not exists before we push a first package, that
# lead to errors during repository updating.
- PACKAGECLOUD_USER="" PACKAGECLOUD_REPO="" ./packpack
deploy:
# Deploy packages to PackageCloud
provider: packagecloud
username: ${PACKAGECLOUD_USER}
repository: ${PACKAGECLOUD_REPO}
token: ${PACKAGECLOUD_TOKEN}
dist: ${OS}/${DIST}
package_glob: build/*.{deb,rpm}
skip_cleanup: true
on:
branch: master
condition: -n "${OS}" && -n "${DIST}" && -z "${ARCH}" && -n "${PACKAGECLOUD_TOKEN}"
# Prune old packages from PackageCloud (keep the two latest versions)
after_deploy:
- pip install -r ./tools/requirements.txt
- python ./tools/packagecloud prune ${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO} deb ${OS} ${DIST} --keep 2
- python ./tools/packagecloud prune ${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO} rpm ${OS} ${DIST} --keep 2
notifications:
email: true