The cloudwatch check plugin needs django autocomplete light -
eventually we can use this for other plugins too (e.g. getting
the available jenkins jobs for jenkins check)
Change to not have separate check plugins and other plugin env variable,
also revert changes to the initial migration - migrations should be
created in the plugins themselves.
If a build is in progress, then every JenkinsCheck was marked as failed.
Here we fetch the last_completed build, instead of the last_build,
because that is really what we are interested in, and we are not
relying on last_build to figure out whether a build is in progress.
Closes#551
We added a JenkinsConfig model to store configs (atm only editable in
django admin - to be moved to some sort of plugins options page)
If no JenkinsConfig are available, one will be created from the current
environment variables (JENKINS_URL etc)
Refactor JenkinsStatusCheck to have its own table instead of being a
proxy model. This is because we're moving to a plugin architecture
for status checks so we can't keep adding every new field to the base
model.
Currently, if there is there is no Jenkins job matching
the Cabot check, the check always succeeds.
This is particularly bad when jobs are renamed on Jenkins,
as Cabot stops monitoring it and never alerts on this.
Although Cabot is currently very relaxed when dealing with
Jenkins errors, since 94dcdf9 Cabot did fail on missing job.
This must have stopped working following a Jenkins API change.
Here, we catch the `jenkinsapi` `UnknownJob` exception and
set `status_code` to the value expected by the `run` method.
Also add a unit-test for that behaviour.
This is a quick fix ; but in general the entire run method
may need refactoring to not use `status_code` anymore,
We may want to consider dealiing with the `jenkinsapi` exceptions
in the `run` method rather than catching them in `get_job_status`
and setting the `status_code`.
Closes#537
Instead of hitting the Jenkins API directly using `requests`,
we delegate this to the `jenkinsapi` package, which provides
useful abstractions for that.
Also add unit tests for that new method
To test the JenkinsCheck logic, we were going
as deep as mocking the Jenkins HTTP response.
This changes to mock the `get_job_status` response,
paving the way to change the Jenkins access layer
without impacting these tests.
* add login using google login
* Add `is_public flag` to services
* Add public view for services marked as public
* Add base_public.html for unauthenticated users and use that with authenticated views
* fix first time setup issue. change setup.html and about.html to extend from base_public.html template and redirect from home to setup if necessary
Pull-request #533
We have deeply revamped the deployment process of Cabot
(docker setup and Pypi packaging) which has deprecated
the provisioning scripts and the Fabric script.
Closes#493