1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Update output directory for dotnet builds (#1358)

* Update output directory for dotnet builds

* Update Dotnet build output path
This commit is contained in:
Vince Grassia 2021-05-27 12:16:12 -04:00 committed by GitHub
parent fffdd17915
commit 21003c61ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 56 additions and 59 deletions

View File

@ -83,9 +83,6 @@ jobs:
dotnet: true
- service_name: Attachments
base_path: ./util
- service_name: Billing
base_path: ./src
dotnet: true
- service_name: Events
base_path: ./src
dotnet: true
@ -183,7 +180,7 @@ jobs:
echo "Restore"
dotnet restore
echo "Clean"
dotnet clean -c "Release" -o obj/Azure/publish
dotnet clean -c "Release" -o obj/build-output/publish
- name: Execute Gulp
if: ${{ matrix.gulp }}
@ -197,9 +194,9 @@ jobs:
working-directory: ${{ matrix.base_path }}/${{ matrix.service_name }}
run: |
echo "Publish"
dotnet publish -c "Release" -o obj/Azure/publish
dotnet publish -c "Release" -o obj/build-output/publish
cd obj/Azure/publish
cd obj/build-output/publish
zip -r ${{ matrix.service_name }}.zip .
mv ${{ matrix.service_name }}.zip ../../../
@ -285,12 +282,12 @@ jobs:
echo "Restore"
dotnet restore
echo "Clean"
dotnet clean -c "Release" -o obj/Azure/publish
dotnet clean -c "Release" -o obj/build-output/publish
echo "Publish"
dotnet publish -c "Release" -o obj/Azure/publish
dotnet publish -c "Release" -o obj/build-output/publish
dotnet swagger tofile --output ../../swagger.json --host https://api.bitwarden.com \
./obj/Azure/publish/Api.dll public
./obj/build-output/publish/Api.dll public
cd ../..
env:
ASPNETCORE_ENVIRONMENT: Production

View File

@ -120,7 +120,7 @@ jobs:
echo "Restore"
dotnet restore $SERVICE_NAME.csproj
echo "Clean"
dotnet clean $SERVICE_NAME.csproj -c "Release" -o obj/Azure/publish
dotnet clean $SERVICE_NAME.csproj -c "Release" -o obj/build-output/publish
if [ "$GULP" == "true" ]; then
npm install
@ -129,9 +129,9 @@ jobs:
fi
echo "Publish"
dotnet publish $SERVICE_NAME.csproj -c "Release" -o obj/Azure/publish
dotnet publish $SERVICE_NAME.csproj -c "Release" -o obj/build-output/publish
cd obj/Azure/publish
cd obj/build-output/publish
zip -r $SERVICE_NAME.zip .
mv $SERVICE_NAME.zip ../../../
env:

View File

@ -72,7 +72,7 @@ jobs:
echo "Restore"
dotnet restore $SERVICE_NAME.csproj
echo "Clean"
dotnet clean $SERVICE_NAME.csproj -c "Release" -o obj/Azure/publish
dotnet clean $SERVICE_NAME.csproj -c "Release" -o obj/build-output/publish
if [ "$GULP" == "true" ]; then
npm install
@ -81,9 +81,9 @@ jobs:
fi
echo "Publish"
dotnet publish $SERVICE_NAME.csproj -c "Release" -o obj/Azure/publish
dotnet publish $SERVICE_NAME.csproj -c "Release" -o obj/build-output/publish
cd obj/Azure/publish
cd obj/build-output/publish
zip -r $SERVICE_NAME.zip .
mv $SERVICE_NAME.zip ../../../
env:

View File

@ -183,12 +183,12 @@ jobs:
echo "Restore"
dotnet restore
echo "Clean"
dotnet clean -c "Release" -o obj/Azure/publish
dotnet clean -c "Release" -o obj/build-output/publish
echo "Publish"
dotnet publish -c "Release" -o obj/Azure/publish
dotnet publish -c "Release" -o obj/build-output/publish
dotnet swagger tofile --output ../../swagger.json --host https://api.bitwarden.com \
./obj/Azure/publish/Api.dll public
./obj/build-output/publish/Api.dll public
cd ../..
env:
ASPNETCORE_ENVIRONMENT: Production

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -11,14 +11,14 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Portal.csproj"
echo "Clean"
dotnet clean "$DIR/Portal.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Portal.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Node Build"
cd "$DIR"
npm install
cd "$CUR_DIR"
gulp --gulpfile "$DIR/gulpfile.js" build
echo "Publish"
dotnet publish "$DIR/Portal.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Portal.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo -e "\nBuilding docker image"
docker --version

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -11,14 +11,14 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Sso.csproj"
echo "Clean"
dotnet clean "$DIR/Sso.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Sso.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Node Build"
cd "$DIR"
npm install
cd "$CUR_DIR"
gulp --gulpfile "$DIR/gulpfile.js" build
echo "Publish"
dotnet publish "$DIR/Sso.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Sso.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo -e "\nBuilding docker image"
docker --version

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -11,14 +11,14 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Admin.csproj"
echo "Clean"
dotnet clean "$DIR/Admin.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Admin.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Node Build"
cd "$DIR"
npm install
cd "$CUR_DIR"
gulp --gulpfile "$DIR/gulpfile.js" build
echo "Publish"
dotnet publish "$DIR/Admin.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Admin.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo -e "\nBuilding docker image"
docker --version

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish/Api .
COPY obj/build-output/publish/Api .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Api.csproj"
echo "Clean"
dotnet clean "$DIR/Api.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Api"
dotnet clean "$DIR/Api.csproj" -c "Release" -o "$DIR/obj/build-output/publish/Api"
echo "Publish"
dotnet publish "$DIR/Api.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Api"
dotnet publish "$DIR/Api.csproj" -c "Release" -o "$DIR/obj/build-output/publish/Api"
echo -e "\nBuilding docker image"
docker --version

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish/Events .
COPY obj/build-output/publish/Events .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Events.csproj"
echo "Clean"
dotnet clean "$DIR/Events.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Events"
dotnet clean "$DIR/Events.csproj" -c "Release" -o "$DIR/obj/build-output/publish/Events"
echo "Publish"
dotnet publish "$DIR/Events.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Events"
dotnet publish "$DIR/Events.csproj" -c "Release" -o "$DIR/obj/build-output/publish/Events"
echo -e "\nBuilding docker image"
docker --version

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/EventsProcessor.csproj"
echo "Clean"
dotnet clean "$DIR/EventsProcessor.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/EventsProcessor.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Publish"
dotnet publish "$DIR/EventsProcessor.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/EventsProcessor.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
if [ "$1" != "nodocker" ]
then

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Icons.csproj"
echo "Clean"
dotnet clean "$DIR/Icons.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Icons.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Publish"
dotnet publish "$DIR/Icons.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Icons.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
if [ "$1" != "nodocker" ]
then

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Identity.csproj"
echo "Clean"
dotnet clean "$DIR/Identity.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Identity.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Publish"
dotnet publish "$DIR/Identity.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Identity.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo -e "\nBuilding docker image"
docker --version

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -11,7 +11,7 @@ RUN apt-get update \
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Notifications.csproj"
echo "Clean"
dotnet clean "$DIR/Notifications.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Notifications.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Publish"
dotnet publish "$DIR/Notifications.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Notifications.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
if [ "$1" != "nodocker" ]
then

View File

@ -1,3 +1,3 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/

View File

@ -2,4 +2,4 @@ FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
LABEL com.bitwarden.product="bitwarden"
COPY obj/Docker/publish /bitwarden_server
COPY obj/build-output/publish /bitwarden_server

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Server.csproj"
echo "Clean"
dotnet clean "$DIR/Server.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Server.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Publish"
dotnet publish "$DIR/Server.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Server.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo -e "\nBuilding docker image"
docker --version

View File

@ -1,4 +1,4 @@
*
!obj/Docker/publish/*
!obj/build-output/publish/*
!obj/Docker/empty/
!entrypoint.sh

View File

@ -9,7 +9,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY obj/Docker/publish .
COPY obj/build-output/publish .
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

View File

@ -10,9 +10,9 @@ echo ".NET Core version $(dotnet --version)"
echo "Restore"
dotnet restore "$DIR/Setup.csproj"
echo "Clean"
dotnet clean "$DIR/Setup.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet clean "$DIR/Setup.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo "Publish"
dotnet publish "$DIR/Setup.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
dotnet publish "$DIR/Setup.csproj" -c "Release" -o "$DIR/obj/build-output/publish"
echo -e "\nBuilding docker image"
docker --version