forked from great-expectations/great_expectations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-contrib.yml
149 lines (120 loc) · 5.8 KB
/
azure-pipelines-contrib.yml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
trigger:
- develop
variables:
contrib_major: 0
contrib_minor: 1
isDevelop: $[eq(variables['Build.SourceBranch'], 'refs/heads/develop')]
python.version: '3.8'
name: $(Date:yyyyMMdd)$(Rev:rrr)
stages:
- stage: contrib
pool:
vmImage: 'ubuntu-20.04'
jobs:
- job: changes
steps:
- task: ChangedFiles@1
name: CheckChanges
inputs:
verbose: true
rules: |
[ContribChanged]
contrib/**
[ExperimentalChanged]
contrib/experimental/**
[EthicalAIChanged]
contrib/great_expectations_ethical_ai_expectations/**
[GeospatialChanged]
contrib/great_expectations_geospatial_expectations/**
[SemanticTypesChanged]
contrib/great_expectations_semantic_types_expectations/**
[ZipcodeChanged]
contrib/great_expectations_zipcode_expectations/**
- job: lint
dependsOn: changes
condition: eq(dependencies.changes.outputs['CheckChanges.ContribChanged'], true)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
pip install $(grep -E '^(black|invoke|isort|flake8|pyupgrade)' reqs/requirements-dev-contrib.txt)
EXIT_STATUS=0
invoke fmt --check || EXIT_STATUS=$?
invoke lint || EXIT_STATUS=$?
pyupgrade --py3-plus || EXIT_STATUS=$?
exit $EXIT_STATUS
- job: test
dependsOn: lint
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- bash: python -m pip install --upgrade pip==20.2.4
displayName: 'Update pip'
- job: deploy_experimental
dependsOn: [changes, test]
condition: and(succeeded(), eq(dependencies.changes.outputs['CheckChanges.ExperimentalChanged'], true), eq(variables.isDevelop, true))
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- bash: python -m pip install --upgrade pip==20.2.4
displayName: 'Update pip'
- script: |
pip install twine wheel
git config --global user.email "[email protected]"
git config --global user.name "Great Expectations"
echo '$(contrib_major).$(contrib_minor).$(Build.BuildNumber)' > ./PACKAGE_VERSION
cat ./PACKAGE_VERSION
workingDirectory: $(Build.SourcesDirectory)/contrib/experimental
displayName: 'Update build version'
# Build the python distribution from source
- script: |
python setup.py sdist
python setup.py bdist_wheel
workingDirectory: $(Build.SourcesDirectory)/contrib/experimental
displayName: 'Build distribution'
- task: TwineAuthenticate@1
inputs:
pythonUploadServiceConnection: pypi-great-expectations-experimental
# Use command line script to 'twine upload', use -r to pass the repository name and --config-file to pass the environment variable set by the authenticate task.
- script: |
python -m twine upload -r great-expectations-experimental --verbose --config-file $(PYPIRC_PATH) dist/*
workingDirectory: $(Build.SourcesDirectory)/contrib/experimental
displayName: 'Upload'
- job: deploy_ethical_ai
dependsOn: [changes, test]
condition: and(succeeded(), eq(dependencies.changes.outputs['CheckChanges.EthicalAIChanged'], true), eq(variables.isDevelop, true))
steps:
- script: |
echo 'We should make a new pypi.org package and update it like https://pypi.org/project/great-expectations-experimental/#history'
workingDirectory: $(Build.SourcesDirectory)/contrib/great_expectations_ethical_ai_expectations
displayName: 'TODO ethical_ai'
- job: deploy_geospatial
dependsOn: [changes, test]
condition: and(succeeded(), eq(dependencies.changes.outputs['CheckChanges.GeospatialChanged'], true), eq(variables.isDevelop, true))
steps:
- script: |
echo 'We should make a new pypi.org package and update it like https://pypi.org/project/great-expectations-experimental/#history'
workingDirectory: $(Build.SourcesDirectory)/contrib/great_expectations_geospatial_expectations
displayName: 'TODO geospatial'
- job: deploy_semantic_types
dependsOn: [changes, test]
condition: and(succeeded(), eq(dependencies.changes.outputs['CheckChanges.SemanticTypesChanged'], true), eq(variables.isDevelop, true))
steps:
- script: |
echo 'We should make a new pypi.org package and update it like https://pypi.org/project/great-expectations-experimental/#history'
workingDirectory: $(Build.SourcesDirectory)/contrib/great_expectations_semantic_types_expectations
displayName: 'TODO semantic_types'
- job: deploy_zipcode
dependsOn: [changes, test]
condition: and(succeeded(), eq(dependencies.changes.outputs['CheckChanges.ZipcodeChanged'], true), eq(variables.isDevelop, true))
steps:
- script: |
echo 'We should make a new pypi.org package and update it like https://pypi.org/project/great-expectations-experimental/#history'
workingDirectory: $(Build.SourcesDirectory)/contrib/great_expectations_zipcode_expectations
displayName: 'TODO zipcode'