~pfalcon/linaro-license-protection/openid-exception-for-internal-hosts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Linaro publishing platform development
======================================

Dependencies
------------

 * python (>=2.7, untested with python3)
 * python-beautifulsoup
 * python-html2text,
 * python-mock
 * python-subunit
 * testrepository (>=0.0.6)

Code structure
--------------

 * license_protected_downloads/

   Django application doing the file serving for Linaro publishing platform

 * templates/, templates_releases/, templates_snapshots/

   Default and overriding templates for several web sites we run this
   code on.

 * sampleroot/

   Sample root, helpful for development testing.
   Contains all possible combinations of options that are supported.

 * scripts/

   Contains a script for moving files from one location to the public
   location (publish_to_snapshots.py) and a deployment-helper script
   (update-deployment.py).

   jenkins-post-www.sh is an obsolete script replaced by
   publish_to_snapshots.

Style
-----

https://wiki.linaro.org/Platform/Infrastructure/CodingStyle

Upload system
-------------

Upload system deals with files in a private location and moves them into
a corresponding subdirectory under the public location (being served through
the web site).

Script that does that lives in

  scripts/publish_to_snapshots.py

The important concept here is that of "build types": they define what target
directory a build will end up in, and what, if any, postprocessing to do on it.

A simple 'openembedded' job type is added with the following change:

  https://code.launchpad.net/~fboudra/linaro-license-protection/openembedded-support-lp1032134/+merge/118060

Web site for downloads
----------------------

This is a django application, so standard django steps apply:

 ./manage.py syncdb
 ./manage.py collectstatic
 ./manage.py runserver

Run tests with

 ./manage.py test

Overriding templates for particular hosts
.........................................

There is already support for providing separate templates for
releases.linaro.org and snapshots.linaro.org.  Simply put them
inside one of

  templates_releases/
  templates_snapshots/

using the same names as in templates/, and they will be given
preference under appropriate subdomains.

staging instances
.................

lp:linaro-license-protection code gets automatically rolled out every
half an hour to

  staging.snapshots.linaro.org
  staging.releases.linaro.org