~gary-wzl77/snappy-hwe-snaps/+git/ubuntu-custom-image:code_coverage_custom_builder

Last commit made on 2017-12-14
Get this branch:
git clone -b code_coverage_custom_builder https://git.launchpad.net/~gary-wzl77/snappy-hwe-snaps/+git/ubuntu-custom-image
Only Gary.Wang can upload to this branch. If you are Gary.Wang please log in for upload directions.

Branch merges

Branch information

Name:
code_coverage_custom_builder
Repository:
lp:~gary-wzl77/snappy-hwe-snaps/+git/ubuntu-custom-image

Recent commits

d560bc6... by Gary.Wang

Address the review comments.

77675c6... by Gary.Wang

Fix flake8 error and failure test cases.

d66e64a... by Gary.Wang

Merge git+ssh://git.launchpad.net//~snappy-hwe-team/snappy-hwe-snaps/+git/ubuntu-custom-image into code_coverage_custom_builder

fec9150... by System Enablement CI Bot <email address hidden>

Merge remote tracking branch test_tooling

Merge-Proposal: https://code.launchpad.net/~gary-wzl77/snappy-hwe-snaps/+git/ubuntu-custom-image/+merge/334810

Author: Gary.Wang <email address hidden>

Install all test tools from run-tests.sh to make it easy to integrate into CI.

We install all test tools from run-tests script in a clean docker
instance so that we keep a minimum docker image size(snap-spread-tests).
Also, on docker instance, there's no symlink(/etc/resolv.conf)
pointing to /run/resolvconf/resolv.conf file which make all apt related
command failed due to the DNS issue. We create a symlink under
/run/resolvconf/ to point to actual /etc/resolv.conf file in this case.

ec92eae... by Gary.Wang

Address the review comment.

One second waiting time for later check mapper device is probably good
good enough(at least no issue were found during my testing on CI). So
it's worth a try. Let's see how the Jenkins reacts about this change.

6438f37... by Gary.Wang

A better way to resolve dns issue no matter in host machine or docker(CI).

54ed3f1... by Gary.Wang

Install all test tools from run-tests.sh to make it easy to integrate into CI.

We install all test tools from run-tests script in a clean docker
instance so that we keep a minimum docker image size(snap-spread-tests).
Also, on docker instance, there's no symlink(/etc/resolv.conf)
pointing to /run/resolvconf/resolv.conf file which make all apt related
command failed due to the DNS issue. We create a symlink under
/run/resolvconf/ to point to actual /etc/resolv.conf file in this case.

97a59d3... by System Enablement CI Bot <email address hidden>

Merge remote tracking branch versioning

Merge-Proposal: https://code.launchpad.net/~gary-wzl77/snappy-hwe-snaps/+git/ubuntu-custom-image/+merge/333538

Author: Gary.Wang <email address hidden>

Unify software and spec versioning.

One thing probably confused to end-users is that the version number of u-c-i(0.1) and spec version(1) actually doesn't match at this moment. The easy solution I can see here probably is that u-c-i release and spec sharing a same version number so that people won't mix up spec version with the release number.
Also I changed the way that u-c-i read the version number(from snapcraft yaml file instead of hardcoding).
Meanwhile, version number(spec) can be either float or int data type, so that we don't need to bump major number up once new specs are supported.
TODO: We also need to consider the image spec forward compatibility and backward compatibility.

0f8b1b4... by Gary.Wang

Throw ConsistenceError exception if the required keywords are not found
in the structures(extra_ppas, users).

The public-key field in extra_ppas is optional now, which is not good,
essentially , the gpg signature of public keys should not be bypassed or
ignored for security reasons. We stick to this on launchpad at least.
Also, we propagate KeyError exception to ConsistenceError once it is
being thrown out.

6cc46b0... by Gary.Wang

Use a proper way to delete resources.

Some resources are now managed by local context manager(It's declared by
'with' keyword), a few others are managed by a member variable(_resource)
for the exception handling. That's fine. But we mix these two context
managers up in some unit tests which causes resources are not deleted
eventually. Also we need to wrap CustomBuilder up by context manager too,
 so that it can be delete automatically when context manager goes out
of its scope.