File: build-conda-artifacts.yml

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (56 lines) | stat: -rw-r--r-- 1,904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
parameters:
  - name: CondaArtifacts
    type: object
    default: []
  - name: ArtifactPrefix
    type: string
    default: ''
  - name: Arguments
    type: string
    default: ''

steps:
  - task: UsePythonVersion@0
    displayName: 'Use Python $(PythonVersion)'
    inputs:
      versionSpec: $(PythonVersion)

  - pwsh: |
      $ErrorActionPreference = 'Stop'
      $PSNativeCommandUseErrorActionPreference = $true
      python -m pip install "tools/azure-sdk-tools[build,conda]"
      python -m pip install disutils
      python -m pip install typing-extensions==4.12.2
    displayName: Install build script requirements

  - pwsh: |
      $argContent = @'
      ${{ convertToJson(parameters.CondaArtifacts) }}
      '@
      $argFile = "$(Agent.TempDirectory)/conda-args.json"
      Set-Content -Path $argFile -Value $argContent
      cat $argFile
      sdk_build_conda -f "$argFile"
    displayName: Assemble Conda Packages

  - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
    parameters:
      ArtifactPath: '$(Build.SourcesDirectory)/conda/assembled'
      ArtifactName: '${{ parameters.ArtifactPrefix }}distributions'

  - ${{if eq(variables['System.TeamProject'], 'internal') }}:
    - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
      displayName: 'Upload Conda SBOM'
      condition: succeededOrFailed()
      inputs:
        BuildDropPath: '$(Build.SourcesDirectory)/conda/output'

  - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
    parameters:
      ArtifactPath: '$(Build.SourcesDirectory)/conda/output'
      ArtifactName: '${{ parameters.ArtifactPrefix }}conda'

  - template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
    parameters:
      ArtifactPath: '$(Build.SourcesDirectory)/conda/broken'
      ArtifactName: '${{ parameters.ArtifactPrefix }}broken'