juju-solutions / layer-cwr

Layer for building the Juju Jenkins CI env
Other
2 stars 5 forks source link

bundlebuilder.py check fails #81

Open mbruzek opened 7 years ago

mbruzek commented 7 years ago

I am using cwr-ci and build-bundle command that creates a jenkins job with the bundlebuilder.py check command. The check never completes successfully.

I don't have a ci-info.yaml (because Cory said I didn't need it) but apparently that is mandatory.

Here is the output of the check command when I tried running this on the jenkins server manually.

jenkins@juju-525930-0:~$ python3 -u /var/lib/juju/agents/unit-cwr-0/charm/scripts/bundlebuilder.py check http://github.com/juju-solutions/bundle-kubernetes-e2e master
Running git clone http://github.com/juju-solutions/bundle-kubernetes-e2e --branch master /tmp/tmpzyy_4uey/
Cloning into '/tmp/tmpzyy_4uey'...
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-cwr-0/charm/scripts/bundlebuilder.py", line 449, in <module>
    if tester.check_bundle(repo, branch):
  File "/var/lib/juju/agents/unit-cwr-0/charm/scripts/bundlebuilder.py", line 366, in check_bundle
    store_push_dry_run=self.store_push_dry_run) as bundle:
  File "/var/lib/juju/agents/unit-cwr-0/charm/scripts/bundlebuilder.py", line 70, in __init__
    self.location = "cs:~{}/{}".format(self.ci_info['bundle']['namespace'], self.ci_info['bundle']['name'])
KeyError: 'bundle'
ktsakalozos commented 7 years ago

Indeed, the ci-info.yaml is required. bundlebuilder.py check will have exit code 0 in case the there is a potential update on the bundle. Potential update is essentially a new revision of a charm appearing on the store. The ci-info.yaml is needed to specify what charms should we keep an eye, on which channel, and what should we do with in case of a passing bundle test (should we push the bundle to the store, should we also pull the charms, if so in which channel).

mbruzek commented 7 years ago

The script should handle the missing file and report an error rather than a difficult to read stack trace when the ci-info.yaml is missing.

To integrate with this system I had to create 3 different yaml files that were not previously in my bundle

Can we not fold this functionality into one yaml file to reduce the burden on the developers/users of this system?

johnsca commented 7 years ago

This might be fixed since the refactor.