Граф коммитов

70 Коммитов

Автор SHA1 Сообщение Дата
Greg Guthe 626a01c326
ci: run autograph with docker for travis 2018-07-27 10:47:11 -04:00
Christopher Grebs a2992d70e8
Remove jdk8 default setting.
This should be the case with trusty these days alredy.
2018-06-19 08:22:28 +02:00
Christopher Grebs a2ddf0d5f4
Avoid logging through mozlog in tests experiment (#8528)
Closes #8451 (Doesn't necessary fix it, we don't want a unified logging-level but this PR makes logging much clearer.)

* Don't use verbose mode for tox
* Refactor logging settings
* Fix services logging, correct dev and stage settings, update docs
* Update logging
* Be vigilent about disabling all logging
* Remove MOZLOG_NAME from stage settings
2018-06-18 06:10:26 -07:00
Christopher Grebs 4fc08f2420
Pin travis l10n extraction to 'main' tox environment.
Only run the extraction on "main" environment to avoid creating
8 pull requests for each tox environment.
2018-05-31 08:11:56 +02:00
Mathieu Pillard 3ff221a52a Run new image uploads through pngcrush, add a command to handle existing ones
Icons and previews for both themes and non-themes should go through pngcrush.
For the existing content, the command `crush_images_for_top_addons` focuses
on the content displayed on landing pages only and should only be run once.
2018-02-27 01:52:45 +01:00
Andrew Williamson c05e4cfdf1
Generate static theme Preview on version submit (#7475) 2018-02-14 22:27:16 +08:00
Mathieu Pillard 5d095ca7c6 Move all autograph install step to start-autograph.sh 2018-02-05 12:52:49 +01:00
Mathieu Pillard 2803287b70 Re-organize travis jobs, drop autograph from all but the one with crypto tests 2018-02-05 12:52:49 +01:00
Christopher Grebs c3c31665e2
Revert "Revert "Refactor our tests and code to make better use of settings.TMP_PATH""
This reverts commit 3f7fe78093.
2018-02-02 12:47:50 +01:00
Mathieu Pillard f46c764d30 Run tests needing locales in a specific tox job on travis 2018-02-01 18:28:50 +01:00
Christopher Grebs 3f7fe78093
Revert "Refactor our tests and code to make better use of settings.TMP_PATH"
This reverts commit 778a94871a.
2018-01-30 14:22:23 +01:00
Mathieu Pillard b3c84893d7 Call codestyle tox env, not flake8, as it changed name 2018-01-23 13:13:19 +01:00
Christopher Grebs 778a94871a
Refactor our tests and code to make better use of settings.TMP_PATH
* Also let the dot in py.test die so that upstream is happy again :)
 * Update tox to 2.9.1
 * Make sure that our urlconf is reset *after* we set MEDIA_ROOT
 * Adapt file extraction handling to new TMP_PATH prefixes
 * Less dump_apps hacks since the apps.json file isn't present at the
   beginning of any test now thanks to temporary paths for every separate
   test
 * Rewrite read-only-mode tests to cope with pytest settings fixture
 * Remove atexit hack from settings_test

This will probably make things a lot easier for ui-tests as well.

Fixes #7205
Fixes #7206
2018-01-05 16:41:35 +01:00
Christopher Grebs c2b7f30d24
Add autograph signing server support (#6865)
Fixes #6640
Fixes #6866

This pull request adds support for our new Autograph signing server, adds it to our dockerized services and adds tests that now actually call our signing server.

* Add a waffle-switch for calls to our new autograph signing server
* Add the autograph signing server to docker-compose
* Add the autograph signing server to our travis setup
* avoid us specifying the signing server settings everywhere in the code, one single source of truth
* more use of `responses` instead of mocking, leaning towards
  the future where we can actually hit a signing server instead
  of a mock
* disallow http requests generically, unless configured otherwise
* Add migration for waffle flag
2017-11-13 17:29:57 +01:00
Mathieu Pillard d2411fd0b6 Rename editors to reviewers everywhere except in the URLs
URLs to follow in a later commit, it will need redirects etc.
2017-10-23 15:55:32 +02:00
Christopher Grebs 176383b168 Upgrade to Celery 4 (#6667)
* Update celery, config and dependencies to 4.x

* Remove usage of TaskSet, replace with group(), update `ampq`
* Enable redis on travis for better celery 4.x testing
* Fix lib/celery_tests
* Correct test testing email sending retrying on errors
* Fix celery subtask mocking errors.

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Ensure dependencies are updated for worker and web container.

* Restart all services after the dependency update

* Remove explicit celery loader environment variable.

* Restart all services in web and worker after running 'update_docker'

* Increase sleep time a bit
2017-10-16 11:16:41 +02:00
Mathieu Pillard 43d88b4f55 Revert "Upgrade to Celery 4 (#6625)"
This reverts commit 541688d5f2.

This caused some breakage on dev. We suspect it's because newrelic
hooks into the celery task launching code but does not support
celery 4.x yet.
2017-10-13 00:04:27 +02:00
Christopher Grebs 541688d5f2 Upgrade to Celery 4 (#6625)
* Update celery config to seamlessly upgrade to 4.x

* Update celery initialization for new configs and 4.x

* Update dependencies to celery 4.x

* Fix flake8

* Fix typo

* Remove usage of TaskSet, replace with group(), update `ampq`

* Enable redis on travis for better celery 4.x testing

* Fix more test setting names

* Fix lib/celery_tests

* Correct test testing email sending retrying on errors

* Fix celery subtask mocking errors.

* Fix new line

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Try something weird... ui-tests

* do we need extra hosts?

* more sleep?

* Try logging, try docker run to avoid port collisions

* More debugging

* Cleanup again

* Fix logs?

* Ensure dependencies are updated for worker and web container.

* Remove not functioning log saving for onw

* Restart all services after the dependency update
2017-10-12 21:05:21 +02:00
Benjamin Forehand Jr d6bb402a44 Updated UI-tests to run inside of docker and switched to circleci 2.0 (#6457)
* Updated config to use circleci as well as configure ui-tests to run within docker

* Removed hacky certifi installs

* Update requirements to master versions

Fixes #4697 (though not only that)
2017-10-05 13:14:08 +02:00
Christopher Grebs a50dc71b0d Start automating l10n message travis extraction (#6243)
* First prototype of a script that pushes extracted messages to github

* Fix generation, commit and push

* Set email and name properly

* Finalize script, add in safeguards again

* Always switch to master first

* Correct test when what script is being run

* Try correcting when our scripts are running and raise proper exit codes

* tmp

* fix committing

* Restrict commit to locale/ .po files

* Properly restore git config

* Whitespace

* Correctly unset signing that get's restored later. Thanks @eviljeff

* Don't touch git config, don't save things in netrc

* Commit templates too

* Try pushing directly to remote url, don't set any config
2017-09-14 22:36:43 +02:00
Christopher Grebs 4742ba6ac7
Travis: Switch back to trusty default image. 2017-07-26 10:33:20 +02:00
Christopher Grebs 5cfe4c4ffd
Merge branch 'master' of github.com:mozilla/addons-server into try-elasticsearch-latest 2017-07-24 13:46:17 +02:00
Christopher Grebs dd261e2e03 Explicity define 'mysql' service in travis config, move initialization to before_install. (#5987)
* Explicity define 'mysql' service in travis config, move initialization to before_install.

Simply do, what https://docs.travis-ci.com/user/database-setup/#MySQL
documents and hopefully fix our connection errors along the way.

* And switch back to use precise
2017-07-24 13:44:44 +02:00
Christopher Grebs 42f06f2a73
Merge branch 'master' of github.com:mozilla/addons-server into try-elasticsearch-latest 2017-07-24 12:30:52 +02:00
Andrew Williamson 4bded6e1bf Fix failing travis builds that are missing gettext (#5949) 2017-07-19 13:58:26 +01:00
Christopher Grebs b90bf13922 Merge pull request #5791 from mozilla/1573-implement-django-jinja
Loads of clean-ups along the way.

Fixes #1573

* Moves all helpers modules to templatetags.jinja_helpers - there are a few things in there that aren't jinja related so there'll be a follow-up to split that later
* Update Jinja2 to 2.9.6
* Add django-jinja 2.3.1
* move some jingo-minify helpers to olympia.lib to avoid any jingo imports
* unified |f and |fe helpers into one |format_html helper that always escapes everything unless the input is already |safe

* Move helpers, add requirements, fix imports.
* Give backend a proper name
* Port f and fe filters from jingo
* Make start porting reviews jinja helpers module, make first test pass
* Get a handful more tests working, get rid of get_env, more and more jingo calls.
* Disable extension matching, render .txt templates too, fixes more stats tests
* Fix csv_header template to produce some reasonable and csv parsable
* Set trim_blocks to be compatible with jingo
* Unify |f and |fe into one |format that simplifies escaping rules. Update tests.

I think having one unified |format filter is beneficial, especially
given that our current escaping rules were kinda complicated and allowed
for seriously dangerous combinations even with autoescape activated.

Now everything passed as an argument to |format is explicitly escaped
unless marked as |safe, there's no way around that anymore.

* Naive first version using |format instead of |f and |fe, might need more review.
* Fix format for unicode strings
* Rename |format to |format_html
* Move nl2br_xhtml to amo.jinja_helpers, use it in all our templates.
* Move datetime filter to our code temporarily, fix mocks, fix recursive error
* Move csrf call to django_jinja csrf_token tag, fix addons templatetags
* Fix |class_selected usage, fix render_with to get registered
* Remove hack from zadmin, fix zadmin templatetags
* Fix user delete photo test, don't rely on proper context updates that happen in order.
* Fix more nl2br tests
* Fix detail page escape, django escapes differently than jinja
* Remove context from edit_review_reply_form
* Fix date created format filter usage
* Remove templates setting user, fix can_review
* Fix collect_add_widget to not inherit the global context
* Remove happy unicode client
* Cleanup can_review, add tests
* Fix tests, django use different html character for double quote escaping
* Switch to firefox latest to check ui-tests
* Cleanup and fix do_truncate
* Remove jingo, copy jingo-minify helpers that depend on jingo to our lib for now
* Rename nl2br_xhtml -> nl2br
* Jinja 2.9 compat for reviews truncate filter
* Don't use TEMPLATE_DEBUG
* Set default value for q, happens on index page.
* Fix jinja2 formatting with newstyle gettext
2017-06-30 17:57:31 -07:00
Christopher Grebs a2e3bece85 Remove .tox from caches, we have seen far to many failures because of it. 2017-06-20 18:19:09 +08:00
Christopher Grebs efc66b997c Update ElasticSearch, travis and docker-compose configs
* Bump elasticsearch in travis to 2.3.3
* Fix index store config option for es 2.3.3
* Install es 5.1.1
* Fix es reference in travis.yml
* Fix es startup
* Let's try and switch to use jdk8
* Fix bulk_index import
* Set es 5.1 for docker compose too
* Fix docker image to use official elastic images.
* small travis cleanup
* Make sure xpack authentication is disabled for testing (for now)
* Let's try disabling xpack on travis too...
* Stupid hack to support es5 default auth on travis...
* Remove custom travis_es script
* Use ES 5.3 for now...
2017-06-16 12:01:32 +08:00
jrbenny35 5e027391c2 Added a few search and sort tests 2017-05-16 11:27:34 -07:00
Andreas Wagner 44345cf209 Use node6+ 2017-05-08 14:51:58 +02:00
Christopher Grebs a52087c76c Lower git clone --depth to 1, speedup travis builds by almost 50s 2017-04-19 23:06:02 +07:00
Mathieu Pillard fd1c07c3c6 Remove buildtimetrend webhook, we aren't using it any more
We removed the badge in f86377ca93
2017-03-30 11:20:37 +02:00
Benjamin Forehand Jr c1f2db3c19 Added complete configuration to enable UI testing. 2017-03-24 08:38:50 -07:00
Andrew Williamson 39cda74573 Remove coverage (#4178) 2017-01-03 12:49:24 +00:00
Christopher Grebs 96ec1a09b5 Remove versions environment from travis. We moved that to 'main'. 2016-10-13 15:57:10 +02:00
Christopher Grebs a56ca77199 Various performance improvements for travis tests. (#3044)
* Avoid calling 'npm install' twice (make update_deps and separately)
 * Split users, amo, versions into separate tasks
 * cache .tox folder to speedup dependency installation
 * only clone 3 levels deep
2016-07-06 17:46:50 +02:00
Mathieu Pillard 4968bb09d0 Swap jobs order in travis to make builds faster
'es' is usually 2 minutes faster than 'main', and the last job to
run usually starts later than the rest because it needs to wait
for one of the first jobs to be finished to start. So that last
job needs to be the fastest job that we have to speed the whole
build up.
2016-06-15 09:51:12 +01:00
bqbn 0f84b2a6d0 Update sha256sum values for a few packages (#2884)
* Update sha256sum values for a few packages

pypi use different packaging format for a few packages which results in
different sha256sum values.

* Further remove pyrepo dependency from other places.

This is to address https://github.com/mozilla/addons-server/issues/2885
as well, to remove pyrepo from docker build flow.

* Update sha256sum for a few dev packages

* Add swig to support compiling the m2crypto module

* Replace "sudo apt-get" with "addons.apt.packages"

This is because Travis' containerized build infrastructure doesn't
support sudo.

* Add swig to the Dockerfile as well

SWIG_FEATURES="-D__x86_64__" is needed by M2Crypto-0.22.3 on CentOS
platform.
2016-06-13 09:22:49 -07:00
Christopher Grebs 46859e279d Integrate coverage and codecov reports. 2016-05-18 11:18:10 +02:00
Christopher Grebs 8788fa2b0d Don't cache .tox folder, we recreate the environment every time. 2016-05-12 15:53:33 +02:00
Christopher Grebs a9c0f82d5c Improve travis test runs.
* Remove instafail, show shorter tracebacks
 * Cache .tox, node_modules and pip
 * Upgrade pip and wheel to make sure we're using cached wheel packages
 * Fail the whole suite if one build already failed. This should give faster feedback for PRs
2016-04-15 16:46:13 +02:00
Andrew Williamson 15b80c5f12 split addons/editors/devhub build jobs 2016-03-31 16:35:54 +01:00
Mathieu Pillard f9c45b1a01 Explicitly declare all ES addons mapping fields, and add stricter tests. 2016-03-24 16:53:33 +01:00
Andreas Wagner d610033f26 Add Buildtime Trend 2016-03-18 12:23:38 +01:00
Christopher Grebs 984a704598 Run addons-linter for WebExtensions.
* Adds simple wrapper around addons-linter
* runs addons-linter if switch 'addons-linter' is active
* only runs it for WebExtensions
* Adds basic compatibility wrapper to integrate it's output
  into the rest of AMO without rewriting everything

fixes #882, fixes #1854, fixes #1853, fixes #1855, fixes #884
2016-03-17 15:56:49 +01:00
Kumar McMillan fa65808a2d Revert "Use the Travis cache to dramatically speed up test dependency installation."
This reverts commit 81d6f202ee.

django-cache-machine==0.8 does not match what we were using in the git
revision beforehand. This is blocking us on master so I'm just going to revert
temporarily while we fix up pyrepo to get the right packages on there.
2015-10-19 16:32:27 -05:00
Kris Maglione 81d6f202ee Use the Travis cache to dramatically speed up test dependency installation. 2015-10-19 10:36:28 -07:00
Mathieu Agopian f512618d64 Temporary fix for travis builds, revert tox version 2015-03-23 11:52:08 +01:00
Mathieu Agopian ca7441e30e Switch travis to python2.7 now that production has switched 2015-03-12 18:49:34 +01:00
Mathieu Agopian 4b2b03a365 disable travis cache (too slow) 2015-01-20 11:56:02 +01:00