|  | 
| 1 |  | -trigger: | 
| 2 |  | -- develop | 
| 3 |  | -- rel/* | 
| 4 |  | -- feature/* | 
| 5 |  | -- bugfix/* | 
| 6 |  | - | 
| 7 |  | -pr: | 
| 8 |  | -- develop | 
| 9 |  | -- rel/* | 
| 10 |  | - | 
| 11 |  | -stages: | 
| 12 |  | -- stage: Build | 
| 13 |  | -  jobs: | 
| 14 |  | -  - job: Build | 
| 15 |  | -    pool: | 
| 16 |  | -      vmImage: windows-latest | 
| 17 |  | - | 
| 18 |  | -    variables: | 
| 19 |  | -      BuildConfiguration: Release | 
| 20 |  | -      DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | 
| 21 |  | - | 
| 22 |  | -    steps: | 
| 23 |  | -    - task: UseDotNet@2 | 
| 24 |  | -      displayName: 'Use .NET Core SDK 8.x' | 
| 25 |  | -      inputs: | 
| 26 |  | -        version: 8.x | 
| 27 |  | -        performMultiLevelLookup: true | 
| 28 |  | - | 
| 29 |  | -    - task: DotNetCoreCLI@2 | 
| 30 |  | -      inputs: | 
| 31 |  | -        command: custom | 
| 32 |  | -        custom: tool | 
| 33 |  | -        arguments: install --tool-path . nbgv | 
| 34 |  | -      displayName: Install NBGV tool | 
| 35 |  | - | 
| 36 |  | -    - script: nbgv cloud | 
| 37 |  | -      displayName: Set Version | 
| 38 |  | - | 
| 39 |  | -    - task: MSBuild@1 | 
| 40 |  | -      displayName: 'Build solution Kerberos.NET.sln' | 
| 41 |  | -      inputs: | 
| 42 |  | -        solution: Kerberos.NET.sln | 
| 43 |  | -        configuration: $(BuildConfiguration) | 
| 44 |  | -        msbuildArguments: /restore /p:CreatePackage=true | 
| 45 |  | -        maximumCpuCount: true | 
| 46 |  | - | 
| 47 |  | -    - task: DotNetCoreCLI@2 | 
| 48 |  | -      inputs: | 
| 49 |  | -        command: test | 
| 50 |  | -        projects: Tests/**/*.csproj | 
| 51 |  | -        arguments: -c $(BuildConfiguration) --no-build --no-restore --settings CodeCoverage.runsettings --collect:"XPlat Code Coverage"  | 
| 52 |  | -      displayName: Run Unit Tests | 
| 53 |  | - | 
| 54 |  | -    - task: DotNetCoreCLI@2 | 
| 55 |  | -      inputs: | 
| 56 |  | -        command: 'pack' | 
| 57 |  | -        packagesToPack: './Bruce/Bruce.csproj' | 
| 58 |  | -        nobuild: true | 
| 59 |  | -        outputDir: $(Build.ArtifactStagingDirectory) | 
| 60 |  | -      displayName: Pack Bruce tool | 
| 61 |  | -   | 
| 62 |  | -    - task: PublishBuildArtifacts@1 | 
| 63 |  | -      inputs: | 
| 64 |  | -        PathtoPublish: '$(Build.ArtifactStagingDirectory)' | 
| 65 |  | -        publishLocation: 'Container' | 
| 66 |  | - | 
| 67 |  | -#    - task: DotNetCoreCLI@2 | 
| 68 |  | -#      inputs: | 
| 69 |  | -#        command: custom | 
| 70 |  | -#        custom: tool | 
| 71 |  | -#        arguments: install --tool-path . dotnet-reportgenerator-globaltool | 
| 72 |  | -#      displayName: Install ReportGenerator tool | 
| 73 |  | - | 
| 74 |  | -#    - script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"Cobertura" | 
| 75 |  | -#      displayName: Create reports | 
| 76 |  | - | 
| 77 |  | -#    - task: PublishCodeCoverageResults@1 | 
| 78 |  | -#      displayName: 'Publish code coverage' | 
| 79 |  | -#      inputs: | 
| 80 |  | -#        codeCoverageTool: Cobertura | 
| 81 |  | -#        summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml | 
| 82 |  | - | 
| 83 |  | -    - task: NuGetAuthenticate@0 | 
| 84 |  | -      displayName: 'NuGet Authenticate' | 
| 85 |  | -    - task: NuGetCommand@2 | 
| 86 |  | -      displayName: 'NuGet push' | 
| 87 |  | -      inputs: | 
| 88 |  | -        command: push | 
| 89 |  | -        publishVstsFeed: 'Kerberos.NET/kerberos.net' | 
| 90 |  | -        allowPackageConflicts: true | 
| 91 |  | - | 
| 92 |  | -    - publish: artifacts | 
| 93 |  | -      displayName: Publish build packages | 
| 94 |  | -      artifact: BuildPackages | 
| 95 |  | - | 
| 96 |  | -    - publish: config | 
| 97 |  | -      displayName: Publish Signing Scripts | 
| 98 |  | -      artifact: config | 
| 99 |  | - | 
| 100 |  | -- stage: CodeSign | 
| 101 |  | -  dependsOn: Build | 
| 102 |  | -  condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest'))) # Only run this stage on pushes to the main branch | 
| 103 |  | -  jobs: | 
| 104 |  | -  - job: CodeSign | 
| 105 |  | -    displayName: Code Signing | 
| 106 |  | -    pool: | 
| 107 |  | -      vmImage: windows-latest # Code signing must run on a Windows agent for Authenticode signing (dll/exe) | 
| 108 |  | -    variables: | 
| 109 |  | -    - group: Sign Client Secrets # This is a variable group with secrets in it  | 
| 110 |  | - | 
| 111 |  | -    steps: | 
| 112 |  | - | 
| 113 |  | -    # Retreive unsigned artifacts and file list | 
| 114 |  | -    - download: current | 
| 115 |  | -      artifact: config | 
| 116 |  | -      displayName: Download signing file list | 
| 117 |  | - | 
| 118 |  | -    - download: current | 
| 119 |  | -      artifact: BuildPackages | 
| 120 |  | -      displayName: Download build artifacts | 
| 121 |  | - | 
| 122 |  | -    - download: current | 
| 123 |  | -      artifact: drop | 
| 124 |  | -      displayName: Download drop build artifacts | 
| 125 |  | - | 
| 126 |  | -    - task: UseDotNet@2 | 
| 127 |  | -      displayName: 'Use .NET SDK 8.x' | 
| 128 |  | -      inputs: | 
| 129 |  | -        version: 8.x | 
| 130 |  | - | 
| 131 |  | -    # Install the code signing tool | 
| 132 |  | -    - task: DotNetCoreCLI@2 | 
| 133 |  | -      inputs: | 
| 134 |  | -        command: custom | 
| 135 |  | -        custom: tool | 
| 136 |  | -        arguments: install --tool-path . sign --version 0.9.0-beta.23127.3 | 
| 137 |  | -      displayName: Install SignTool tool | 
| 138 |  | - | 
| 139 |  | -    # Run the signing command | 
| 140 |  | -    - pwsh: | | 
| 141 |  | -        .\sign code azure-key-vault ` | 
| 142 |  | -        "**/*.nupkg" ` | 
| 143 |  | -        --base-directory "$(Pipeline.Workspace)\BuildPackages" ` | 
| 144 |  | -        --file-list "$(Pipeline.Workspace)\config\filelist.txt" ` | 
| 145 |  | -        --publisher-name "Kerberos.NET" ` | 
| 146 |  | -        --description "Kerberos.NET" ` | 
| 147 |  | -        --description-url "https://github.com/dotnet/Kerberos.NET" ` | 
| 148 |  | -        --azure-key-vault-tenant-id "$(SignTenantId)" ` | 
| 149 |  | -        --azure-key-vault-client-id "$(SignClientId)" ` | 
| 150 |  | -        --azure-key-vault-client-secret "$(SignClientSecret)" ` | 
| 151 |  | -        --azure-key-vault-certificate "$(SignKeyVaultCertificate)" ` | 
| 152 |  | -        --azure-key-vault-url "$(SignKeyVaultUrl)" | 
| 153 |  | -      displayName: Sign Kerberos.NET | 
| 154 |  | -
 | 
| 155 |  | -    - pwsh: | | 
| 156 |  | -        .\sign code azure-key-vault ` | 
| 157 |  | -        "**/*.nupkg" ` | 
| 158 |  | -        --base-directory "$(Pipeline.Workspace)\drop" ` | 
| 159 |  | -        --file-list "$(Pipeline.Workspace)\config\filelist.txt" ` | 
| 160 |  | -        --publisher-name "Bruce" ` | 
| 161 |  | -        --description "Command line client for Kerberos.NET" ` | 
| 162 |  | -        --description-url "https://github.com/dotnet/Kerberos.NET" ` | 
| 163 |  | -        --azure-key-vault-tenant-id "$(SignTenantId)" ` | 
| 164 |  | -        --azure-key-vault-client-id "$(SignClientId)" ` | 
| 165 |  | -        --azure-key-vault-client-secret '$(SignClientSecret)' ` | 
| 166 |  | -        --azure-key-vault-certificate "$(SignKeyVaultCertificate)" ` | 
| 167 |  | -        --azure-key-vault-url "$(SignKeyVaultUrl)" | 
| 168 |  | -      displayName: Sign Bruce | 
| 169 |  | -           | 
| 170 |  | -    - publish: $(Pipeline.Workspace)/BuildPackages | 
| 171 |  | -      displayName: Publish Signed Packages | 
| 172 |  | -      artifact: SignedPackages | 
| 173 |  | -         | 
| 174 |  | -    - publish: $(Pipeline.Workspace)/Drop | 
| 175 |  | -      displayName: Publish Signed Drop | 
| 176 |  | -      artifact: SignedDrop | 
|  | 1 | +# not used anymore | 
0 commit comments