-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #856 from IgniteUI/vnext
RELEASE - merging vnext into master
- Loading branch information
Showing
1,016 changed files
with
24,989 additions
and
5,462 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
parameters: | ||
- name: igVersion | ||
- name: igNuGetFeedUrl | ||
- name: projectToBuild | ||
- name: isVerbose | ||
default: false | ||
- name: shouldCleanPostExectuion | ||
- name: username | ||
- name: password | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
displayName: 'Install Node' | ||
inputs: | ||
versionSource: 'spec' | ||
versionSpec: '16.x' | ||
|
||
- task: Npm@1 | ||
displayName: 'npm ci' | ||
inputs: | ||
command: custom | ||
workingDir: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.Gulp' | ||
verbose: ${{ parameters.isVerbose }} | ||
customCommand: ci | ||
|
||
- task: CmdLine@2 | ||
displayName: 'npx gulp copySamplesTo${{ parameters.projectToBuild }}' | ||
inputs: | ||
script: 'npx gulp copySamplesTo${{ parameters.projectToBuild }}' | ||
workingDirectory: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.Gulp' | ||
failOnStderr: true | ||
|
||
- task: UseDotNet@2 | ||
displayName: 'Install dotnet if not already present' | ||
inputs: | ||
packageType: 'sdk' | ||
version: '9.0.101' # we are currently building a 8.0 app. TODO: Try upgrading to 8.x in the future | ||
performMultiLevelLookup: false | ||
|
||
|
||
- task: PowerShell@2 | ||
displayName: 'Generate NuGet.config for IG ProGet NuGet feed and u' | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
dotnet new nugetconfig --force | ||
# The name of the source doesn't currently matter as the credentials are attached thanks to URL matching - according to MS docs | ||
dotnet nuget add source ${{ parameters.igNuGetFeedUrl }} --name "IG ProGet NuGet" --allow-insecure-connections | ||
# Manually add the allowInsecureConnections attribute to the nuget.config file | ||
$nugetConfigPath = "$(Build.SourcesDirectory)\NuGet.config" | ||
[xml]$nugetConfig = Get-Content $nugetConfigPath | ||
$nugetConfig.configuration.packageSources.add | Where-Object { $_.name -eq "IG ProGet NuGet" } | ForEach-Object { $_.allowInsecureConnections = "true" } | ||
$nugetConfig.Save($nugetConfigPath) | ||
failOnStderr: true | ||
showWarnings: true | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Identify trial packages and use licensed ones instead' | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
$xml = [XML](Get-Content '.\IgBlazorSamples.${{ parameters.projectToBuild }}.csproj'); | ||
$nodes = $xml.SelectNodes("//PackageReference[starts-with(@Include,'IgniteUI')]") | | ||
ForEach-Object { | ||
$_.SetAttribute("Include",$_.Include.Replace(".Trial","")); | ||
$_.SetAttribute("Version", "${{ parameters.igVersion }}"); | ||
Write-Host $_.Version | ||
} | ||
$xml.Save('.\IgBlazorSamples.${{ parameters.projectToBuild }}.csproj') | ||
failOnStderr: true | ||
showWarnings: true | ||
workingDirectory: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet restore' | ||
continueOnError: true | ||
enabled: true | ||
inputs: | ||
command: 'restore' | ||
projects: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}' | ||
# We want the dependency tree to be evaluated each time and to be sure that the dependencies are freshly downloaded | ||
restoreArguments: '--ignore-failed-sources --no-cache --force' | ||
feedsToUse: 'config' | ||
nugetConfigPath: '$(Build.SourcesDirectory)\nuget.config' | ||
# This task cannot use an apiKey directly (yet) so use any other service connection not based on an api key | ||
externalFeedCredentials: 'IG ProGet IgniteUINuGet - Staging' | ||
verbosityRestore: 'Diagnostic' | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Generate NuGet.config for IG ProGet NuGet feed' | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
dotnet new nugetconfig --force | ||
dotnet nuget add source ${{ parameters.igNuGetFeedUrl }} --name "IG ProGet NuGet" --allow-insecure-connections | ||
# Manually add the allowInsecureConnections attribute to the nuget.config file | ||
$nugetConfigPath = "$(Build.SourcesDirectory)\NuGet.config" | ||
[xml]$nugetConfig = Get-Content $nugetConfigPath | ||
$nugetConfig.configuration.packageSources.add | Where-Object { $_.name -eq "IG ProGet NuGet" } | ForEach-Object { $_.allowInsecureConnections = "true" } | ||
# Add credentials to the nuget.config file | ||
$packageSourceCredentials = $nugetConfig.CreateElement("packageSourceCredentials") | ||
$source = $packageSourceCredentials.CreateElement("IG ProGet NuGet") | ||
$add = $source.CreateElement("add") | ||
$add.SetAttribute("key", "Username") | ||
$add.SetAttribute("value", "$(username)") | ||
$source.AppendChild($add) | ||
$add = $source.CreateElement("add") | ||
$add.SetAttribute("key", "ClearTextPassword") | ||
$add.SetAttribute("value", "$(password)") | ||
$source.AppendChild($add) | ||
$packageSourceCredentials.AppendChild($source) | ||
$nugetConfig.configuration.AppendChild($packageSourceCredentials) | ||
$nugetConfig.Save($nugetConfigPath) | ||
failOnStderr: true | ||
showWarnings: true | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet restore B' | ||
continueOnError: true | ||
enabled: true | ||
inputs: | ||
command: 'restore' | ||
projects: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}' | ||
# We want the dependency tree to be evaluated each time and to be sure that the dependencies are freshly downloaded | ||
restoreArguments: '--ignore-failed-sources --no-cache --force' | ||
feedsToUse: 'config' | ||
nugetConfigPath: '$(Build.SourcesDirectory)\nuget.config' | ||
# This task cannot use an apiKey directly (yet) so use any other service connection not based on an api key | ||
verbosityRestore: 'Diagnostic' | ||
|
||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet restore 2' | ||
continueOnError: true | ||
enabled: true | ||
inputs: | ||
command: 'restore' | ||
projects: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}' | ||
# We want the dependency tree to be evaluated each time and to be sure that the dependencies are freshly downloaded | ||
restoreArguments: '--ignore-failed-sources --no-cache --force --configfile $(Build.SourcesDirectory)\nuget.config' | ||
# This task cannot use an apiKey directly (yet) so use any other service connection not based on an api key | ||
externalFeedCredentials: 'IG ProGet IgniteUINuGet - Staging' | ||
verbosityRestore: 'Diagnostic' | ||
|
||
- task: NuGetCommand@2 | ||
inputs: | ||
command: 'restore' | ||
restoreSolution: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}\IgBlazorSamples.Client.csproj' | ||
feedsToUse: 'config' | ||
nugetConfigPath: '$(Build.SourcesDirectory)\nuget.config' | ||
externalFeedCredentials: 'IG ProGet IgniteUINuGet - Staging' | ||
|
||
|
||
|
||
|
||
- task: DeleteFiles@1 | ||
displayName: 'Delete NuGet.config file - used only at build time' | ||
enabled: false | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)\' | ||
Contents: '**/nuget.config' | ||
|
||
- task: CmdLine@2 | ||
# Using a CmldLine call for this opeation, because I couldn't get it to work as expected with the DotNetCoreCLI task | ||
displayName: 'dotnet publish' | ||
inputs: | ||
# Skip the restore process as it is already done. Got an error when I tried skipping the build process (which is already done as well) | ||
script: 'dotnet publish --no-restore -c release -o $(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}\publish' | ||
workingDirectory: '$(Build.SourcesDirectory)\browser\IgBlazorSamples.${{ parameters.projectToBuild }}' | ||
|
||
- task: ArchiveFiles@2 | ||
displayName: 'Package samples browser' | ||
inputs: | ||
verbose: ${{ parameters.isVerbose }} | ||
rootFolderOrFile: '$(Build.SourcesDirectory)/browser/IgBlazorSamples.${{ parameters.projectToBuild }}/publish' | ||
includeRootFolder: false | ||
archiveType: 'zip' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/BlazorSamples${{ parameters.projectToBuild }}.zip' | ||
replaceExistingArchive: true | ||
|
||
- task: PublishPipelineArtifact@1 | ||
displayName: 'Publish pipeline artifact' | ||
inputs: | ||
targetPath: '$(Build.ArtifactStagingDirectory)/BlazorSamples${{ parameters.projectToBuild }}.zip' | ||
artifact: 'BlazorSamples${{ parameters.projectToBuild }}' | ||
|
||
- ${{ if eq(parameters.shouldCleanPostExectuion, true) }}: | ||
- task: PostBuildCleanup@4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.