Skip to content

Commit

Permalink
Merge branch '18F:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernel1997 authored Mar 22, 2024
2 parents fe678b2 + 7f4da23 commit 21c3785
Show file tree
Hide file tree
Showing 2,129 changed files with 4,828,914 additions and 61,463 deletions.
14 changes: 7 additions & 7 deletions .about.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ github:
- 18F/analytics.usa.gov
- 18F/analytics-reporter
- 18F/analytics-reporter-api
description: A lightweight dashboard that shows web traffic across the .gov domain.
impact: We designed a website that makes public and easy to understand the website analytics from the .gov domain.
description: A lightweight dashboard that shows web traffic across the .gov domain.
impact: We designed a website that makes public and easy to understand the website analytics from the .gov domain.
owner_type: project
testable: true
testable: true
partners:
- General Services Administration
stage: beta
Expand All @@ -20,15 +20,15 @@ milestones:
- 'March 2015: Analytics.USA.gov announced'
- 'December 2015: New features and expanded data feeds announced'
contact:
- dap@support.digitalgov.gov
stack:
- dap@gsa.gov
stack:
- jekyll
- bourbon
- neat
- d3
- node
- analytics-reporter
team:
team:
- github: tdlowden
role: lead
id: tim
Expand All @@ -46,4 +46,4 @@ licenses:
url: https://github.com/18F/analytics-reporter/blob/master/LICENSE.md
links:
- https://analytics.usa.gov
status:
status:
18 changes: 18 additions & 0 deletions .cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.*.sw?
.env
.DS_Store
*.log
./*.json
./*.json~
./*.csv
.sass-cache
Guardfile

./*.js
/*.gz
/*.map
/work
/dist
/node_modules
Dockerfile
Dockerfile.production
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

155 changes: 155 additions & 0 deletions .circleci/config.yml.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
version: 2.1

install_npm_packages: &install_npm_packages
run:
name: install npm dependencies
command: |
npm install
sudo npm install -g eslint
sudo npm install -g webpack
sudo npm install -g envsub
sudo npm install -g gulp-cli

copy_uswds_assets: &copy_uswds_assets
run:
name: copy uswds assets
command: npm run copy-assets

bundle_javascript: &bundle_javascript
run:
name: bundle for production javascript
command: npm run build-prod

install_gems: &install_gems
run:
name: install gems
command: bundle install

build_jekyll_site: &build_jekyll_site
run:
name: build site
command: bundle exec jekyll build

install_cf_cli: &install_cf_cli
run:
name: Install CF CLI
command: |
sudo wget --user-agent "Mozilla" -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - && sudo echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list && sudo apt-get update && sudo apt-get -y install cf8-cli curl

jobs:
development_env_deploy:
docker:
- image: cimg/ruby:3.1.4-browsers
steps:
- checkout
- run:
name: Replace Data URL in _config.yml file when deploying to develop
command: |
sed -i 's@url: https://analytics\.usa\.gov@url: https://analytics-develop.app.cloud.gov@g' _config.yml
sed -i 's@- name: ${APP_NAME}@- name: analytics-develop@g' manifest.yml
sed -i 's@- ${S3_BUCKET_NAME}@- analytics-s3-dev@g' manifest.yml
- *install_npm_packages
- *copy_uswds_assets
- *bundle_javascript
- *install_gems
- *build_jekyll_site
- *install_cf_cli
- run:
name: print env vars for debugging
command: |
env | sort -f
- run:
name: Run Envsubst on nginx.conf
command: |
sed -i 's@${S3_BUCKET_URL}/data/$url_full@${S3_BUCKET_URL_DEV}/data/$url_full@g' nginx.conf.src
envsubst '${S3_BUCKET_URL_DEV}' < nginx.conf.src > nginx.conf && pwd && cat nginx.conf
- run:
name: deploy
command: |
set -e
# Log into cloud.gov
cf api api.fr.cloud.gov
cf login -u $CF_USERNAME_DEV -p $CF_PASSWORD_DEV -o gsa-opp-analytics -s analytics-dev
cf push -f "./manifest.yml"
cf logout
staging_env_deploy:
docker:
- image: cimg/ruby:3.1.4-browsers
steps:
- checkout
- run:
name: Replace Data URL in _config.yml file when deploying to staging
command: |
sed -i 's@url: https://analytics\.usa\.gov@url: https://analytics-staging.app.cloud.gov@g' _config.yml
sed -i 's@- name: ${APP_NAME}@- name: analytics-staging@g' manifest.yml
sed -i 's@- ${S3_BUCKET_NAME}@- analytics-s3-staging@g' manifest.yml
- *install_npm_packages
- *copy_uswds_assets
- *bundle_javascript
- *install_gems
- *build_jekyll_site
- *install_cf_cli
- run:
name: Run Envsubst on nginx.conf
command: |
sed -i 's@${S3_BUCKET_URL}/data/$url_full@${S3_BUCKET_URL_STAGE}/data/$url_full@g' nginx.conf.src
envsubst '${S3_BUCKET_URL_STAGE}' < nginx.conf.src > nginx.conf && pwd && cat nginx.conf
- run:
name: deploy
command: |
set -e
# Log into cloud.gov
cf api api.fr.cloud.gov
cf login -u $CF_USERNAME_STAGE -p $CF_PASSWORD_STAGE -o gsa-opp-analytics -s analytics-staging
cf push -f "./manifest.yml"
cf logout
production_env_deploy:
docker:
- image: cimg/ruby:3.1.4-browsers
steps:
- checkout
- *install_npm_packages
- *copy_uswds_assets
- *bundle_javascript
- *install_gems
- *build_jekyll_site
- *install_cf_cli
- run:
name: Replace Data URL in _config.yml file when deploying to prod (First sed can go after cutover)
command: |
sed -i 's@url: https://analytics\.usa\.gov@url: https://analytics-prod.app.cloud.gov@g' _config.yml
sed -i 's@- name: ${APP_NAME}@- name: analytics-prod@g' manifest.yml
sed -i 's@- ${S3_BUCKET_NAME}@- analytics-s3-prod@g' manifest.yml
- run:
name: Run Envsubst on nginx.conf
command: |
sed -i 's@${S3_BUCKET_URL}/data/$url_full@${S3_BUCKET_URL_MAIN}/data/$url_full@g' nginx.conf.src
envsubst '${S3_BUCKET_URL_MAIN}' < nginx.conf.src > nginx.conf && pwd && cat nginx.conf
- run:
name: deploy
command: |
set -e
# Log into cloud.gov
cf api api.fr.cloud.gov
cf login -u $CF_USERNAME_MAIN -p $CF_PASSWORD_MAIN -o gsa-opp-analytics -s analytics-prod
cf push -f "./manifest.yml"
cf logout

workflows:
ci:
jobs:
- development_env_deploy:
filters:
branches:
only:
- develop
- staging_env_deploy:
filters:
branches:
only:
- staging
- production_env_deploy:
filters:
branches:
only:
- master
25 changes: 0 additions & 25 deletions .eslintrc

This file was deleted.

Loading

0 comments on commit 21c3785

Please sign in to comment.