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

Feature/build nuget without umbraco build #241

Draft
wants to merge 33 commits into
base: v4/dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2edc336
move nuspecs next to csproj
Sep 29, 2020
9247d81
Merge remote-tracking branch 'github.com/v4/dev' into feature/build-n…
Sep 29, 2020
535c98c
use dotnet build and pack packages
Sep 29, 2020
6973672
build nuget packages base on dll
Sep 29, 2020
ec41630
Set up CI with Azure Pipelines
bielu Sep 30, 2020
a249e69
correct nuspecs, add source links
Sep 30, 2020
a0b81d8
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
2a2e07a
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
92f009c
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
fbb43c0
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
c47afd6
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
5129954
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
a6371dc
To do:
Sep 30, 2020
3958e53
Merge remote-tracking branch 'origin/feature/build-nuget-without-umbr…
Sep 30, 2020
380a488
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
cea5760
Update azure-pipelines.yml for Azure Pipelines
bielu Sep 30, 2020
58ea35d
add devops building conf
Oct 1, 2020
a605782
correct settings for Devops
Oct 1, 2020
abdbbba
correct path
Oct 1, 2020
cc5688f
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
7ed3240
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
f974efe
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
7fcbbf9
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
437ae29
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
5f12105
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
7c6174d
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
0126c1d
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
769dba3
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
35cc341
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
6de2f34
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
640401d
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
0639fb5
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 1, 2020
032b361
Update azure-pipelines.yml for Azure Pipelines
bielu Oct 2, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ build.out/

# eof
src/.idea
*/NugetPackages/*.nupkg
72 changes: 72 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
trigger:
- '*'

pool:
vmImage: 'windows-2019'

stages:
- stage: build
displayName: Build

jobs:
- job: Build
pool:
vmImage: 'windows-2019'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
- task: VSBuild@1
inputs:
solution: '**\*.sln'
configuration: "DevOps"
- task: PowerShell@2
inputs:
filePath: '$(System.DefaultWorkingDirectory)\build\SetVersion.ps1'
workingDirectory: '$(System.DefaultWorkingDirectory)\build'
- task: NuGetCommand@2
inputs:
command: 'pack'
packagesToPack: '**/*.nuspec'
versioningScheme: 'off'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'src\Our.ModelsBuilder.Tests\bin\DevOps'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/Tests.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- stage: test
displayName: test
jobs:
- job: Test
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'specific'
itemPattern: '**\Tests*.zip'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '**/Tests.zip'
destinationFolder: '$(System.DefaultWorkingDirectory)\test'
cleanDestinationFolder: true
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)\test'
44 changes: 0 additions & 44 deletions build/Nuspecs/Our.ModelsBuilder.Web.nuspec

This file was deleted.

17 changes: 17 additions & 0 deletions build/SetVersion.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Write-Host "Get version"
$version = (Get-Command "..\src\Our.ModelsBuilder\bin\DevOps\Our.ModelsBuilder.dll").FileVersionInfo.ProductVersion
$version
$nuspecs = Get-ChildItem -Path ..\*\*.nuspec -Recurse -Force;
$nuspecs | Foreach-Object {
Write-Host "Set version for "$_.FullName
[xml]$xml = Get-Content -path $_.FullName -Raw
$ns = [System.Xml.XmlNamespaceManager]::new($xml.NameTable)
$ns.AddNamespace('nuspec', 'http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd')

write-host [xml]$xml
$xml.package.metadata.version= $version.ToString()

[xml]$xml.Save($_.FullName)


}
8 changes: 8 additions & 0 deletions build/UnSetVersion.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$nuspecs = Get-ChildItem -Path ..\*\*.nuspec -Recurse -Force;
$nuspecs | Foreach-Object {
[xml]$xml = Get-Content -path $_.FullName -Raw
$ns = [System.Xml.XmlNamespaceManager]::new($xml.NameTable)
$ns.AddNamespace('nuspec', 'http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd')
$xml.package.metadata.version= ""
[xml]$xml.Save($_.FullName)
}
92 changes: 0 additions & 92 deletions build/build-bootstrap.ps1

This file was deleted.

Loading