Skip to content
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9665d2f
Set up CI with Azure Pipelines
syntaxjungle Jan 19, 2021
23e3b95
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
b1a4701
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
d91f18f
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
aa5a8a3
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
d2f5d02
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
5e4cc8c
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
661cb15
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
4c0a4ee
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
7cc010f
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
c821459
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
bf2622a
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
f24b205
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
585b0b4
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
fd4b075
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
62abfff
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
dc678a3
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
ef098a4
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
03f6406
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
8bfb915
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
f96e721
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
6a88b04
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
03c8159
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
ab652d7
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
4d236c4
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
350aa04
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
515c04c
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
84fc0ba
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
3f70101
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
4183aa3
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
363c625
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
a3c4807
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
ec726de
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
cf8c2e5
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
15e19cc
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 19, 2021
c7f4cda
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 20, 2021
a50e662
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 20, 2021
875124b
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 20, 2021
a5f3319
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 20, 2021
2a3ff53
Update azure-pipelines.yml for Azure Pipelines
syntaxjungle Jan 20, 2021
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
104 changes: 104 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
branches:
include:
- azure-pipelines-wens-test

#paths:
#include:
#- awsAlarmIntegration/*

pool:
vmImage: 'ubuntu-latest'

#global variables:
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] # runtime expression
isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression

stages:
- stage: CI
displayName: 'Continuous Integration'
jobs:
- job: helloworld
timeoutInMinutes: 10
steps:
- bash: echo "Hello world. I am in Stage CI"

- job: Test
timeoutInMinutes: 10
strategy:
matrix:
Python27:
python.version: '2.7'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'

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

- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
displayName: 'Install dependencies'

- script: |
pip install pytest pytest-azurepipelines
pytest
displayName: 'pytest'

- stage: TestfromMainBranch
dependsOn: CI
condition: and(succeeded(), eq(variables.isMain, true))
displayName: 'Continuous Integration - Post Test'
jobs:
- job: PostTest
timeoutInMinutes: 10
steps:
- bash: echo "Hello world. At Stage TestMainBranch"

- stage: TestfromFeatureBranch
dependsOn: CI
condition: and(succeeded(), eq(variables.isMyBranch, true))
displayName: 'Continuous Integration - Post Test'
jobs:
- job: PostTest
timeoutInMinutes: 10
steps:
- script: echo $(Build.SourceBranchName)

- stage: TestArtifacts
dependsOn: TestfromFeatureBranch
condition: succeeded()
jobs:
- job: main
steps:
- script: echo "##vso[task.setvariable variable=FOO;isOutput=true]Bar"
displayName: Set output variables
name: myEnv
- job: variables_handler
dependsOn: main
variables:
FOO: $[ dependencies.main.outputs['myEnv.FOO'] ]
steps:
- task: CmdLine@2
displayName: Create artifact from variables
inputs:
script: |
echo "##vso[task.setvariable variable=FOO;]$(FOO)" > $(Build.ArtifactStagingDirectory)/pipeline.env
- task: PublishBuildArtifacts@1
displayName: publish variables
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'variables'
publishLocation: 'Container'