Commit 9b2bcec0 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod CI: adding frontend assets to the prebuild

Closes #382

--HG--
branch : heptapod-stable
parent 5fc14f94261f
......@@ -45,9 +45,11 @@ include:
# Merge Requests (see `.shared:rules:update-cache`)
policy: pull-push
# this plays the role of the setup-test-env of upstream GitLab
# the main difference is that it is "colder" a single tarball per
# GitLab version
# this plays the role of the setup-test-env and compile-test-assets jobs
# of upstream GitLab. The main difference is that it is "colder" a single
# tarball per GitLab version. Even with frontend assets, the differences
# we can introduce on a given GitLab version don't matter for RSpec tests.
# It will be a different story when we launch functional tests ("qa").
gitlab-prebuilds:
extends:
- .use-pg11 # base image and services
......@@ -61,8 +63,20 @@ gitlab-prebuilds:
- run_timed_command "bundle exec ruby -I. -e 'require \"config/environment\"; TestEnv.init'"
- run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here
- rm tmp/tests/gitaly/.ruby-bundle # This file prevents gems from being installed even if vendor/gitaly-ruby is missing
# frontend assets production, copied from compile-assets-base.
- node --version
- run_timed_command "retry yarn install --frozen-lockfile"
- free -m
- run_timed_command "bin/rake gitlab:assets:compile > assets-compile.log 2>&1"
- run_timed_command "scripts/clean-old-cached-assets"
# end of frontent assets production
- run_timed_command "scripts/hgitaly-test-build"
- scripts/heptapod-make-push-gitlab-prebuilds.sh
artifacts:
paths:
- assets-compile.log
when: always
rspec:
rules:
......@@ -90,15 +104,6 @@ rspec:
# TODO put it in cellar and benefit from site-local caches
- wget --progress=dot:giga -O /tmp/gitlab-prebuilds.tar.gz https://download.heptapod.net/gitlab-prebuilds/ci-$(cat VERSION).tar.gz
- tar xzf /tmp/gitlab-prebuilds.tar.gz
# copied from compile-assets-base. The day we want several jobs, this
# will be one prime candidate to do like upstream and just produce an
# artifact instead
- node --version
- run_timed_command "retry yarn install --frozen-lockfile"
- free -m
- run_timed_command "bin/rake gitlab:assets:compile > assets-compile.log 2>&1"
- run_timed_command "scripts/clean-old-cached-assets"
# end of assets production
- ls -al tmp/tests/*
- run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here
- run_timed_command "scripts/gitaly-test-spawn"
......
......@@ -8,9 +8,13 @@ TARBALL=ci-$(cat VERSION).tar.gz
TARBALL_PATH=/tmp/${TARBALL}
echo "Generating ${TARBALL}"
# same paths as artifacts in upstream GitLab `setup-test-env` job
# same paths as artifacts in upstream GitLab `setup-test-env` job and
# `compile-test-assets`, plus tmp/tests/hgitaly, minus build logs kept
# as artifacts
tar zcf ${TARBALL_PATH} \
config/secrets.yml \
public/assets \
node_modules/@gitlab/svgs/dist/icons.json \
tmp/tests/gitaly \
tmp/tests/hgitaly \
tmp/tests/gitlab-shell \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment