Fine tune ci file settings

The following discussion from !1974 should be addressed:

- [ ] @dstull started a [discussion](https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/1974#note_416047723): 

    > So this can really be cured, and I started down this path, but when I was finished, it was too much for this MR and would've caused it to become unfocused...so I kept this for now.
    > 
    > However, I will create a follow up with these thoughts:
    > 
    > <details>
    > 
    > <summary>.gitlab-ci.yml</summary>
    > 
    > ```yml
    > stages:
    >   - test
    >   - deploy
    >   - test-staging
    >   - deploy-production
    >   - post-deploy
    > 
    > default:
    >   image: 'registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34'
    >   tags:
    >     - gitlab-org
    >   services:
    >     - postgres:latest
    >     - redis:latest
    >   cache:
    >     key:
    >       files:
    >         - Gemfile.lock
    >         - yarn.lock
    >     paths:
    >       - vendor/ruby
    >       - .yarn-cache/
    > 
    > variables:
    >   POSTGRES_DB: 'payment_app_test'
    >   POSTGRES_HOST_AUTH_METHOD: trust
    >   RAILS_ENV: 'test'
    >   SIMPLECOV: 'true'
    >   REDIS_URL: 'redis://redis:6379/0/session'
    > 
    > include:
    >   - local: .gitlab/ci/global.gitlab-ci.yml
    >   - local: .gitlab/ci/danger.gitlab-ci.yml
    >   - template: Security/SAST.gitlab-ci.yml #https://docs.gitlab.com/ee/user/application_security/sast/
    >   - template: Security/Dependency-Scanning.gitlab-ci.yml #https://docs.gitlab.com/ee/user/application_security/dependency_scanning/
    > 
    > rubocop:
    >   extends:
    >     - .default-only
    >   stage: test
    >   before_script:
    >     - bundle install --without=production --jobs=$(nproc) --path=vendor --retry=3 --quiet
    >   script:
    >     - bundle exec rubocop
    >   except:
    >     - tags
    > 
    > linting:
    >   extends:
    >     - .default-before_script
    >     - .default-only
    >   stage: test
    >   script:
    >     - yarn lint
    > 
    > frontend_test:
    >   extends:
    >     - .default-before_script
    >     - .default-only
    >   stage: test
    >   script:
    >     - yarn test --ci --coverage
    >   artifacts:
    >     name: coverage-frontend
    >     expire_in: 31d
    >     when: always
    >     paths:
    >       - coverage-frontend/
    >       - junit_jest.xml
    >       - tmp/tests/frontend/
    >     reports:
    >       junit: junit_jest.xml
    > 
    > rspec:
    >   extends:
    >     - .default-before_script
    >     - .default-only
    >   stage: test
    >   script:
    >     - bundle exec rspec
    >   artifacts:
    >     expire_in: 31d
    >     when: always
    >     paths:
    >       - log/
    >       - coverage/
    >       - tmp/capybara/
    > 
    > pages:
    >   extends:
    >     - .default-before_script
    >   stage: deploy
    >   script:
    >     - mv public/ .public/
    >     - mkdir public/
    >     - mv coverage/ public/coverage-ruby/ || true
    >     - cp .public/assets/application-*.css public/application.css || true
    >     - cp .public/assets/application-*.css.gz public/application.css.gz || true
    >   artifacts:
    >     paths:
    >       - public
    >     expire_in: 30 days
    >   only:
    >     - master
    > 
    > deploy-staging:
    >   extends:
    >     - .default-before_script
    >   stage: deploy
    >   variables:
    >     NODE_ENV: 'production'
    >   script:
    >     - yarn install --check-files
    >     - ./bin/webpack
    >     - bundle exec bin/deploy staging
    >   only:
    >     - staging
    > 
    > end-to-end:
    >   stage: test-staging
    >   before_script:
    >     - cd qa
    >     - bundle install
    >   script:
    >     - bundle exec rspec spec --format progress --format RspecJunitFormatter --out rspec.xml
    >     - touch tmp/success
    >   after_script:
    >     - gem install httparty
    >     - |
    >       if [ -e qa/tmp/success ]; then
    >         bin/notify qa_success
    >       else
    >         bin/notify qa_failure
    >       fi;
    >   allow_failure: true
    >   variables:
    >     STAGING: 'true'
    >     QA_BROWSER: :chrome_headless
    >   when: delayed
    >   start_in: 40 minutes
    >   only:
    >     - staging
    >   artifacts:
    >     expire_in: 30d
    >     when: always
    >     paths:
    >       - qa/tmp/
    >     reports:
    >       junit: qa/rspec.xml
    > 
    > deploy-production:
    >   extends:
    >     - .default-before_script
    >   stage: deploy-production
    >   script:
    >     - git checkout $CI_COMMIT_REF_NAME
    >     - 'bundle exec bin/deploy production && git push https://customers-gitlab-com:$DEPLOY_API_TOKEN@gitlab.com/gitlab-org/customers-gitlab-com.git $CI_COMMIT_REF_NAME:master'
    >   when: delayed
    >   start_in: 2 hours
    >   only:
    >     - staging
    > 
    > notify-failure:
    >   extends:
    >     - .default-before_script
    >   stage: post-deploy
    >   script:
    >     - bundle exec bin/notify
    >   when: on_failure
    >   only:
    >     - staging
    > 
    > ```
    > 
    > </details>
    > 
    > 
    > <details>
    > <summary>.gitlab/ci/global.gitlab-ci.yml</summary>
    > 
    > ```yml
    > .default-before_script:
    >   before_script:
    >     - bundle install --without=production --jobs=$(nproc) --path=vendor --retry=3 --quiet
    >     - yarn install --frozen-lockfile --cache-folder .yarn-cache --prefer-offline
    >     - cp config/database.yml.ci config/database.yml
    >     - cp config/secrets.yml.example config/secrets.yml
    >     - RAILS_ENV=test bundle exec rake db:setup assets:precompile
    > 
    > .default-only:
    >   only:
    >     refs:
    >       - master
    >       - staging
    >       - merge_requests
    >       - tags
    > ```
    > 
    > </details>
    > 
    > <details>
    > <summary>danger.gitlab-ci.yml</summary>
    > 
    > ```yml
    > danger-review:
    >   stage: test
    >   image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger
    >   dependencies: []
    >   retry:
    >     max: 2  # This is confusing, but this means "3 runs at max".
    >     when:
    >       - unknown_failure
    >       - api_failure
    >       - runner_system_failure
    >       - job_execution_timeout
    >       - stuck_or_timeout_failure
    >   script:
    >     - git version
    >     - node --version
    >     - yarn install --frozen-lockfile --cache-folder .yarn-cache --prefer-offline
    >     - danger --fail-on-errors=true --verbose
    >   rules:
    >     - if: '$DANGER_REVIEW_DISABLED'
    >       when: never
    >     - if: '$CI_COMMIT_BRANCH =~ /^(master|staging)$/'
    >       when: never
    >     - if: '$DANGER_GITLAB_API_TOKEN == null || $DANGER_GITLAB_API_TOKEN == ""'
    >       when: never
    >     - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
    > ```
    > 
    > </details>
    > 
    > also - the current `default:` `before_script` is a bit wild here as it is being ran for almost all the jobs and is really needed only on about 1/2 of them. We are building almost the entire app on every single job for test and that takes time and resources we don't need to spend.

Story points: 3.0