perfo is an app that shows build performance from CI providers.
You will need the following things properly installed on your computer.
git clone git@github.com:peopledoc/perfo
cd perfo
yarn
Note that perfo includes not only a front ember app, but also an express server that is used to query CI providers for data and store user preferences.
To reduce strain on external CI APIs (and maybe avoid rate limiting), the server caches data requested from them in a filesystem-based cache. You can control that cache with environment variables.
You will need the following environment variables to run the app:
PERFO_CIRCLECI_TOKEN
: a CircleCI API token
Optionally, you may also set the following environment variables:
PERFO_CACHE_VALIDITY
: the server cache validity in milliseconds; defaults to 30 minutesPERFO_CACHE_PRUNE_INTERVAL
: the interval at which the whole cache content is checked for validity and expired items are removed; defaults to the cache validity valuePERFO_DATA_DIR
: the path where the server stores cache and stored data; defaults to adata
directory at the project rootPERFO_LOG_FORMAT
: format for morgan logs; defaults todev
PERFO_MAX_BUILD_AGE
: maximum age (in milliseconds) of builds to show data from; defaults to 3 monthsPERFO_ORG_FILTER
: if set, only make projects visible when their org is set to this value; defaults to no filterPERFO_PORT
: TCP port the server listens on; only used in production (the development server will always use the port passed toember serve
or 4200 as a default value); defaults to 4200PERFO_ROOT_URL
: the root URL where the app is served; defaults to/
ember serve
- Visit your app at http://localhost:4200
You will need a webserver that is capable of serving static files from a directory and proxying requests to a locally-running HTTP server.
- Build the app:
ember build --environment=production
- make sure the
PERFO_ROOT_URL
environment is set during the build to the value that will be used when executing the server - set up your webserver to serve the
dist
directory (or whichever directory you toldember build
to output into) at the root URL.
- make sure the
- Run
server/standalone.js
with node 11+- make sure environment variables are set properly
- make sure the user running the server can read and write into the directory
pointed by
PERFO_DATA_DIR
- you may want to use a process manager to ensure it keeps running.
- set up your webserver to proxy requests that did not hit a static file to
where the server is listening (̀
localhost:PERFO_PORT
).