1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-28 14:54:50 -05:00

Test all projects

This commit is contained in:
Vince Grassia 2023-11-09 17:07:47 -05:00
parent 2e2ec50f10
commit 0f2ebde2c5
No known key found for this signature in database
GPG Key ID: 9AD7505E8448CC08
16 changed files with 250 additions and 66 deletions

View File

@ -266,36 +266,36 @@ jobs:
include:
- project_name: Admin
base_path: ./src
# - project_name: Api
# base_path: ./src
# - project_name: Attachments
# base_path: ./util
# - project_name: Billing
# base_path: ./src
# - project_name: Events
# base_path: ./src
# - project_name: EventsProcessor
# base_path: ./src
# - project_name: Icons
# base_path: ./src
# - project_name: Identity
# base_path: ./src
# - project_name: MsSql
# base_path: ./util
# - project_name: MsSqlMigratorUtility
# base_path: ./util
# - project_name: Nginx
# base_path: ./util
# - project_name: Notifications
# base_path: ./src
# - project_name: Scim
# base_path: ./bitwarden_license/src
# - project_name: Server
# base_path: ./util
# - project_name: Setup
# base_path: ./util
# - project_name: Sso
# base_path: ./bitwarden_license/src
- project_name: Api
base_path: ./src
- project_name: Attachments
base_path: ./util
- project_name: Billing
base_path: ./src
- project_name: Events
base_path: ./src
- project_name: EventsProcessor
base_path: ./src
- project_name: Icons
base_path: ./src
- project_name: Identity
base_path: ./src
- project_name: MsSql
base_path: ./util
- project_name: MsSqlMigratorUtility
base_path: ./util
- project_name: Nginx
base_path: ./util
- project_name: Notifications
base_path: ./src
- project_name: Scim
base_path: ./bitwarden_license/src
- project_name: Server
base_path: ./util
- project_name: Setup
base_path: ./util
- project_name: Sso
base_path: ./bitwarden_license/src
steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Scim ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Sso ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -41,7 +41,9 @@ RUN npm install -g gulp
WORKDIR /source
COPY src/Admin/*.csproj ./src/Admin/
COPY src/Api/*.csproj ./src/Api/
COPY src/Billing/*.csproj ./src/Billing/
COPY src/Events/*.csproj ./src/Events/
COPY src/EventsProcessor/*.csproj ./src/EventsProcessor/
COPY src/Icons/*.csproj ./src/Icons/
COPY src/Identity/*.csproj ./src/Identity/
COPY src/Notifications/*.csproj ./src/Notifications/
@ -54,6 +56,8 @@ COPY src/SharedWeb/*.csproj ./src/SharedWeb/
COPY util/Migrator/*.csproj ./util/Migrator/
COPY util/MySqlMigrations/*.csproj ./util/MySqlMigrations/
COPY util/PostgresMigrations/*.csproj ./util/PostgresMigrations/
COPY util/Server/*.csproj ./util/Server/
COPY util/Setup/*.csproj ./util/Setup/
COPY util/SqliteMigrations/*.csproj ./util/SqliteMigrations/
COPY bitwarden_license/src/Commercial.Core/*.csproj ./bitwarden_license/src/Commercial.Core/
COPY bitwarden_license/src/Commercial.Infrastructure.EntityFramework/*.csproj ./bitwarden_license/src/Commercial.Infrastructure.EntityFramework/
@ -67,10 +71,18 @@ RUN . /tmp/rid.txt && dotnet restore -r $RID
WORKDIR /source/src/Api
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Restore Billing project dependencies and tools
WORKDIR /source/src/Billing
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Restore Events project dependencies and tools
WORKDIR /source/src/Events
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Restore Events project dependencies and tools
WORKDIR /source/src/EventsProcessor
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Restore Icons project dependencies and tools
WORKDIR /source/src/Icons
RUN . /tmp/rid.txt && dotnet restore -r $RID
@ -91,11 +103,21 @@ RUN . /tmp/rid.txt && dotnet restore -r $RID
WORKDIR /source/bitwarden_license/src/Scim
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Restore Server project dependencies and tools
WORKDIR /source/util/Server
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Restore Setup project dependencies and tools
WORKDIR /source/util/Setup
RUN . /tmp/rid.txt && dotnet restore -r $RID
# Copy required project files
WORKDIR /source
COPY src/Admin/. ./src/Admin/
COPY src/Api/. ./src/Api/
COPY src/Billing/. ./src/Billing/
COPY src/Events/. ./src/Events/
COPY src/EventsProcessor/. ./src/EventsProcessor/
COPY src/Icons/. ./src/Icons/
COPY src/Identity/. ./src/Identity/
COPY src/Notifications/. ./src/Notifications/
@ -108,6 +130,8 @@ COPY src/SharedWeb/. ./src/SharedWeb/
COPY util/Migrator/. ./util/Migrator/
COPY util/MySqlMigrations/. ./util/MySqlMigrations/
COPY util/PostgresMigrations/. ./util/PostgresMigrations/
COPY util/Server/. ./util/Server/
COPY util/Setup/. ./util/Setup/
COPY util/SqliteMigrations/. ./util/SqliteMigrations/
COPY util/EfShared/. ./util/EfShared/
COPY bitwarden_license/src/Commercial.Core/. ./bitwarden_license/src/Commercial.Core/
@ -124,10 +148,18 @@ RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Admin --no-restore --no-
WORKDIR /source/src/Api
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Api --no-restore --no-self-contained -r $RID
# Build Billing app
WORKDIR /source/src/Billing
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Billing --no-restore --no-self-contained -r $RID
# Build Events app
WORKDIR /source/src/Events
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Events --no-restore --no-self-contained -r $RID
# Build EventsProcessor app
WORKDIR /source/src/EventsProcessor
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/EventsProcessor --no-restore --no-self-contained -r $RID
# Build Icons app
WORKDIR /source/src/Icons
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Icons --no-restore --no-self-contained -r $RID
@ -149,3 +181,11 @@ RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Sso --no-restore --no-se
# Build Scim app
WORKDIR /source/bitwarden_license/src/Scim
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Scim --no-restore --no-self-contained -r $RID
# Build Server app
WORKDIR /source/util/Server
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Server --no-restore --no-self-contained -r $RID
# Build Setup app
WORKDIR /source/util/Setup
RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Setup --no-restore --no-self-contained -r $RID

View File

@ -21,7 +21,7 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy all apps from the build stage
# Copy app from the build stage
WORKDIR /app
COPY --from=bitwarden-build /app/Admin ./
COPY entrypoint.sh /

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Api ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,14 +21,12 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY --from=bitwarden-build /app/Billing ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
COPY obj/build-output/publish .
HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Admin ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,13 +21,12 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/EventsProcessor ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1
CMD ["./../entrypoint.sh"]
CMD ["/entrypoint.sh"]

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Icons ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Identity ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,6 +1,19 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,10 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
# Copy app from the build stage
WORKDIR /app
EXPOSE 5000
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Notifications ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,6 +1,19 @@
FROM bitwarden/server:latest
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -8,8 +21,9 @@ RUN apt-get update \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
# Copy app from the build stage
WORKDIR /bitwarden_server
COPY --from=bitwarden-build /app/Server ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -1,5 +1,6 @@
FROM nginx:stable
FROM --platform=$BUILDPLATFORM nginx:stable
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
RUN apt-get update \

View File

@ -1,5 +1,16 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
LABEL com.bitwarden.product="bitwarden"
COPY obj/build-output/publish /bitwarden_server
# Copy app from the build stage
WORKDIR /bitwarden_server
COPY --from=bitwarden-build /app/Server ./

View File

@ -1,5 +1,15 @@
###############################################
# Build stage #
###############################################
ARG BUILD_TAG=latest
FROM --platform=$BUILDPLATFORM bitwardenprod.azurecr.io/build:${BUILD_TAG} AS bitwarden-build
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden" com.bitwarden.project="setup"
RUN apt-get update \
@ -8,8 +18,9 @@ RUN apt-get update \
gosu \
&& rm -rf /var/lib/apt/lists/*
# Copy app from the build stage
WORKDIR /app
COPY obj/build-output/publish .
COPY --from=bitwarden-build /app/Setup ./
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh