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

56 Коммитов

Автор SHA1 Сообщение Дата
Steve Jalim 970e524098
Amend all usage of docker-compose to be docker compose (#14954)
* Amend all usage of docker-compose to be docker compose

This is because the ubuntu-latest GHA image no longer supports the V1 compose API, which was breaking our CI.

https://github.com/actions/runner-images/issues/9692

This is a wholesale change, to ensure consistent use of the v2 syntax

* Address subtle container-naming change brough in with docker compose v2

With v1 we had Selenium Grid name containers ..._selenium-hub_1, but with v2
that changed to ...-selenium-hub-1, causing the jq filter to miss when trying
to extract the IP we needed.

* Remove now-redundant docker-compose.yaml version key
2024-08-02 22:27:37 +04:00
Steve Jalim 06d24e383f
Ensure Docker builds include any CSS needed when the CMS Admin mode is active, too (#14756)
To test this, I did `make build prod` to build a new release image, locally,
then shelled in:

$ pwd
/app
$ ls static/admin/css
autocomplete.4a81fc4242d0.css  dark_mode.ef27a31af300.css  nav_sidebar.269a1bd44627.css     rtl.css
autocomplete.css               dashboard.css               nav_sidebar.css                  vendor
base.523eb49842a7.css          dashboard.e90f2068217b.css  responsive.css                   widgets.css
base.css                       forms.c14e1cb06392.css      responsive.f6533dab034d.css      widgets.ee33ab26c7c2.css
changelists.9237a1ac391b.css   forms.css                   responsive_rtl.7d1130848605.css
changelists.css                login.586129c60a93.css      responsive_rtl.css
dark_mode.css                  login.css                   rtl.512d4b53fc59.css

I also compared this with a release image made yesterday, before this change:

$ pwd
/app
$ ls static/admin/
ls: cannot access 'static/admin/': No such file or directory
2024-07-01 16:25:47 +04:00
Paul McLanahan f480f0242f Update references to bedrock git default branch to main
Fix #9894
2022-04-15 14:49:12 -04:00
Alan c4a029e23b
Adding cdn tests (#11129)
* Adding cdn tests

Using a cdn mark to allow skipping or only running the cdn tests
uses ssllabs to get the tls/cipher information
That can be fairly slow, so trying to ensure it only happens once per run - so caching to a json file

* migrating existing tests into the functional area

* formatting failed in circle
2022-02-17 10:29:19 -08:00
Steve Jalim a8ed6ae9c4
Add pre-commit hook for including the MPLv2 in all source code files (#10617)
* 10614: Add pre-commit hook for including the MPLv2

Adds to Python, JS, SCSS, Jinja HTML, Fluent templates and shell scripts

Note that the order of application of the hooks is important - we want to add a missing license before we check the formatting of files

* 10614: Update MPLv2 comments on all templates to match standard format produced by pre-commit hook

* Updates existing MPLv2 text to use a https URL
* Amend a handful of Fluent templates that used a token instead of the string "Mozilla" - this standardised things; translation was not used or needed
* Add missing MPLv2 where needed
* Update three tests that regressed with these changes, above

* 10614: Update pre-commit config to not add MPL to JS libraries; Remove MPL from the four files which should not have had it
2021-10-22 13:09:44 +01:00
Rob Hudson 31943fea75 Black format all Python files 2021-09-30 16:03:35 -04:00
Paul McLanahan 3f4d9f0ccf
Fix image push for stage deployments 2020-11-16 16:00:35 -05:00
Paul McLanahan d0fb5d4daa Use a single docker image for all deployments
Have the app download the right data on startup. If that fails it won't
start the app and so the deployment will fail, but the existing
deployment will stay up.
2020-09-09 12:21:13 -04:00
Alex Gibson b2beca1cee Remove unused integration-test code (Fixes #8922) 2020-07-14 15:46:54 -04:00
Giorgos Logiotatidis 8512ac882b Use mozmeao dockerhub repo.
See https://github.com/mozmeao/infra/issues/1284
2020-05-26 10:21:49 -04:00
Paul McLanahan 0a6a72bad5 Remove deis scripts 2020-04-06 16:30:33 +01:00
Josh Mize ed20af35aa Use CI_COMMIT_REF_NAME set by gitlab by default for GIT_BRANCH 2019-11-15 14:43:00 -05:00
Alex Gibson 08061e954f Update Selenium to 3.141.0 (Fixes #7419) 2019-11-04 10:22:45 -06:00
Chris Beaven 5c7518d3cf Abstract a lockable management command, removing django-crontab 2019-05-02 10:32:03 -04:00
Josh Mize 93015f45a4 Remove smoke marker from tests (#7030) 2019-04-11 10:06:34 +01:00
Alex Gibson 2538f13e0b Switch sanity tests to run against IE9 (#6696) 2019-01-10 10:46:27 -06:00
Paul McLanahan 04df1d6a80 Use :latest docker tags for builds from "master"
Add :prod-latest tags for production images.
2018-08-23 15:43:15 -04:00
Paul McLanahan 202fe774e2 Upload static media to s3 on deploy (#5932) 2018-07-18 09:33:59 -05:00
Paul McLanahan a8171c5784 Switch from django-pipeline to gulp tasks for asset processing (#5618)
* Move from django-pipeline to Gulp for static-assets

* Use Gulp tasks to compile less and sass
* Use Gulp tasks to concatinate files into bundles
* Use Gulp tasks to minify files for deployment
* Use Gulp tasks for development to watch for changes
* Use BrowserSync to serve development static files and refresh the
  in-progress page
* Update Docker setup to use multi-stage build
* Update Makefile to build and run the docker setup
* Update docs to recommend Docker-based development
* Update deployment and testing to also use the Makefile

* Add rebuild of SASS bundles when library files change

* Add an intermediate build directory just for LESS and SASS
* Avoid issues with ambiguous imports when .css and .scss in the same
  directory

* Set deployment docker image in git env var script
2018-06-07 10:52:53 -05:00
Paul McLanahan 0cae03499f Remove -e option from "docker login" (#5664)
It was removed in a new version and we've just recently upgraded
2018-05-07 12:32:50 -05:00
Alex Gibson e26031301e Import @mozilla-protocol/core to bedrock (#5605) 2018-05-02 08:24:10 -07:00
Paul McLanahan 83a5412a7e Remove us-west from deployment and add oregon-b (#5545)
This also removes deis1 specific things like pushing to
the private docker registry and the deis1 CLI tool.
2018-04-02 09:51:53 -05:00
Paul McLanahan 1f3ca1bf81 Upload and distribute database updates via S3 (#5334)
A.K.A The Sqlitening!

This removes bedrock's depenence on a database server and moves to
downloading pre-built sqlite database files from s3 on a schedule. There
is also a clock process that will update and upload such a database on a
schedule as well. This should mean more stability, speed, and
reliability for bedrock, as well as quicker development due to easy to
download pre-populated databases.
2018-03-29 14:24:22 -05:00
alexgibson b55c514b2a Update functional tests to Selenium 3.5.0 2018-01-23 15:22:05 -05:00
Paul McLanahan ae51a45221 Move to CircleCI 2 for PR testing 2018-01-17 15:39:46 -05:00
Paul McLanahan ad4237afc7 Revert deployment changes (#5387)
* Revert "Fix container names in integration tests (#5386)"

This reverts commit aec7d9ca7b.

* Revert "Use branch name in test container names; avoid conflicts (#5385)"

This reverts commit 24abfb303d.
2018-01-11 16:34:31 -06:00
Paul McLanahan aec7d9ca7b Fix container names in integration tests (#5386) 2018-01-11 16:14:46 -06:00
Paul McLanahan 24abfb303d Use branch name in test container names; avoid conflicts (#5385)
If you try a deployment of two branches with the same commit
(e.g. master and prod) it will often fail due to conflicting
container names when they were just using commit hash. Adding
the branch name should eliminate these failures.
2018-01-11 15:48:27 -06:00
Paul McLanahan 4395f13e7c Move link gathering out of test discovery for download tests
Also stop download tests running by default.
2017-12-21 17:56:32 +00:00
Paul McLanahan fbade031ef Only run download test setup when tests are selected 2017-12-21 15:37:30 +00:00
Paul McLanahan 2b8905f632 Avoid testing all download URLs more than once per deployment 2017-12-20 18:26:44 +00:00
Paul McLanahan 3d09f83ca5 Switch to using official Python base docker image
Re https://github.com/mozmeao/infra/issues/641
2017-11-08 15:55:44 -05:00
Paul McLanahan ebd6a7c438 Move release notes views to rely on database
* No longer rely on release notes JSON files on the file system.
* Switch everything to new update_release_notes_data command
* Move to using django-memoize for releasenotes caching
2017-10-18 11:10:25 -04:00
Alex Gibson 44fa0b4ddc [fix bug 1402421] Update functional tests for the new homepage 2017-09-29 15:01:10 +01:00
Alex Gibson 782b354dc1 Run sanity functional tests in IE8 2017-09-29 13:19:29 +01:00
Paul McLanahan f9d55e9fc4 Bug 1388150: Convert release notes to use git repo and JSON
Will allow us to simplify bedrock by not installing RNA.

Remove:

* django-mozilla-rna
* django-restframework
* django-synctool

Do markdown conversion on load of release: Helps with cache and perf.

Add tests for new release models
2017-09-26 22:23:06 -04:00
Alex Gibson b962ff4dd5 Pin SauceLabs to Chrome 60 due to outdated chromedriver 2017-09-15 17:41:54 +01:00
Paul McLanahan 158a45468a Update product-details for local integration tests 2017-08-29 16:32:36 -04:00
Paul McLanahan 4002e7167a Fix bug 1369738: Add XML sitemap
Add a management command to generate a sitemap and update deployment
to generate and include it in the builds.

Thanks to @kyoshino in PR #1333 for most of the basis of this work.
2017-06-20 16:12:18 -04:00
Paul McLanahan 867040a19a Quiet demo deploy output 2017-06-15 15:35:09 -04:00
Paul McLanahan 20be1cfe20 Include test image in push to dockerhub
This will ensure that the test image is available to the
other jobs that need to tests bedrock instances.
2017-05-25 10:46:54 -04:00
Paul McLanahan d1530078c5 Tag all images as "latest" during prod push
This will allow other jobs (configurator e.g.) to use
the ":latest" images for testing and other things.
2017-05-23 16:33:46 -04:00
Paul McLanahan 4545530a27 Use sync gunicorn worker class for smoke tests
Meinheld (the default) is causing problems at tests startup,
but works better when deployed.
2017-05-23 11:24:47 -04:00
Paul McLanahan f3c79c3531 Switch deployment to use dockerized envcat 2017-05-12 10:35:24 -04:00
Paul McLanahan 914d8007f4 Restructure jenkins deployment. Demos build in main pipeline.
* Fix demo deploy and update docs.
* Make it work with deis1 and deis2
* Enforce max 63 char app names
* Fix SSL redirect for Deis v2 clusters. Allow settings per cluster.
* Improve env file handling and combination for demo deploys
* Use new envcat utility
* Deploy our dev, stage, and prod apps to virginia and tokyo clusters
2017-05-10 17:01:06 -04:00
Paul McLanahan 7bab6434d2 Downgrade Requests to fix LinkChecker
Turns out LinkChecker checks for a good version of python-requests
in a dumb way, so it sees version "2.13.0" as being lower than
"2.2.0". Also the project seems to have been abandoned, so there
isn't a newer release, though it seems this issue has been fixed
in the master branch.

Easiest fix is to just downgrade requests to the latest version
that is < 2.10.0, which is what I've done.
2017-03-15 10:10:56 -04:00
Paul McLanahan 252d599454 Add removal of containers to docker run commands
Also switch to using short git hash from build number for container names.
2017-03-02 13:35:17 -05:00
Paul McLanahan b5e40444e4 Add branch name to deploy image
This means that we can push dev l10n to www-dev and prod
l10n to stage and prod. Currently they all get prod l10n
at deployment then dev updates when cron runs.
2017-03-02 13:20:44 -05:00
Paul McLanahan 4a16758fd7 Add bash utility for setting git environment variables 2017-03-02 13:20:44 -05:00
Paul McLanahan 74c7c63c5d Add more options to jenkins.yml for deployments
* Add ability to toggle smoke tests
* Add ability to toggle deployment
* Add ability to toggle integration tests
* Add ability to toggle pushing docker images to public registry
2017-03-02 13:20:44 -05:00