Skip to content

Commit 5a10e7a

Browse files
committed
Add PP website, clean registry, adds private feed, nuget, docker, azure pipeline
Set RootHttpUrl to perfectparallel-unitynuget.azurewebsites.net Sanitize registry.json and add packages of interest Separate packages sources to not polute Trackman's nuget feed with packages from NuGet Gallery when they are synced through fallback feed option on azure Add private feed packages Add Azure pipeline NuGet.Config: Uses packageSourceMapping to optimize storage
1 parent 84dc2ed commit 5a10e7a

File tree

5 files changed

+163
-1177
lines changed

5 files changed

+163
-1177
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ RUN dotnet publish src -a $TARGETARCH -c Release -o /app/src/out
1717
FROM mcr.microsoft.com/dotnet/aspnet:7.0
1818
WORKDIR /app
1919
COPY --from=build /app/src/out .
20+
RUN mkdir /root/.nuget
21+
COPY ./NuGet.Config /root/.nuget/NuGet/NuGet.Config
2022
ENTRYPOINT ["dotnet", "UnityNuGet.Server.dll"]

NuGet.Config

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5+
<add key="PrivateFeed" value="%NUGET_FEED_URL%" />
6+
<add key="MainPrivateFeed" value="%NUGET_MAIN_FEED_URL%" />
7+
</packageSources>
8+
9+
<packageSourceCredentials>
10+
<PrivateFeed>
11+
<add key="Username" value="%NUGET_REG_USERNAME%" />
12+
<add key="ClearTextPassword" value="%NUGET_REG_PASSWORD%" />
13+
</PrivateFeed>
14+
<MainPrivateFeed>
15+
<add key="Username" value="%NUGET_REG_USERNAME%" />
16+
<add key="ClearTextPassword" value="%NUGET_REG_PASSWORD%" />
17+
</MainPrivateFeed>
18+
</packageSourceCredentials>
19+
20+
<packageSourceMapping>
21+
<packageSource key="MainPrivateFeed">
22+
<package pattern="TrackMan.SharedCalculator" />
23+
</packageSource>
24+
<packageSource key="PrivateFeed">
25+
<package pattern="Trackman.*" />
26+
<package pattern="I18Next.Net*" />
27+
</packageSource>
28+
29+
<packageSource key="nuget.org">
30+
<package pattern="*" />
31+
</packageSource>
32+
</packageSourceMapping>
33+
</configuration>

azure-pipelines.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Docker
2+
# Build and push an image to Azure Container Registry
3+
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
4+
5+
trigger:
6+
- master
7+
8+
resources:
9+
- repo: self
10+
11+
variables:
12+
# Container registry service connection established during pipeline creation
13+
dockerRegistryServiceConnection: '408a6f09-68d4-43cb-8155-ae1316d97331'
14+
imageRepository: 'perfectparallelunitynuget'
15+
containerRegistry: 'tmgolf.azurecr.io'
16+
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
17+
tag: '$(Build.BuildId)'
18+
19+
# Agent VM image name
20+
vmImageName: 'ubuntu-latest'
21+
22+
stages:
23+
- stage: Build
24+
displayName: Build and push stage
25+
jobs:
26+
- job: Build
27+
displayName: Build
28+
pool:
29+
vmImage: $(vmImageName)
30+
steps:
31+
- task: Docker@2
32+
displayName: Build and push an image to container registry
33+
inputs:
34+
command: buildAndPush
35+
repository: $(imageRepository)
36+
dockerfile: $(dockerfilePath)
37+
containerRegistry: $(dockerRegistryServiceConnection)
38+
tags: |
39+
$(tag)

0 commit comments

Comments
 (0)