Merge ~nacc/git-ubuntu:lp1734905-script-snap into git-ubuntu:master
- Git
- lp:~nacc/git-ubuntu
- lp1734905-script-snap
- Merge into master
Status: | Merged |
---|---|
Merged at revision: | 4af7a4a3c8daa5a7789f920d972ea66f52d10654 |
Proposed branch: | ~nacc/git-ubuntu:lp1734905-script-snap |
Merge into: | git-ubuntu:master |
Prerequisite: | ~nacc/git-ubuntu:lp1734905-script-cleanups |
Diff against target: |
168 lines (+65/-6) 7 files modified
bin/import-source-packages.py (+2/-2) bin/source-package-walker.py (+1/-2) bin/update-repository-alias.py (+1/-2) gitubuntu/scriptutils.py (+0/-0) setup.py (+1/-0) snap/snapcraft.yaml (+40/-0) snap/wrappers/git-ubuntu-self-test (+20/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Robie Basak | Approve | ||
Review via email: mp+337104@code.launchpad.net |
Commit message
Description of the change
Make jenkins happy.
Server Team CI bot (server-team-bot) wrote : | # |
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:00569674341
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Style Check
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:670d8855ed3
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Style Check
Click here to trigger a rebuild:
https:/
Nish Aravamudan (nacc) wrote : | # |
This will fail old CI, but will pass (hopefully) new CI:
https:/
Nish Aravamudan (nacc) wrote : | # |
From that job:
setup: running self-test
Warning: Permanently added '192.168.122.251' (ECDSA) to the list of known hosts.
No config file found, using default configuration
pylint passed!
=======
platform linux -- Python 3.6.3, pytest-3.1.3, py-1.5.2, pluggy-0.4.0
rootdir: /snap/git-
plugins: cov-2.5.1
collected 136 items
../../snap/
../../snap/
../../snap/
../../snap/
../../snap/
../../snap/
../../snap/
../../snap/
----------- coverage: platform linux, python 3.6.3-final-0 -----------
Name Stmts Miss Cover
-------
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
/snap/git-
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Style Check
SUCCESS: Unit Tests
SUCCESS: Integration Tests
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
Robie Basak (racb) : | # |
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
FAILED: VM Setup
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
SUCCESS: VM Setup
FAILED: Build
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
SUCCESS: VM Setup
FAILED: Build
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
FAILED: VM Setup
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
SUCCESS: VM Setup
FAILED: Build
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
SUCCESS: VM Setup
FAILED: Build
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
FAILED: VM Setup
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
FAILED: VM Setup
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
FAILED: VM Setup
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:4af7a4a3c8d
https:/
Executed test runs:
SUCCESS: VM Setup
SUCCESS: Build
SUCCESS: Unit Tests
SUCCESS: Integration Tests
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
Preview Diff
1 | diff --git a/scripts/import-source-packages.py b/bin/import-source-packages.py |
2 | index 3acdd36..5c52948 100755 |
3 | --- a/scripts/import-source-packages.py |
4 | +++ b/bin/import-source-packages.py |
5 | @@ -33,9 +33,9 @@ sys.path.insert( |
6 | ) |
7 | ) |
8 | |
9 | -from gitubuntu.source_information import launchpad_login |
10 | from gitubuntu.run import run |
11 | -import scriptutils |
12 | +import gitubuntu.scriptutils as scriptutils |
13 | +from gitubuntu.source_information import launchpad_login |
14 | |
15 | # The 'time' attribute is the publication date, as a timestamp, of the SPPHR |
16 | # corresponding to the URL stored in the 'link' attribute. |
17 | diff --git a/scripts/source-package-walker.py b/bin/source-package-walker.py |
18 | index 50a84c2..28e2425 100755 |
19 | --- a/scripts/source-package-walker.py |
20 | +++ b/bin/source-package-walker.py |
21 | @@ -17,8 +17,6 @@ import os |
22 | import sys |
23 | import urllib.request |
24 | |
25 | -import scriptutils |
26 | - |
27 | from debian.deb822 import Sources |
28 | |
29 | # We expect to be running from a git repository in master for this |
30 | @@ -35,6 +33,7 @@ sys.path.insert( |
31 | ) |
32 | ) |
33 | |
34 | +import gitubuntu.scriptutils as scriptutils |
35 | from gitubuntu.source_information import GitUbuntuSourceInformation |
36 | |
37 | def import_all_published_sources( |
38 | diff --git a/scripts/update-repository-alias.py b/bin/update-repository-alias.py |
39 | index a2d9fd6..5aa41da 100755 |
40 | --- a/scripts/update-repository-alias.py |
41 | +++ b/bin/update-repository-alias.py |
42 | @@ -8,8 +8,6 @@ import os |
43 | import sys |
44 | import urllib |
45 | |
46 | -import scriptutils |
47 | - |
48 | # We expect to be running from a git repository in master for this |
49 | # script, because the snap's python code is not exposed except within |
50 | # the snap |
51 | @@ -24,6 +22,7 @@ sys.path.insert( |
52 | ) |
53 | ) |
54 | |
55 | +import gitubuntu.scriptutils as scriptutils |
56 | from gitubuntu.source_information import launchpad_login_auth |
57 | |
58 | def update_git_repository(package, dry_run, unset): |
59 | diff --git a/scripts/scriptutils.py b/gitubuntu/scriptutils.py |
60 | index 58843a2..58843a2 100644 |
61 | --- a/scripts/scriptutils.py |
62 | +++ b/gitubuntu/scriptutils.py |
63 | diff --git a/setup.py b/setup.py |
64 | index ab91ab9..0fcb081 100644 |
65 | --- a/setup.py |
66 | +++ b/setup.py |
67 | @@ -20,5 +20,6 @@ setup(name='gitubuntu', |
68 | 'keyrings.alt==2.2', |
69 | 'lazr.restfulclient==0.13.5', |
70 | 'pytest==3.1.3', |
71 | + 'pytest-cov==2.5.1', |
72 | ] |
73 | ) |
74 | diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml |
75 | index 2d89fad..9bf85a3 100644 |
76 | --- a/snap/snapcraft.yaml |
77 | +++ b/snap/snapcraft.yaml |
78 | @@ -33,6 +33,26 @@ apps: |
79 | command: wrappers/git-merge-changelogs |
80 | environment: |
81 | PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH" |
82 | + self-test: |
83 | + command: wrappers/git-ubuntu-self-test |
84 | + environment: |
85 | + PYTHONPATH: "$SNAP/lib/python3.6/site-packages" |
86 | + PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH" |
87 | + import-source-packages: |
88 | + command: bin/import-source-packages.py |
89 | + environment: |
90 | + PYTHONPATH: "$SNAP/lib/python3.6/site-packages" |
91 | + PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH" |
92 | + source-package-walker: |
93 | + command: bin/source-package-walker.py |
94 | + environment: |
95 | + PYTHONPATH: "$SNAP/lib/python3.6/site-packages" |
96 | + PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH" |
97 | + update-repository-alias: |
98 | + command: bin/update-repository-alias.py |
99 | + environment: |
100 | + PYTHONPATH: "$SNAP/lib/python3.6/site-packages" |
101 | + PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH" |
102 | |
103 | parts: |
104 | gbp: |
105 | @@ -180,6 +200,11 @@ parts: |
106 | build-packages: |
107 | - libssl-dev |
108 | - libsqlite3-dev |
109 | + - libbz2-dev |
110 | + - liblzma-dev |
111 | + - libdb-dev |
112 | + - libgdbm-dev |
113 | + - libreadline-dev |
114 | stage: |
115 | - -usr/lib/python3.6/test |
116 | ubuntutools-python2: |
117 | @@ -251,6 +276,18 @@ parts: |
118 | - -usr/bin/xzgrep |
119 | - -usr/bin/xzless |
120 | - -usr/bin/xzmore |
121 | + pylint: |
122 | + plugin: python |
123 | + python-version: python3 |
124 | + source: https://github.com/PyCQA/pylint/archive/pylint-1.7.2.tar.gz |
125 | + source-type: tar |
126 | + stage: |
127 | + - -usr/bin/py* |
128 | + - -usr/bin/2to3* |
129 | + - -usr/share/*python* |
130 | + - -usr/lib/python3.5 |
131 | + - -usr/lib/python3.6 |
132 | + after: [python3] |
133 | git-ubuntu: |
134 | plugin: python |
135 | python-version: python3 |
136 | @@ -308,3 +345,6 @@ parts: |
137 | organize: |
138 | git-reconstruct-changelog: bin/git-reconstruct-changelog |
139 | git-merge-changelogs: bin/git-merge-changelogs |
140 | + import-source-packages.py: bin/import-source-packages.py |
141 | + source-package-walker.py: bin/source-package-walker.py |
142 | + update-repository-alias.py: bin/update-repository-alias.py |
143 | diff --git a/snap/wrappers/git-ubuntu-self-test b/snap/wrappers/git-ubuntu-self-test |
144 | new file mode 100755 |
145 | index 0000000..04789b4 |
146 | --- /dev/null |
147 | +++ b/snap/wrappers/git-ubuntu-self-test |
148 | @@ -0,0 +1,20 @@ |
149 | +#!/snap/core/current/bin/bash |
150 | + |
151 | +python3 -m pylint --ignored-modules=pygit2 -E $SNAP/lib/python3.6/site-packages/gitubuntu/ |
152 | +PYLINT_RC=$? |
153 | + |
154 | +if [ $PYLINT_RC == 0 ]; then |
155 | + echo "pylint passed!" |
156 | +fi |
157 | + |
158 | +TMPFILE=$(mktemp) |
159 | +COVERAGE_FILE=$TMPFILE python3 -m pytest -p no:cacheprovider --cov=gitubuntu $SNAP/lib/python3.6/site-packages/gitubuntu/* |
160 | +PYTEST_RC=$? |
161 | +unlink $TMPFILE |
162 | + |
163 | +if [ $PYTEST_RC == 0 ]; then |
164 | + echo "pytest passed!" |
165 | +fi |
166 | + |
167 | +[[ $PYLINT_RC == 0 && $PYTEST_RC == 0 ]] |
168 | + |
FAILED: Continuous integration, rev:4735ab7b4ae 44b778ba3b58904 e5a26536996a58 /jenkins. ubuntu. com/server/ job/git- ubuntu- ci/278/
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Style Check
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/git- ubuntu- ci/278/ rebuild
https:/