What is this?
travis.debian.net is a hosted utility to make it easier and cleaner to build and test your Debian packages on the Travis CI hosted continuous integration platform without duplicating scripts or configuration across multiple repositories.
- Enable builds for your package on travis-ci.org:
- Ensure "Only build if .travis.yml is present" is enabled:
Add .travis.yml to your
$ wget -O.travis.yml http://travis.debian.net/travis.yml $ git add .travis.yml $ git commit -m "Add .travis.yml from http://travis.debian.net."For "3.0 (quilt)" packages:
$ echo 'extend-diff-ignore = "^\.travis\.yml$"' >>
How it works
At it's core travis.debian.net is a hosted shell script that is executed within the Travis CI test environment.
First, travis.debian.net detects which release of Debian the branch is targeting based on the current branch name. The experimental suite and all varieties of backports are intelligently detected.A throwaway Docker image is then created containing all the required build-dependencies. The package is then built in this isolated environment with no access to the internet.
Lintian is run on the result and the binary packages are saved to the parent directory.
Configuration is performed by setting environment variables. You can do this within the Travis CI web interface itself.
Please note that the API is currently unstable.
- This variable is passed without modification to the build process and modifies the build process as outlined in Debian Policy.
- Which distribution of Debian the package should be built in. By default, this is automatically detected from the branch name.
- When true, the corresponding backports repository will be enabled in /etc/apt/sources.list. If TRAVIS_DEBIAN_DISTRIBUTION is not set, the value is automatically detected.
- When true, the corresponding repository for security updates will be enabled in /etc/apt/sources.list. If not set, updates are automatically enabled for the distributions that have security support.
- When true, Debian's experimental repository will be enabled. If TRAVIS_DEBIAN_DISTRIBUTION is not set, the value is automatically detected.
- Which Debian mirror to use. By default, ftp.de.debian.org is used.
- Which directory to store the results of the build. By default, the packages are stored in the parent directory.
- Which directory to build under. By default, /tmp/buildd is used.
- By default, the network is disabled during the package build process. If your build really needs internet access, set this value to true.
- When true, increment the version number of the package by appending a new entry to debian/changelog to reflect the Travis CI build number. By default, the package version is left unchanged.
Frequently asked questions (FAQ)
- Q: But wget | sh - is insecure!
- A: Of course, and you should never run such a command on your own machine. However, not only does Travis-CI build within throwaway containers that you are not responsible for, cannot trust, and generally don't care about, there is zero expectation that the resulting .deb files are to be used or installed anywhere.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.