Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CG support, moving analyze_deps to analyze job #4345

Merged
merged 18 commits into from
Feb 14, 2019
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 43 additions & 27 deletions .azure-pipelines/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,27 @@
# 'build_targeting_string' comma separated glob strings selecting the packages that should be built. EG: "azure-keyvault,azure-mgmt-batch" or "azure-*"
# 'codecov-python-repository-token' Is the codecov.io repository token.
# 'long_running_tests' Is a boolean indicating that the long-running tests should be executed.
# 'EnableDetectorPip': true . Required for Component Governance Support
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved
trigger:
- master
variables:
python.version: '3.6'
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

jobs:
- job: 'Build_Target_Packages'
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

pool:
vmImage: 'ubuntu-16.04'

steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: 3.6
versionSpec: '$(python.version)'

- script: |
pip install wheel setuptools pathlib Jinja2 twine readme-renderer[md]
pip install wheel setuptools pathlib twine readme-renderer[md]
displayName: 'Prep Environment'

- task: PythonScript@0
displayName: 'Analyze dependencies'
inputs:
scriptPath: 'scripts/analyze_deps.py'
arguments: '--verbose --out "$(Build.SourcesDirectory)/dependencies.html"'


- task: PythonScript@0
displayName: 'Generate Packages'
inputs:
Expand All @@ -38,18 +33,42 @@ jobs:
twine check $(Build.ArtifactStagingDirectory)/*
displayName: 'Verify Readme'

- task: CopyFiles@2
displayName: 'Move Dependencies Report to Build Artifacts'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved
condition: succeededOrFailed()

- job: 'Analyze'
dependsOn:
- 'Build_Target_Packages'
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'

- script: |
pip install wheel Jinja2
displayName: 'Prep Environment'

- task: PythonScript@0
displayName: 'Analyze dependencies'
enabled: true
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: dependencies.html
TargetFolder: '$(Build.ArtifactStagingDirectory)'
condition: always()
scriptPath: 'scripts/analyze_deps.py'
arguments: '--verbose --out "$(Build.ArtifactStagingDirectory)/dependencies.html"'

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
# builds should be sufficient.
condition: and(always(), ne(variables['System.TeamProject'], 'public'))
displayName: 'Component Detection'

- task: PublishBuildArtifacts@1
mikeharder marked this conversation as resolved.
Show resolved Hide resolved
displayName: 'Publish Artifacts'
condition: succeededOrFailed()

- job: 'Generic_Tests'
dependsOn:
- 'Build_Target_Packages'
Expand Down Expand Up @@ -85,7 +104,6 @@ jobs:
python.version: '2.7'
pool:
vmImage: '$(os.vmImage)'

steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
Expand Down Expand Up @@ -127,6 +145,8 @@ jobs:
- job: Test_Alpha_Python
timeoutInMinutes: 90
condition: eq(variables['long_running_tests'], True)

- job: Special_Python_Distro_Tests
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved
scbedd marked this conversation as resolved.
Show resolved Hide resolved
dependsOn:
- 'Build_Target_Packages'
pool:
Expand All @@ -145,10 +165,8 @@ jobs:
mkdir debug
cd debug
../configure --enable-optimizations --prefix=$HOME
make install

make install
cd $(Build.SourcesDirectory)

PATH=/home/vsts/bin:$PATH
python3 -m ensurepip
python ./scripts/devops_tasks/setup_execute_tests.py -p python3 "$(build_targeting_string)"
Expand All @@ -175,10 +193,8 @@ jobs:
- script: |
cd ~/
wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
tar xf pypy3-v6.0.0-linux64.tar.bz2

cd $(Build.SourcesDirectory)

tar xf pypy3-v6.0.0-linux64.tar.bz2
cd $(Build.SourcesDirectory)
PATH=/home/vsts/pypy3-v6.0.0-linux64/bin/:$PATH
pypy3 -m ensurepip
python ./scripts/devops_tasks/setup_execute_tests.py -p pypy3 "$(build_targeting_string)"
Expand Down