-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (52 loc) · 2.24 KB
/
Makefile
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
scss ?= static/scss/main.scss
css ?= static/css/main.css
all: styles
staging:
cd deploy/ && fab deploy --set environment=staging && cd ..
production:
cd deploy/ && fab deploy --set environment=production && cd ..
# standalone push, don't download data (assume it's present)
# suitable for automatic deploy from an unattended server
# uses credentials from the "scan-box-deployer" service
cg_production_autodeploy:
cf login -a $$CF_API -u $$CF_USERNAME -p $$CF_PASSWORD -o gsa-ogp-pulse -s pulse && cf push pulse
# download data externally and then deploy to production
cg_production:
make data_init && cf target -o gsa-ogp-pulse -s pulse && cf push pulse
cg_staging:
make data_init && cf target -o gsa-ogp-pulse -s pulse && cf push pulse-staging
debug:
DEBUG=true python pulse.py
styles:
sass $(scss):$(css)
watch:
sass --watch $(scss):$(css)
clean:
rm -f $(css)
# Production data update process:
#
# Run a fresh scan, update the database, and upload data to S3.
update_production:
python -m data.update --scan=here --upload
# Staging data update process:
#
# Download last production scan data, update the database.
update_staging:
python -m data.update --scan=download
# Development data update process:
#
# Don't scan or download latest data (rely on local cache), update database.
update_development:
python -m data.update --scan=skip
# downloads latest snapshot of data locally
# Pending cloud.gov production bucket:
# cg-4adefb86-dadb-4ecf-be3e-f1c7b4f6d084
# Pending cloud.gov backup bucket:
# cg-72ce4caf-d81b-4771-9b96-3624b5554587
data_init:
mkdir -p data/output/scan/results/
curl https://s3-us-gov-west-1.amazonaws.com/cg-4adefb86-dadb-4ecf-be3e-f1c7b4f6d084/live/scan/pshtt.csv > data/output/scan/results/pshtt.csv
curl https://s3-us-gov-west-1.amazonaws.com/cg-4adefb86-dadb-4ecf-be3e-f1c7b4f6d084/live/scan/tls.csv > data/output/scan/results/tls.csv
curl https://s3-us-gov-west-1.amazonaws.com/cg-4adefb86-dadb-4ecf-be3e-f1c7b4f6d084/live/scan/sslyze.csv > data/output/scan/results/sslyze.csv
curl https://s3-us-gov-west-1.amazonaws.com/cg-4adefb86-dadb-4ecf-be3e-f1c7b4f6d084/live/scan/meta.json > data/output/scan/results/meta.json
curl https://s3-us-gov-west-1.amazonaws.com/cg-4adefb86-dadb-4ecf-be3e-f1c7b4f6d084/live/db/db.json > data/db.json