Commit Graph

70 Commits

Author SHA1 Message Date
bandesz
0c00f3aae8 Add AGS elb to AWS scripts 2016-11-22 16:19:51 +00:00
Imdad Ahad
75854d91fc Use python wheels to speed up deployments 2016-11-07 17:56:08 +00:00
Leo Hemsted
008c88e42c add junit xml reporting to pytest 2016-08-31 15:15:28 +01:00
bandesz
cf34aff673 Travis cleanup: remove deploy + functest trigger 2016-08-25 16:20:17 +01:00
bandesz
26ff449b77 Create Docker build image, build project with Docker 2016-08-22 17:25:05 +01:00
Leo Hemsted
d5238bce5b handle if user doesn't provide name/email
also clean up usage of DESKPRO_PERSON_EMAIL and put it in the conf rather than env
2016-08-04 18:01:08 +01:00
Martyn Inglis
147069a626 Removed unused dir change 2016-07-29 10:23:27 +01:00
Martyn Inglis
19aca03aed updated python in bootstrap file 2016-07-29 10:23:27 +01:00
Martyn Inglis
bf3bc1f2f7 Increase ELB timeout 2016-07-29 10:23:27 +01:00
Martyn Inglis
fe84674a77 Updated start scripts to not look up envrionemnt 2016-07-29 10:20:27 +01:00
Martyn Inglis
0cc3bb5970 using python3 in falback venv 2016-07-08 14:38:59 +01:00
Chris Hill-Scott
e775ea2446 Delete commented out lines
These aren’t being used, so why have them?
2016-07-05 09:28:20 +01:00
Chris Hill-Scott
9ced677ec7 Run tests on multiple CPU cores
We can make the tests run slightly faster by parallelizing them across
multiple CPU cores:

- from some casual testing locally, 2 cores gives the optimum speedup
- Travis container-based builds have 2 CPU cores available[1]
- the net gain is about 20%, or 2 seconds
- unfortunately we can’t do this on the API because each test is still
  using the same instance of the database

1. https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
2016-07-05 09:27:50 +01:00
Martyn Inglis
44b0bd3092 Scripts added to deregister admin app from ELB on deploy
- Application Stop state will deregister
- Application Start state re-registers

Ensures that the App instance is not receiving traffic before stopping the app as part of a code deploy

These scripts are from :

https://blogs.aws.amazon.com/application-management/post/Tx39X8HM93NXU47/Use-AWS-CodeDeploy-to-Deploy-to-Amazon-EC2-Instances-Behind-an-Elastic-Load-Bala

Adapted to remove notion of Autoscaling groups (which we don't use) and to use a named ELB, allows common file to be common and start/stop to be changed.
2016-05-18 13:08:51 +01:00
Chris Hill-Scott
37fff2da63 Revert "Install lxml first on ubuntu"
This reverts commit 844f9c4276.
2016-05-16 17:22:26 +01:00
Rebecca Law
844f9c4276 Install lxml first on ubuntu 2016-05-16 16:43:55 +01:00
Adam Shimali
461581d299 Only trigger dependent built for master, staging and live 2016-05-11 12:33:11 +01:00
Adam Shimali
521fdc26ab Pass branch name to dependent build 2016-05-10 14:10:08 +01:00
Adam Shimali
4d3697419a Should dependent build env var be set global? 2016-05-09 14:42:51 +01:00
Adam Shimali
506ef3a30f I think json for dependent build env var was incorrect 2016-05-09 14:10:07 +01:00
Adam Shimali
2c230fb6d8 Another attempt to trigger dependent build 2016-05-09 13:50:18 +01:00
Adam Shimali
10d5f03124 Another attempt at triggering dependent build 2016-05-09 13:33:52 +01:00
Adam Shimali
5e73fa9a2e Try to pass test env to run as part of trigger depdendent build 2016-05-09 12:57:30 +01:00
Rebecca Law
6c6dc51ea3 Revert changes to aws deployment location for master builds on preview environment 2016-04-18 14:13:38 +01:00
Rebecca Law
0b777b76a6 Update deployment files for aws 2016-04-15 16:31:31 +01:00
Nicholas Staples
6ea72182d2 Download CSV option now available. 2016-04-12 14:19:51 +01:00
Rebecca Law
02687710ae Remove commented code 2016-04-12 12:23:01 +01:00
Rebecca Law
9620d91330 Removed unused files and directory. 2016-04-11 09:35:50 +01:00
Chris Hill-Scott
5c4de3d13d Add code coverage
- generates a code coverage report
- triggers Coveralls on every Travis build
- adds a badge to the README
2016-04-07 11:03:27 +01:00
Adam Shimali
3e167c69f2 Clean up config a bit. Get values for config from environment.
Removed some old redundant config.
2016-03-23 15:07:04 +00:00
Martyn Inglis
2473b09beb Start aligning Admin app with config styles used elsewhere
- no config overrides - now all set in environment
- use different files for staging and live too allow for differently named env variables
- updates to run_app and run_tests scripts to set correct environment (test/development) so correct config picked up
- use environment file on deployed environments to pick correct config
2016-03-17 13:45:59 +00:00
Martyn Inglis
76ccb99666 Fixed up the health check page 2016-03-03 16:41:21 +00:00
Chris Hill-Scott
5b073341a0 Add frontend install and build to bootstrap script
Now you don’t need to remember what the two commands are and when you need to
run them, you can just run the bootstrap script instead.

Makes sense to have them here since the `pip install` is also in here.
2016-03-03 07:54:14 +00:00
Chris Hill-Scott
0201825c45 Add linting for SASS and Javascript
Similar to how PEP8 enforces Python style, there are tools for front end code:
- jshint[1] for Javascript
- sass-lint[2] for SASS

This commit adds the Gulp plugins for both, and sets up some sensible rules
(which can be iterated on).

It also adds a command to `./scripts/run_tests.sh`, so that any errors in the
front end code will fail the build before it has a chance to be deployed.

1. http://jshint.com/
2. https://www.npmjs.com/package/sass-lint
2016-02-08 12:02:22 +00:00
Nicholas Staples
c3b2fc1ca2 push-tag file added. 2016-01-29 14:42:45 +00:00
Nicholas Staples
5565fef27b Remove db commands from bootstrap. 2016-01-27 16:39:24 +00:00
Martyn Inglis
35b711f956 No db updates on admin app 2016-01-19 21:54:31 +00:00
Martyn Inglis
ca36b56d4c Run start/stop as ubuntu 2016-01-19 21:26:45 +00:00
Martyn Inglis
e075145945 Putting this back in the dependencies file for now
- this fails on the instance and not sure why, putting back till I can figure it out
2016-01-11 17:32:24 +00:00
Martyn Inglis
35b4f8f3a7 Removed the db upgrades 2016-01-11 17:23:10 +00:00
Martyn Inglis
362b2aeba7 New script to run db updates so can be done by ubuntu user 2016-01-11 17:00:04 +00:00
Martyn Inglis
63c87f10e7 Needed own file for db scripts. Need to compartmentalise running the app and the db upgrades into differing scripts. 2016-01-10 22:16:26 +00:00
Martyn Inglis
60f6601845 Copy the db upgrade command into WSGI script.
In there currently as wsgi has the credstash which we don't won't to apply in non-awe environments. This will need a refactor to better handle code duplication.
2016-01-10 21:53:41 +00:00
Martyn Inglis
cd1af56548 Fix python3/2 issues 2016-01-07 16:13:25 +00:00
Martyn Inglis
5cf3259dbf Fix python3/2 issues 2016-01-07 16:12:34 +00:00
Martyn Inglis
ef8964284c Integrated logging from the utils repo 2016-01-07 15:39:36 +00:00
Martyn Inglis
6943c88c48 Putting AWS back 2016-01-06 09:40:53 +00:00
Chris Hill-Scott
5ebeec08ae Use a Node-based tools for handling assets
…or how to move a bunch of things from a bunch of different places into
`app/static`.

There are three main reasons not to use Flask Assets:
- It had some strange behaviour like only
- It was based on Ruby SASS, which is slower to get new features than libsass,
  and meant depending on Ruby, and having the SASS Gem globally installed—so
  you’re already out of being a ‘pure’ Python app
- Martyn and I have experience of doing it this way on Marketplace, and we’ve
  ironed out the initial rough patches

The specific technologies this introduces, all of which are Node-based:
- Gulp – like a Makefile written in Javascript
- NPM – package management, used for managing Gulp and its related dependencies
- Bower – also package management, and the only way I can think to have
  GOV.UK template as a proper dependency

…speaking of which, GOV.UK template is now a dependency. This means it can’t be
modified at all (eg to add a global `#content` wrapper), so every page now
inherits from a template that has this wrapper. But it also means that we have a
clean upgrade path when the template is modified.

Everything else (toolkit, elements) I’ve kept as submodules but moved them to a
more logical place (`app/assets` not `app/assets/stylesheets`, because they
contain more than just SASS/CSS).
2016-01-05 13:12:35 +00:00
Martyn Inglis
cbd47fe2ce Export flask config in set up script 2015-12-17 11:18:27 +00:00
Martyn Inglis
5492116d19 Path wrong on start script 2015-12-17 11:08:37 +00:00