File: use-venv.yml

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (26 lines) | stat: -rw-r--r-- 845 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
parameters:
  - name: VirtualEnvironmentName
    type: string
    default: "venv"
  - name: Activate
    type: boolean
    default: true
  - name: Condition
    type: string
    default: succeeded()

steps:
  - pwsh: |
      $(Build.SourcesDirectory)/eng/scripts/create-venv.ps1 `
        -VenvName "${{ parameters.VirtualEnvironmentName }}" `
        -RepoRoot "$(Build.SourcesDirectory)"
    displayName: Create virtual environment
    condition: ${{ parameters.Condition }}

  - ${{ if eq(parameters.Activate, true) }}:
    - pwsh: |
        $(Build.SourcesDirectory)/eng/scripts/activate-venv.ps1 `
          -VenvName "${{ parameters.VirtualEnvironmentName }}" `
          -RepoRoot "$(Build.SourcesDirectory)"
      displayName: Use ${{ parameters.VirtualEnvironmentName }} Virtual Environment
      condition: ${{ parameters.Condition }}