mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 21:32:46 +00:00
Add possibility to run complement with coverage enabled (#2901)
This adds the possibility to run Complement with coverage enabled. In combination with https://github.com/matrix-org/complement/pull/566 we should then be able to extract the coverage logs, combine them with https://github.com/wadey/gocovmerge (or similar) and upload them to Codecov (with different flags, depending on SQLite, HTTP etc.)
This commit is contained in:
parent
f762ce1050
commit
e449d174cc
5 changed files with 36 additions and 32 deletions
27
Dockerfile
27
Dockerfile
|
@ -63,30 +63,3 @@ WORKDIR /etc/dendrite
|
|||
ENTRYPOINT ["/usr/bin/dendrite-monolith-server"]
|
||||
EXPOSE 8008 8448
|
||||
|
||||
#
|
||||
# Builds the Complement image, used for integration tests
|
||||
#
|
||||
FROM base AS complement
|
||||
LABEL org.opencontainers.image.title="Dendrite (Complement)"
|
||||
RUN apk add --no-cache sqlite openssl ca-certificates
|
||||
|
||||
COPY --from=build /out/generate-config /usr/bin/generate-config
|
||||
COPY --from=build /out/generate-keys /usr/bin/generate-keys
|
||||
COPY --from=build /out/dendrite-monolith-server /usr/bin/dendrite-monolith-server
|
||||
|
||||
WORKDIR /dendrite
|
||||
RUN /usr/bin/generate-keys --private-key matrix_key.pem && \
|
||||
mkdir /ca && \
|
||||
openssl genrsa -out /ca/ca.key 2048 && \
|
||||
openssl req -new -x509 -key /ca/ca.key -days 3650 -subj "/C=GB/ST=London/O=matrix.org/CN=Complement CA" -out /ca/ca.crt
|
||||
|
||||
ENV SERVER_NAME=localhost
|
||||
ENV API=0
|
||||
EXPOSE 8008 8448
|
||||
|
||||
# At runtime, generate TLS cert based on the CA now mounted at /ca
|
||||
# At runtime, replace the SERVER_NAME with what we are told
|
||||
CMD /usr/bin/generate-keys --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /ca/ca.crt --tls-authority-key /ca/ca.key && \
|
||||
/usr/bin/generate-config -server $SERVER_NAME --ci > dendrite.yaml && \
|
||||
cp /ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \
|
||||
/usr/bin/dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue