File: release_sdk_status.yml

package info (click to toggle)
python-azure 20230112%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 749,544 kB
  • sloc: python: 6,815,827; javascript: 287; makefile: 195; xml: 109; sh: 105
file content (75 lines) | stat: -rw-r--r-- 1,978 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Release status statistics

name: ReleaseIssueStatus

trigger:
  branches:
    exclude:
    - '*'

# avoid being triggered as part of CI check
pr:
  branches:
    exclude:
    - '*'


schedules:
  - cron: "0 16 * * *"
    displayName: Daily Statistics
    branches:
      include:
      - main
    always: true

variables:
  - group: Release Secrets for GitHub
  - group: SDK Release Helper
  - group: Azure SDK Auto Release Pipeline Secrets

jobs:
- job: ReleaseSdkStatus
  displayName: ReleaseSdkStatus Python 3.8
  timeoutInMinutes: 300
  strategy:
    maxParallel: 1
  pool:
    vmImage: 'ubuntu-20.04'
  steps:
    - task: UsePythonVersion@0
      inputs:
        versionSpec: '3.8'
        addToPath: true
        architecture: 'x64'
    - bash: |
        script_path=$(pwd)/scripts/release_sdk_status
        cd ..
        git config --global user.email "ReleaseSdkStatus"
        git config --global user.name "ReleaseSdkStatus"

        # clone(REPO: https://github.com/Azure/azure-sdk-for-python.git, USR_NAME: Azure, USR_TOKEN: xxxxxxxxxxxxx)
        mkdir file-storage
        git clone ${FILE_REPO:0:8}$(USR_NAME):$(Yuchao-GitToken)@${FILE_REPO:8} $(pwd)/file-storage
        mkdir azure-rest-api-specs
        git clone https://github.com/Azure/azure-rest-api-specs.git $(pwd)/azure-rest-api-specs
        mkdir sdk-repo
        git clone https://github.com/Azure/azure-sdk-for-python.git $(pwd)/sdk-repo

        # import env variable
        export TOKEN=$(Yuchao-GitToken)
        export SWAGGER_REPO=$(pwd)/azure-rest-api-specs
        export SDK_REPO=$(pwd)/sdk-repo
        export SKIP_COVERAGE=$(SKIP_COVERAGE)
        export AZURE_TEST_RUN_LIVE=false

        # create virtual env
        python -m venv venv-sdk
        source venv-sdk/bin/activate
        pip install -r $script_path/requirement.txt

        # checkout the target branch
        cd file-storage
        git checkout release-sdk-status

        # run
        python $script_path/main.py