Skip to content

Commit 52d58f1

Browse files
committed
bootstrap
0 parents  commit 52d58f1

File tree

1,431 files changed

+12795
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,431 files changed

+12795
-0
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git
2+
node_modules
3+
build

.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# OS generated files #
2+
######################
3+
.DS_Store
4+
.DS_Store?
5+
.Spotlight-V100
6+
.Trashes
7+
Icon?
8+
ehthumbs.db
9+
Thumbs.db
10+
11+
# Editor junk #
12+
#################
13+
*~
14+
*.swp
15+
*.swo
16+
17+
# Unit test / coverage reports
18+
#################
19+
htmlcov/
20+
.tox/
21+
.coverage
22+
.cache
23+
nosetests.xml
24+
coverage.xml
25+
coverage/
26+
27+
# Front-End #
28+
#############
29+
node_modules/
30+
build/
31+
env.json
32+
yarn-error.log
33+
setupProxy.js
34+
35+
.snyk
36+
.yarnclean

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: node_js
2+
node_js:
3+
- '8'
4+
sudo: false
5+
before_install:
6+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
7+
- export PATH=$HOME/.yarn/bin:$PATH
8+
install: yarn install --offline
9+
cache:
10+
yarn: true
11+
after_success:
12+
- bash <(curl -s https://codecov.io/bash) -e TRAVIS_NODE_VERSION

.yarnrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
lastUpdateCheck 1496303126136
6+
yarn-offline-mirror "./npm-packages-offline-cache"
7+
yarn-offline-mirror-pruning true
8+
--install.pure-lockfile true
9+
--install.offline true

Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM node:8.11.4-alpine as build-stage
2+
WORKDIR /usr/src/app
3+
4+
# install build dependencies
5+
COPY package.json yarn.lock .yarnrc ./
6+
# install packages offline
7+
COPY npm-packages-offline-cache ./npm-packages-offline-cache
8+
RUN yarn install
9+
10+
# create react app needs src and public directories
11+
COPY src ./src
12+
COPY public ./public
13+
14+
RUN yarn build
15+
16+
FROM nginx:1.15.1-alpine
17+
RUN rm -rf /etc/nginx/conf.d
18+
COPY nginx /etc/nginx
19+
COPY --from=build-stage /usr/src/app/build /usr/share/nginx/html/data-browser
20+
EXPOSE 80
21+
CMD ["nginx", "-g", "daemon off;"]

Jenkinsfile

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
podTemplate(label: 'buildDockerContainer', containers: [
2+
containerTemplate(name: 'docker', image: 'docker', ttyEnabled: true, command: 'cat'),
3+
containerTemplate(name: 'helm', image: 'lachlanevenson/k8s-helm', ttyEnabled: true, command: 'cat')
4+
],
5+
volumes: [
6+
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
7+
]) {
8+
node('buildDockerContainer') {
9+
sh "env | sort"
10+
11+
def repo = checkout scm
12+
def gitBranch = repo.GIT_BRANCH
13+
def gitCommit = repo.GIT_COMMIT
14+
def shortCommit = repo.GIT_COMMIT[0..7]
15+
def isDeployPR = sh(returnStdout: true, script: "git log -1").contains("[deploy pr]")
16+
def gitTagged = env.TAG_NAME != null
17+
18+
if (gitBranch == "master") {
19+
env.DOCKER_TAG = "latest"
20+
} else if (gitTagged) {
21+
env.DOCKER_TAG = env.TAG_NAME
22+
} else {
23+
env.DOCKER_TAG = env.BRANCH_NAME
24+
}
25+
26+
println "DOCKER_TAG: ${env.DOCKER_TAG}, TAG_NAME: ${env.TAG_NAME}, gitbranch: ${gitBranch}, shortCommit: ${shortCommit}, isDeployPR: ${isDeployPR}"
27+
28+
29+
stage('Build And Publish Docker Image') {
30+
container('docker') {
31+
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'dockerhub',
32+
usernameVariable: 'DOCKER_HUB_USER', passwordVariable: 'DOCKER_HUB_PASSWORD']]) {
33+
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'hmda-platform-jenkins-service',
34+
usernameVariable: 'DTR_USER', passwordVariable: 'DTR_PASSWORD']]) {
35+
withCredentials([string(credentialsId: 'internal-docker-registry', variable: 'DOCKER_REGISTRY_URL')]){
36+
sh "docker build --rm -t=${env.DOCKER_HUB_USER}/hmda-data-browser ."
37+
if (gitTagged || gitBranch == "master" || isDeployPR) {
38+
//Push to Dockerhub
39+
sh """
40+
docker tag ${env.DOCKER_HUB_USER}/hmda-data-browser ${env.DOCKER_HUB_USER}/hmda-data-browser:${env.DOCKER_TAG}
41+
docker login -u ${env.DOCKER_HUB_USER} -p ${env.DOCKER_HUB_PASSWORD}
42+
docker push ${env.DOCKER_HUB_USER}/hmda-data-browser:${env.DOCKER_TAG}
43+
"""
44+
45+
//Push to Internal Docker Repo
46+
sh """
47+
docker tag ${env.DOCKER_HUB_USER}/hmda-data-browser:${env.DOCKER_TAG} ${DOCKER_REGISTRY_URL}/${env.DOCKER_HUB_USER}/hmda-data-browser:${env.DOCKER_TAG}
48+
docker login ${DOCKER_REGISTRY_URL} -u ${env.DTR_USER} -p ${env.DTR_PASSWORD}
49+
docker push ${DOCKER_REGISTRY_URL}/${env.DOCKER_HUB_USER}/hmda-data-browser:${env.DOCKER_TAG}
50+
docker image prune -f
51+
"""
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
59+
stage('Deploy') {
60+
if (env.BRANCH_NAME == 'master' || isDeployPR) {
61+
container('helm') {
62+
sh "helm upgrade --install --force \
63+
--namespace=default \
64+
--values=kubernetes/hmda-data-browser/values.yaml \
65+
--set commitId=$shortCommit \
66+
--set image.pullPolicy=Always \
67+
--set image.tag=${env.DOCKER_TAG} \
68+
hmda-data-browser \
69+
kubernetes/hmda-data-browser"
70+
}
71+
}
72+
}
73+
74+
}
75+
76+
}

LICENSE

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
Creative Commons Legal Code
2+
3+
CC0 1.0 Universal
4+
5+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12+
HEREUNDER.
13+
14+
Statement of Purpose
15+
16+
The laws of most jurisdictions throughout the world automatically confer
17+
exclusive Copyright and Related Rights (defined below) upon the creator
18+
and subsequent owner(s) (each and all, an "owner") of an original work of
19+
authorship and/or a database (each, a "Work").
20+
21+
Certain owners wish to permanently relinquish those rights to a Work for
22+
the purpose of contributing to a commons of creative, cultural and
23+
scientific works ("Commons") that the public can reliably and without fear
24+
of later claims of infringement build upon, modify, incorporate in other
25+
works, reuse and redistribute as freely as possible in any form whatsoever
26+
and for any purposes, including without limitation commercial purposes.
27+
These owners may contribute to the Commons to promote the ideal of a free
28+
culture and the further production of creative, cultural and scientific
29+
works, or to gain reputation or greater distribution for their Work in
30+
part through the use and efforts of others.
31+
32+
For these and/or other purposes and motivations, and without any
33+
expectation of additional consideration or compensation, the person
34+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35+
is an owner of Copyright and Related Rights in the Work, voluntarily
36+
elects to apply CC0 to the Work and publicly distribute the Work under its
37+
terms, with knowledge of his or her Copyright and Related Rights in the
38+
Work and the meaning and intended legal effect of CC0 on those rights.
39+
40+
1. Copyright and Related Rights. A Work made available under CC0 may be
41+
protected by copyright and related or neighboring rights ("Copyright and
42+
Related Rights"). Copyright and Related Rights include, but are not
43+
limited to, the following:
44+
45+
i. the right to reproduce, adapt, distribute, perform, display,
46+
communicate, and translate a Work;
47+
ii. moral rights retained by the original author(s) and/or performer(s);
48+
iii. publicity and privacy rights pertaining to a person's image or
49+
likeness depicted in a Work;
50+
iv. rights protecting against unfair competition in regards to a Work,
51+
subject to the limitations in paragraph 4(a), below;
52+
v. rights protecting the extraction, dissemination, use and reuse of data
53+
in a Work;
54+
vi. database rights (such as those arising under Directive 96/9/EC of the
55+
European Parliament and of the Council of 11 March 1996 on the legal
56+
protection of databases, and under any national implementation
57+
thereof, including any amended or successor version of such
58+
directive); and
59+
vii. other similar, equivalent or corresponding rights throughout the
60+
world based on applicable law or treaty, and any national
61+
implementations thereof.
62+
63+
2. Waiver. To the greatest extent permitted by, but not in contravention
64+
of, applicable law, Affirmer hereby overtly, fully, permanently,
65+
irrevocably and unconditionally waives, abandons, and surrenders all of
66+
Affirmer's Copyright and Related Rights and associated claims and causes
67+
of action, whether now known or unknown (including existing as well as
68+
future claims and causes of action), in the Work (i) in all territories
69+
worldwide, (ii) for the maximum duration provided by applicable law or
70+
treaty (including future time extensions), (iii) in any current or future
71+
medium and for any number of copies, and (iv) for any purpose whatsoever,
72+
including without limitation commercial, advertising or promotional
73+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74+
member of the public at large and to the detriment of Affirmer's heirs and
75+
successors, fully intending that such Waiver shall not be subject to
76+
revocation, rescission, cancellation, termination, or any other legal or
77+
equitable action to disrupt the quiet enjoyment of the Work by the public
78+
as contemplated by Affirmer's express Statement of Purpose.
79+
80+
3. Public License Fallback. Should any part of the Waiver for any reason
81+
be judged legally invalid or ineffective under applicable law, then the
82+
Waiver shall be preserved to the maximum extent permitted taking into
83+
account Affirmer's express Statement of Purpose. In addition, to the
84+
extent the Waiver is so judged Affirmer hereby grants to each affected
85+
person a royalty-free, non transferable, non sublicensable, non exclusive,
86+
irrevocable and unconditional license to exercise Affirmer's Copyright and
87+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
88+
maximum duration provided by applicable law or treaty (including future
89+
time extensions), (iii) in any current or future medium and for any number
90+
of copies, and (iv) for any purpose whatsoever, including without
91+
limitation commercial, advertising or promotional purposes (the
92+
"License"). The License shall be deemed effective as of the date CC0 was
93+
applied by Affirmer to the Work. Should any part of the License for any
94+
reason be judged legally invalid or ineffective under applicable law, such
95+
partial invalidity or ineffectiveness shall not invalidate the remainder
96+
of the License, and in such case Affirmer hereby affirms that he or she
97+
will not (i) exercise any of his or her remaining Copyright and Related
98+
Rights in the Work or (ii) assert any associated claims and causes of
99+
action with respect to the Work, in either case contrary to Affirmer's
100+
express Statement of Purpose.
101+
102+
4. Limitations and Disclaimers.
103+
104+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
105+
surrendered, licensed or otherwise affected by this document.
106+
b. Affirmer offers the Work as-is and makes no representations or
107+
warranties of any kind concerning the Work, express, implied,
108+
statutory or otherwise, including without limitation warranties of
109+
title, merchantability, fitness for a particular purpose, non
110+
infringement, or the absence of latent or other defects, accuracy, or
111+
the present or absence of errors, whether or not discoverable, all to
112+
the greatest extent permissible under applicable law.
113+
c. Affirmer disclaims responsibility for clearing rights of other persons
114+
that may apply to the Work or any use thereof, including without
115+
limitation any person's Copyright and Related Rights in the Work.
116+
Further, Affirmer disclaims responsibility for obtaining any necessary
117+
consents, permissions or other rights required for any use of the
118+
Work.
119+
d. Affirmer understands and acknowledges that Creative Commons is not a
120+
party to this document and has no duty or obligation with respect to
121+
this CC0 or use of the Work.

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# HMDA Data Browser
2+
3+
Work-in-progress front-end for
4+
5+
## Dependencies
6+
7+
* [yarn](https://yarnpkg.com)
8+
9+
_This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). You can find the most recent information on how to perform common tasks in [this guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md)._
10+
11+
## Install
12+
13+
Clone this repo and run the following:
14+
15+
```
16+
yarn
17+
```
18+
19+
## Getting started
20+
21+
### Create React App
22+
23+
For local development you can run:
24+
25+
```
26+
yarn start
27+
```
28+
29+
`yarn start` will run the application in development mode, opening a browser window to http://localhost:3000.
30+
31+
The page will automatically reload if you make changes to the code.
32+
You will see the build errors and lint warnings in the console.
33+
34+
### Docker
35+
36+
To see the application running in a container you can run:
37+
38+
```
39+
docker run -p 80:80 hmda/hmda-pub-ui
40+
```
41+
42+
Open http://192.168.99.100/ (or your Docker Machine IP) to view the application.

TERMS.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
As a work of the United States Government, this package (excluding any
2+
exceptions listed below) is in the public domain within the United States.
3+
Additionally, we waive copyright and related rights in the work worldwide
4+
through the [CC0 1.0 Universal public domain dedication][cc0].
5+
6+
Software source code previously released under an open source license and then
7+
modified by CFPB staff or its contractors is considered a "joint work"
8+
(see 17 USC § 101); it is partially copyrighted, partially public domain,
9+
and as a whole is protected by the copyrights of the non-government authors and
10+
must be released according to the terms of the original open-source license.
11+
Segments written by CFPB staff, and by contractors who are developing software
12+
on behalf of CFPB are also in the public domain, and copyright and related
13+
rights for that work are waived through the CC0 1.0 Universal dedication.
14+
15+
For further details, please see the CFPB [Source Code Policy][policy].
16+
17+
## CC0 1.0 Universal Summary
18+
19+
This is a human-readable summary of the [Legal Code (read the full text)][cc0].
20+
21+
### No Copyright
22+
23+
The person who associated a work with this deed has dedicated the work to
24+
the public domain by waiving all of his or her rights to the work worldwide
25+
under copyright law, including all related and neighboring rights, to the
26+
extent allowed by law.
27+
28+
You can copy, modify, distribute and perform the work, even for commercial
29+
purposes, all without asking permission. See Other Information below.
30+
31+
### Other Information
32+
33+
In no way are the patent or trademark rights of any person affected by CC0,
34+
nor are the rights that other persons may have in the work or in how the
35+
work is used, such as publicity or privacy rights.
36+
37+
Unless expressly stated otherwise, the person who associated a work with
38+
this deed makes no warranties about the work, and disclaims liability for
39+
all uses of the work, to the fullest extent permitted by applicable law.
40+
When using or citing the work, you should not imply endorsement by the
41+
author or the affirmer.
42+
43+
[policy]: https://github.com/cfpb/source-code-policy/
44+
[cc0]: http://creativecommons.org/publicdomain/zero/1.0/legalcode
45+
46+
## Exceptions
47+
48+
_Source code or other assets that are excluded from the TERMS should be listed
49+
here. These may include dependencies that may be licensed differently or are
50+
not in the public domain._
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
appVersion: '2.7.0'
3+
description: A Helm chart for Kubernetes
4+
name: hmda-data-browser
5+
version: 2.7.0

0 commit comments

Comments
 (0)