th: everyone (doesn't) gets rspec'd in ci :3

th-downstream
Kouhai 2 years ago
parent bee2a9acf4
commit c1abcae69a

@ -14,10 +14,21 @@ clone:
depth: 10
pipeline:
build:
build-base:
<<: *docker-step
commands:
- docker version
- docker image build -f Dockerfile --build-arg SOURCE_TAG=$CI_COMMIT_SHA . --target build-base -t $NAME:build-base
# the world is not yet ready for this step
# test:
# <<: *docker-step
# commands:
# - docker run --rm -e RAILS_ENV=test -e NODE_ENV=development $NAME:build-base sh -c 'bundle config set --local without development && bundle install && rake spec'
build:
<<: *docker-step
commands:
- docker image build -f Dockerfile --build-arg SOURCE_TAG=$CI_COMMIT_SHA . -t $NAME:latest
- docker tag $NAME:latest $NAME:$CI_COMMIT_SHA

@ -3,7 +3,7 @@
ARG NODE_VERSION="18.15-bullseye-slim"
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.1-slim as ruby
FROM node:${NODE_VERSION} as build
FROM node:${NODE_VERSION} as build-base
COPY --link --from=ruby /opt/ruby /opt/ruby
@ -45,13 +45,16 @@ RUN \
yarn install --immutable && \
yarn cache clean
ENV RAILS_ENV="production" \
NODE_ENV="production"
# Precompile assets
# TODO(kouhai): we're currently patching node_modules because of emoji-mart.
# we should integrate our own fork instead.
COPY --link . /opt/mastodon
FROM build-base AS build
ENV RAILS_ENV="production" \
NODE_ENV="production"
ENV OTP_SECRET=precompile_placeholder \
SECRET_KEY_BASE=precompile_placeholder \
RAKE_NO_YARN_INSTALL_HACK=1

Loading…
Cancel
Save