Skip to content

Commit

Permalink
Fix #1060 - use npm ci during CI phase only (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeaugrand authored Aug 10, 2022
1 parent 38fad41 commit 2a433c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
working-directory: src/

- name: Build
run: dotnet build --no-restore
run: dotnet build --no-restore -p:ClientAssetsRestoreCommand="npm ci"
working-directory: src/

- name: Generate Open API documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
<PackageReference Include="Toolbelt.Blazor.LoadingBar" Version="13.1.2" />
</ItemGroup>

<PropertyGroup>
<ClientAssetsRestoreCommand Condition="'$(ClientAssetsRestoreCommand)' == ''">npm ci</ClientAssetsRestoreCommand>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shared\AzureIoTHub.Portal.Shared.csproj" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ COPY ["AzureIoTHub.Portal/Client/AzureIoTHub.Portal.Client.csproj", "AzureIoTHub
RUN dotnet restore "AzureIoTHub.Portal/Server/AzureIoTHub.Portal.Server.csproj"
COPY . .
WORKDIR "/src/AzureIoTHub.Portal/Server"
RUN dotnet build "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/build -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}"
RUN dotnet build "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/build -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" -p:ClientAssetsRestoreCommand="npm ci"

FROM builder AS publish
RUN dotnet publish "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/publish -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}"
RUN dotnet publish "AzureIoTHub.Portal.Server.csproj" -c Release -o /app/publish -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" -p:ClientAssetsRestoreCommand="npm ci"

FROM base AS final
WORKDIR /app
Expand Down

0 comments on commit 2a433c2

Please sign in to comment.