th: everyone (doesn't) gets rspec'd in ci :3
ci/woodpecker/push/woodpecker Pipeline was successful Details

pull/59/head
kouhai dev 2023-04-22 00:14:40 -07:00
parent 2a31266b9d
commit d5e19ad44a
2 changed files with 19 additions and 5 deletions

View File

@ -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

View File

@ -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