Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1060 - use npm ci during CI phase only #1061

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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