Skip to content

Commit

Permalink
WIP: pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Aug 3, 2021
1 parent c749bba commit 31113ad
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
30 changes: 30 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -27,6 +27,11 @@ stages:
strategy:
parallel: 2
steps:
- task: Cache@2
inputs:
key: $(Agent.OS) | **/global.json, **/*.csproj
restoreKeys: $(Agent.OS)
path: $(Pipeline.Workspace)/../../.nuget/packages
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile Test --skip --partition $(System.JobPositionInPhase)/2'
Expand All @@ -42,6 +47,11 @@ stages:
displayName: '📦 Pack'
dependsOn: [ ]
steps:
- task: Cache@2
inputs:
key: $(Agent.OS) | **/global.json, **/*.csproj
restoreKeys: $(Agent.OS)
path: $(Pipeline.Workspace)/../../.nuget/packages
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile Pack --skip'
Expand All @@ -65,6 +75,11 @@ stages:
strategy:
parallel: 2
steps:
- task: Cache@2
inputs:
key: $(Agent.OS) | **/global.json, **/*.csproj
restoreKeys: $(Agent.OS)
path: $(Pipeline.Workspace)/../../.nuget/packages
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile Test --skip --partition $(System.JobPositionInPhase)/2'
Expand All @@ -80,6 +95,11 @@ stages:
displayName: '📦 Pack'
dependsOn: [ ]
steps:
- task: Cache@2
inputs:
key: $(Agent.OS) | **/global.json, **/*.csproj
restoreKeys: $(Agent.OS)
path: $(Pipeline.Workspace)/../../.nuget/packages
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile Pack --skip'
Expand All @@ -103,6 +123,11 @@ stages:
strategy:
parallel: 2
steps:
- task: Cache@2
inputs:
key: $(Agent.OS) | **/global.json, **/*.csproj
restoreKeys: $(Agent.OS)
path: $(Pipeline.Workspace)/../../.nuget/packages
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile Test --skip --partition $(System.JobPositionInPhase)/2'
Expand All @@ -118,6 +143,11 @@ stages:
displayName: '📦 Pack'
dependsOn: [ ]
steps:
- task: Cache@2
inputs:
key: $(Agent.OS) | **/global.json, **/*.csproj
restoreKeys: $(Agent.OS)
path: $(Pipeline.Workspace)/../../.nuget/packages
- task: CmdLine@2
inputs:
script: './build.cmd Restore Compile Pack --skip'
Expand Down
3 changes: 1 addition & 2 deletions build/Build.CI.AzurePipelines.cs
Expand Up @@ -33,8 +33,7 @@
#endif
InvokedTargets = new[] { nameof(ITest.Test), nameof(IPack.Pack) },
NonEntryTargets = new[] { nameof(IRestore.Restore), nameof(ICompile.Compile), nameof(InstallFonts), nameof(ReleaseImage) },
ExcludedTargets = new[] { nameof(Clean), nameof(ISignPackages.SignPackages) },
CacheKeyFiles = new string[0])]
ExcludedTargets = new[] { nameof(Clean), nameof(ISignPackages.SignPackages) })]
partial class Build
{
public class AzurePipelinesAttribute : Nuke.Common.CI.AzurePipelines.AzurePipelinesAttribute
Expand Down
Expand Up @@ -90,7 +90,7 @@ public bool TriggerBatch
public string[] PullRequestsPathsExclude { get; set; } = new string[0];

public string[] CacheKeyFiles { get; set; } = { "**/global.json", "**/*.csproj" };
public string CachePath { get; set; } = "~/.nuget/packages";
public string CachePath { get; set; } = "$(Pipeline.Workspace)/.nuget/packages";

public string[] ImportVariableGroups { get; set; } = new string[0];
public string[] ImportSecrets { get; set; } = new string[0];
Expand Down

0 comments on commit 31113ad

Please sign in to comment.