Merge ~oddbloke/cloud-init/+git/cloud-init:travis into cloud-init:master

Proposed by Dan Watkins
Status: Merged
Approved by: Dan Watkins
Approved revision: 8caf942d77de4337dbe480776a56766209f95ed9
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~oddbloke/cloud-init/+git/cloud-init:travis
Merge into: cloud-init:master
Diff against target: 61 lines (+55/-0)
1 file modified
.travis.yml (+55/-0)
Reviewer Review Type Date Requested Status
Chad Smith Approve
Server Team CI bot continuous-integration Approve
Ryan Harper Approve
Review via email: mp+374462@code.launchpad.net

Commit message

introduce .travis.yml

This captures the CI testing that is currently performed by the Ubuntu
Server Jenkins instance into a Travis configuration, which is part of
the migration of cloud-init code hosting from Launchpad to GitHub.

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) wrote :

You can see a successful run with this configuration here: https://travis-ci.org/OddBloke/cloud-init/builds/600851758

Revision history for this message
Chad Smith (chad.smith) :
Revision history for this message
Ryan Harper (raharper) wrote :

Thanks Dan,

This looks great! One question about getting a name for the integration test portion, but that shouldn't block this landing if we don't know how to make that change right now.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:8caf942d77de4337dbe480776a56766209f95ed9
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1224/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1224//rebuild

review: Approve (continuous-integration)
Revision history for this message
Ryan Harper (raharper) :
Revision history for this message
Chad Smith (chad.smith) wrote :

Excellent Dan. Land away and we can iterate on comments, docs etc in future branches.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.travis.yml b/.travis.yml
2new file mode 100644
3index 0000000..834a568
4--- /dev/null
5+++ b/.travis.yml
6@@ -0,0 +1,55 @@
7+language: python
8+dist: bionic
9+
10+install:
11+ # Required so `git describe` will definitely find a tag; see
12+ # https://github.com/travis-ci/travis-ci/issues/7422
13+ - git fetch --unshallow
14+ - pip install tox
15+
16+script:
17+ - tox
18+
19+matrix:
20+ fast_finish: true
21+ include:
22+ - python: 3.6
23+ env: TOXENV=py3
24+ - install:
25+ - git fetch --unshallow
26+ - sudo apt-get build-dep -y cloud-init
27+ - sudo apt-get install -y --install-recommends sbuild ubuntu-dev-tools fakeroot tox
28+ # These are build deps but not pulled in by the build-dep call above
29+ - sudo apt-get install -y --install-recommends dh-systemd python3-coverage python3-contextlib2
30+ - pip install .
31+ - pip install tox
32+ # bionic has lxd from deb installed, remove it first to ensure
33+ # pylxd talks only to the lxd from snap
34+ - sudo apt remove --purge lxd lxd-client
35+ - sudo rm -Rf /var/lib/lxd
36+ - sudo snap install lxd
37+ - sudo lxd init --auto
38+ - sudo mkdir --mode=1777 -p /var/snap/lxd/common/consoles
39+ - sudo usermod -a -G lxd $USER
40+ - sudo sbuild-adduser $USER
41+ - cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/$USER/.sbuildrc
42+ script:
43+ # Ubuntu LTS: Build
44+ - ./packages/bddeb -S
45+ # Use this to get a new shell where we're in the sbuild group
46+ - sudo -E su $USER -c 'mk-sbuild xenial'
47+ - sudo -E su $USER -c 'sbuild --nolog --verbose --dist=xenial cloud-init_*.dsc'
48+ # Ubuntu LTS: Integration
49+ - sg lxd -c 'tox -e citest -- run --verbose --preserve-data --data-dir results --os-name xenial --test modules/apt_configure_sources_list.yaml --test modules/ntp_servers --test modules/set_password_list --test modules/user_groups --deb cloud-init_*_all.deb'
50+ - python: 2.7
51+ env: TOXENV=py27
52+ - python: 3.4
53+ env: TOXENV=xenial
54+ # Travis doesn't support Python 3.4 on bionic, so use xenial
55+ dist: xenial
56+ - python: 3.6
57+ env: TOXENV=pycodestyle
58+ - python: 3.6
59+ env: TOXENV=pyflakes
60+ - python: 3.6
61+ env: TOXENV=pylint

Subscribers

People subscribed via source and target branches