-
Notifications
You must be signed in to change notification settings - Fork 466
Start the move to yaml pipelines. #540
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,53 @@ | ||
| name: $(date:yy)$(DayOfYear)$(rev:.r) | ||
|
|
||
| trigger: | ||
| - master | ||
| - releases/shipped | ||
|
|
||
| variables: | ||
| majorAndMinorVersion: '0.5' | ||
| revision: '$(Build.BuildNumber)' | ||
|
|
||
| jobs: | ||
| - job: Build_Windows | ||
| variables: | ||
| platformFriendlyName: Windows | ||
| strategy: | ||
| maxParallel: 2 | ||
| matrix: | ||
| debug: | ||
| configuration: Debug | ||
| release: | ||
| configuration: Release | ||
| pool: | ||
| vmImage: vs2017-win2016 | ||
| steps: | ||
| - template: templates/windows-build-and-unit-test.yml | ||
|
|
||
| - job: Build_macOS | ||
| variables: | ||
| platformFriendlyName: macOS | ||
| strategy: | ||
| maxParallel: 2 | ||
| matrix: | ||
| debug: | ||
| configuration: Debug | ||
| release: | ||
| configuration: Release | ||
| pool: | ||
| vmImage: macOS 10.13 | ||
| steps: | ||
| - template: templates/macos-build-and-unit-test.yml | ||
|
|
||
| - job: FunctionalTests_Windows | ||
| timeoutInMinutes: 240 | ||
| variables: | ||
| platformFriendlyName: Windows | ||
| configuration: Release | ||
| pool: | ||
| name: FunctionalTests | ||
| dependsOn: Build_Windows | ||
| condition: succeeded() | ||
| steps: | ||
| - checkout: none # We'll get the build drop from Build_Windows job | ||
| - template: templates/windows-functional-test.yml | ||
This file contains hidden or 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,22 @@ | ||
| name: $(date:yy)$(DayOfYear)$(rev:.r) | ||
|
|
||
| trigger: none | ||
|
|
||
| variables: | ||
| majorAndMinorVersion: '0.4' | ||
| revision: '$(Build.BuildNumber)' | ||
| platform: 'x64' | ||
| configuration: release | ||
|
|
||
| jobs: | ||
| - job: Windows | ||
| pool: | ||
| vmImage: vs2017-win2016 | ||
| steps: | ||
| - template: templates/windows-build-and-unit-test.yml | ||
|
|
||
| - job: macOS | ||
| pool: | ||
| vmImage: macOS 10.13 | ||
|
jrbriggs marked this conversation as resolved.
|
||
| steps: | ||
| - template: templates/macos-build-and-unit-test.yml | ||
This file contains hidden or 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,30 @@ | ||
| steps: | ||
|
|
||
| - task: DotNetCoreInstaller@0 | ||
| displayName: Use .NET Core SDK 2.1.301 | ||
| inputs: | ||
| packageType: sdk | ||
| version: '2.1.301' | ||
|
|
||
| - task: InstallAppleCertificate@2 | ||
| displayName: Install kext certificate | ||
| inputs: | ||
| certSecureFile: PrjFSKextAug272018.p12 | ||
| certPwd: $(PrjFSKextCertPassword) | ||
| keychain: temp | ||
|
|
||
| - script: Scripts/Mac/BuildGVFSForMac.sh $(configuration) | ||
| displayName: Build VFSForGit $(configuration) | ||
|
|
||
| - script: MirrorProvider/Scripts/Mac/Build.sh $(configuration) | ||
| displayName: Build MirrorProvider $(configuration) | ||
|
|
||
| - task: PublishTestResults@2 | ||
| displayName: Publish test results | ||
| inputs: | ||
| testRunner: NUnit | ||
| testResultsFiles: '**/TestResult.xml' | ||
| searchFolder: $(System.DefaultWorkingDirectory) | ||
| testRunTitle: Mac $(configuration) Unit Tests | ||
| publishRunAttachments: true | ||
| condition: succeededOrFailed() |
40 changes: 40 additions & 0 deletions
40
.azure-pipelines/templates/windows-build-and-unit-test.yml
This file contains hidden or 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,40 @@ | ||
| steps: | ||
|
|
||
| - script: $(Build.Repository.LocalPath)\\Scripts\\NukeBuildOutputs.bat | ||
|
jrbriggs marked this conversation as resolved.
|
||
| displayName: Delete previous build outputs | ||
| continueOnError: true | ||
|
|
||
| - powershell: | | ||
| & 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe' -Vr *,31bf3856ad364e35 | ||
| & 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\sn.exe' -Vr *,31bf3856ad364e35 | ||
| displayName: Disable strong name validation for MS delay-signed assemblies | ||
|
|
||
| - script: $(Build.Repository.LocalPath)\Scripts\BuildGVFSForWindows.bat $(configuration) $(majorAndMinorVersion).$(revision) | ||
| displayName: Run VFSForGit build script ($(configuration)) | ||
|
|
||
| - script: $(Build.Repository.LocalPath)\MirrorProvider\Scripts\Windows\Build.bat $(configuration) | ||
| displayName: Build MirrorProvider ($(configuration)) | ||
|
|
||
| - script: $(Build.Repository.LocalPath)\Scripts\RunUnitTests.bat $(configuration) | ||
| displayName: Run unit tests | ||
|
|
||
| - task: PublishTestResults@2 | ||
| displayName: Publish unit test results | ||
| inputs: | ||
| testRunner: NUnit | ||
| testResultsFiles: "**\\TestResult.xml" | ||
| searchFolder: $(System.DefaultWorkingDirectory) | ||
| testRunTitle: Windows $(configuration) Unit Tests | ||
| publishRunAttachments: true | ||
|
|
||
| - script: $(Build.Repository.LocalPath)\Scripts\CI\CreateBuildDrop.bat $(configuration) $(Build.ArtifactStagingDirectory)\Tests | ||
| displayName: Create functional test drop. | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| displayName: Publish functional test drop artifact. | ||
| inputs: | ||
| pathtoPublish: $(Build.ArtifactStagingDirectory)\Tests | ||
| artifactName: "FunctionalTests_$(platformFriendlyName)_$(configuration)" | ||
| parallel: true | ||
| parallelCount: 8 | ||
| condition: succeededOrFailed() | ||
This file contains hidden or 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,28 @@ | ||
| steps: | ||
|
|
||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download functional test drop | ||
| inputs: | ||
| buildType: current | ||
| downloadType: specific | ||
| artifactName: FunctionalTests_$(platformFriendlyName)_$(configuration) | ||
|
jrbriggs marked this conversation as resolved.
|
||
| downloadPath: $(Build.BinariesDirectory) | ||
|
|
||
| - script: $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/src/Scripts/ReinstallGVFS.bat $(configuration) | ||
| displayName: Run VFSForGit and G4W installers | ||
|
|
||
| - script: git config --global credential.interactive never | ||
| displayName: Disable interactive auth | ||
|
|
||
| - script: $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/src/Scripts/RunFunctionalTests.bat $(configuration) --test-gvfs-on-path --replace-inbox-projfs | ||
| displayName: Run functional tests | ||
|
|
||
| - task: PublishTestResults@2 | ||
| displayName: Publish functional test results | ||
| inputs: | ||
| testRunner: NUnit | ||
| testResultsFiles: "**\\TestResult*.xml" | ||
| searchFolder: $(System.DefaultWorkingDirectory) | ||
| testRunTitle: Windows $(configuration) Functional Tests | ||
| publishRunAttachments: true | ||
| condition: succeededOrFailed() | ||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,36 +1,61 @@ | ||
| using Microsoft.Build.Framework; | ||
| using Microsoft.Build.Utilities; | ||
| using System.IO; | ||
| using System.Text; | ||
|
|
||
| namespace GVFS.PreBuild | ||
| { | ||
| public class GenerateInstallScripts : Task | ||
| { | ||
| [Required] | ||
| public string G4WInstallerPath { get; set; } | ||
| public string GitInstallerFilename { get; set; } | ||
|
|
||
| [Required] | ||
| public string GVFSSetupPath { get; set; } | ||
| public string VFSForGitSetupFilename { get; set; } | ||
|
|
||
| [Required] | ||
| public string G4WInstallBatPath { get; set; } | ||
| public string GitInstallBatPath { get; set; } | ||
|
|
||
| [Required] | ||
| public string GVFSInstallBatPath { get; set; } | ||
| public string VFSForGitInstallBatPath { get; set; } | ||
|
|
||
| [Required] | ||
| public string UnifiedInstallBatPath { get; set; } | ||
|
|
||
| public override bool Execute() | ||
| { | ||
| this.Log.LogMessage(MessageImportance.High, "Creating install script for " + this.G4WInstallerPath); | ||
| this.Log.LogMessage(MessageImportance.High, "Creating install scripts for " + this.GitInstallerFilename); | ||
|
|
||
| File.WriteAllText( | ||
| this.GitInstallBatPath, | ||
| this.GetGitInstallCommand()); | ||
|
|
||
| File.WriteAllText( | ||
| this.G4WInstallBatPath, | ||
| this.G4WInstallerPath + @" /DIR=""C:\Program Files\Git"" /NOICONS /COMPONENTS=""ext,ext\shellhere,ext\guihere,assoc,assoc_sh"" /GROUP=""Git"" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART"); | ||
| this.VFSForGitInstallBatPath, | ||
| this.GetVFSForGitInstallCommand()); | ||
|
|
||
| StringBuilder sb = new StringBuilder(); | ||
| sb.AppendLine("REM AUTOGENERATED DO NOT EDIT"); | ||
| sb.AppendLine(); | ||
| sb.AppendLine(this.GetGitInstallCommand()); | ||
| sb.AppendLine(); | ||
| sb.AppendLine(this.GetVFSForGitInstallCommand()); | ||
|
|
||
| File.WriteAllText( | ||
| this.GVFSInstallBatPath, | ||
| this.GVFSSetupPath + " /VERYSILENT /SUPPRESSMSGBOXES /NORESTART"); | ||
| this.UnifiedInstallBatPath, | ||
| sb.ToString()); | ||
|
|
||
| return true; | ||
| } | ||
|
|
||
| public string GetGitInstallCommand() | ||
| { | ||
| return "%~dp0\\" + this.GitInstallerFilename + @" /DIR=""C:\Program Files\Git"" /NOICONS /COMPONENTS=""ext,ext\shellhere,ext\guihere,assoc,assoc_sh"" /GROUP=""Git"" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART"; | ||
| } | ||
|
|
||
| public string GetVFSForGitInstallCommand() | ||
| { | ||
| return "%~dp0\\" + this.VFSForGitSetupFilename + " /VERYSILENT /SUPPRESSMSGBOXES /NORESTART"; | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,33 @@ | ||
| @ECHO OFF | ||
| CALL %~dp0\..\InitializeEnvironment.bat || EXIT /b 10 | ||
|
|
||
| IF "%1"=="" GOTO USAGE | ||
| IF "%2"=="" GOTO USAGE | ||
|
|
||
| SETLOCAL enableextensions | ||
| SET Configuration=%1 | ||
| SET VFS_STAGEDIR=%2 | ||
|
|
||
| REM Prepare the staging directories for functional tests. | ||
| IF EXIST %VFS_STAGEDIR% ( | ||
| rmdir /s /q %VFS_STAGEDIR% | ||
| ) | ||
| mkdir %VFS_STAGEDIR%\src\Scripts | ||
| mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.Build | ||
| mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1 | ||
| mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\ | ||
|
jrbriggs marked this conversation as resolved.
|
||
|
|
||
| REM Make a minimal 'test' enlistment to pass along our pipeline. | ||
| copy %VFS_SRCDIR%\init.cmd %VFS_STAGEDIR%\src\ | ||
| copy %VFS_SCRIPTSDIR%\*.* %VFS_STAGEDIR%\src\Scripts\ | ||
| copy %VFS_OUTPUTDIR%\GVFS.Build\*.* %VFS_STAGEDIR%\BuildOutput\GVFS.Build | ||
| dotnet publish %VFS_SRCDIR%\GVFS\GVFS.FunctionalTests\GVFS.FunctionalTests.csproj -p:StyleCopEnabled=False --self-contained --framework netcoreapp2.1 -r win-x64 -c Release -o %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ | ||
| robocopy %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ /E /XC /XN /XO | ||
| copy %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\*.* %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\ | ||
| GOTO END | ||
|
|
||
| :USAGE | ||
| echo "ERROR: Usage: CreateBuildDrop.bat [configuration] [build drop root directory]" | ||
| exit 1 | ||
|
|
||
| :END | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.