|
| 1 | +# File: templates/encryption-nuget-pack.yml |
| 2 | + |
| 3 | +parameters: |
| 4 | + - name: BuildConfiguration |
| 5 | + type: string |
| 6 | + default: '' |
| 7 | + - name: Arguments |
| 8 | + type: string |
| 9 | + default: '' |
| 10 | + - name: VmImage |
| 11 | + type: string |
| 12 | + default: '' |
| 13 | + - name: OutputPath |
| 14 | + type: string |
| 15 | + default: '' |
| 16 | + - name: BlobVersion |
| 17 | + type: string |
| 18 | + default: '' |
| 19 | + - name: ReleasePackage |
| 20 | + type: boolean |
| 21 | + default: false |
| 22 | + - name: CleanupFolder |
| 23 | + type: boolean |
| 24 | + default: false |
| 25 | + |
| 26 | +jobs: |
| 27 | +- job: GenerateNugetPackages |
| 28 | + displayName: Generate Nuget packages |
| 29 | + pool: |
| 30 | + name: 'OneES' |
| 31 | + |
| 32 | + steps: |
| 33 | + - task: DotNetCoreCLI@2 |
| 34 | + displayName: Build Microsoft.Azure.Cosmos.Encryption.Custom |
| 35 | + inputs: |
| 36 | + command: build |
| 37 | + configuration: $(BuildConfiguration) |
| 38 | + nugetConfigPath: NuGet.config |
| 39 | + projects: Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj |
| 40 | + arguments: --configuration ${{ parameters.BuildConfiguration }} -p:Optimize=true ${{ parameters.Arguments }} |
| 41 | + versioningScheme: OFF |
| 42 | + |
| 43 | + - task: DotNetCoreCLI@2 |
| 44 | + displayName: 'Create Encryption Custom NuGet Package' |
| 45 | + inputs: |
| 46 | + command: custom |
| 47 | + projects: 'Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj' |
| 48 | + custom: pack |
| 49 | + arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"' |
| 50 | + |
| 51 | + - ${{ if eq(parameters.ReleasePackage, true) }}: |
| 52 | + - task: DotNetCoreCLI@2 |
| 53 | + displayName: 'Create Encryption Custom NuGet Symbols Package' |
| 54 | + inputs: |
| 55 | + command: custom |
| 56 | + projects: 'Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj' |
| 57 | + custom: pack |
| 58 | + arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --include-symbols /p:SymbolPackageFormat=snupkg ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"' |
| 59 | + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 |
| 60 | + inputs: |
| 61 | + BuildDropPath: '$(Build.ArtifactStagingDirectory)\bin\AnyCPU\$(BuildConfiguration)\Microsoft.Azure.Cosmos.Encryption.Custom' |
| 62 | + |
| 63 | + - ${{ if ne(parameters.BlobVersion, '') }}: |
| 64 | + - task: AzureFileCopy@6 |
| 65 | + displayName: 'Copy Artifacts to Azure SDK Release blob storage' |
| 66 | + condition: succeeded() |
| 67 | + inputs: |
| 68 | + SourcePath: '$(Build.ArtifactStagingDirectory)\bin\AnyCPU\$(BuildConfiguration)\Microsoft.Azure.Cosmos.Encryption.Custom/**' |
| 69 | + azureSubscription: azuresdkpartnerdrops |
| 70 | + Destination: AzureBlob |
| 71 | + storage: azuresdkpartnerdrops |
| 72 | + ContainerName: 'drops' |
| 73 | + BlobPrefix: 'cosmosdb/csharp/encryption.custom/$(BlobVersion)' |
| 74 | + CleanTargetBeforeCopy: ${{ parameters.CleanupFolder }} |
| 75 | + |
| 76 | + - task: PublishBuildArtifacts@1 |
| 77 | + displayName: 'Publish Artifacts: Microsoft.Azure.Cosmos.Encryption.Custom' |
| 78 | + inputs: |
| 79 | + artifactName: Microsoft.Azure.Cosmos.Encryption.Custom |
0 commit comments