This commit is contained in:
@@ -150,6 +150,9 @@ steps:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BAGET_IP=$(getent hosts baget | awk '{print $1}')
|
||||
echo "BaGet IP: $BAGET_IP"
|
||||
|
||||
cat projects-to-build.txt | while IFS='|' read -r PDIR PNAME; do
|
||||
PDIR=$(echo "$PDIR" | xargs)
|
||||
PNAME=$(echo "$PNAME" | xargs)
|
||||
@@ -170,7 +173,7 @@ steps:
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore "%%PROJECTDIR%%/%%PROJECTNAME%%.csproj" --source https://api.nuget.org/v3/index.json --source http://baget:80/v3/index.json
|
||||
RUN dotnet restore "%%PROJECTDIR%%/%%PROJECTNAME%%.csproj"
|
||||
RUN dotnet publish "%%PROJECTDIR%%/%%PROJECTNAME%%.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
@@ -184,7 +187,7 @@ steps:
|
||||
sed "s|%%PROJECTNAME%%|$REAL_PNAME|g; s|%%PROJECTDIR%%|$REAL_PDIR|g" "Dockerfile.temp" > "Dockerfile.final"
|
||||
|
||||
docker buildx build \
|
||||
--network=app-network \
|
||||
--add-host=baget:${BAGET_IP} \
|
||||
--platform linux/amd64 \
|
||||
-t "$(cat /tmp/tag.txt):${CI_COMMIT_SHA}" \
|
||||
-t "$(cat /tmp/tag.txt):latest" \
|
||||
|
||||
Reference in New Issue
Block a user