gitlab-org--gitlab-foss/.gitlab/ci/pages.gitlab-ci.yml

39 lines
1.6 KiB
YAML
Raw Normal View History

.compress-public: &compress-public
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|json\|css\|svg\|xml\)$' -exec gzip -f -k {} \;
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|json\|css\|svg\|xml\)$' -exec brotli -f -k {} \;
2019-04-12 04:56:38 -04:00
pages:
extends:
- .default-retry
- .pages:rules
2019-04-12 04:56:38 -04:00
stage: pages
environment: pages
resource_group: pages
needs:
- job: "rspec:coverage"
- job: "coverage-frontend"
- job: "compile-production-assets"
- job: "compile-storybook"
# `update-tests-metadata` only runs on GitLab.com's EE schedules pipelines
# while `pages` runs for all the 2-hourly schedules.
- job: "update-tests-metadata"
optional: true
before_script:
- apt-get update && apt-get -y install brotli gzip
2019-04-12 04:56:38 -04:00
script:
- mv public/ .public/
- mkdir public/
- mkdir -p public/$(dirname "$KNAPSACK_RSPEC_SUITE_REPORT_PATH") public/$(dirname "$FLAKY_RSPEC_SUITE_REPORT_PATH") public/$(dirname "$RSPEC_PACKED_TESTS_MAPPING_PATH")
2019-04-12 04:56:38 -04:00
- mv coverage/ public/coverage-ruby/ || true
- mv coverage-frontend/ public/coverage-frontend/ || true
- mv storybook/public public/storybook || true
2019-04-12 04:56:38 -04:00
- cp .public/assets/application-*.css public/application.css || true
- mv $KNAPSACK_RSPEC_SUITE_REPORT_PATH public/$KNAPSACK_RSPEC_SUITE_REPORT_PATH || true
- mv $FLAKY_RSPEC_SUITE_REPORT_PATH public/$FLAKY_RSPEC_SUITE_REPORT_PATH || true
- mv $RSPEC_PACKED_TESTS_MAPPING_PATH.gz public/$RSPEC_PACKED_TESTS_MAPPING_PATH.gz || true
- *compress-public
2019-04-12 04:56:38 -04:00
artifacts:
paths:
- public
expire_in: 31d