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

[MAINTENANCE] Make a copy of azure pipeline definition files in new locations #7233

Merged
merged 3 commits into from Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions ci/README.md
@@ -0,0 +1,3 @@
# Continuous Integration Tests

This folder contains pipeline configurations and any ancillary files needed for our Continuous Integration test pipelines.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's follow this description up with details about each pipeline? Maybe copying from that Confluence doc? Not necessary here but might be helpful for future devs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree. Let's do that in a follow up PR e.g. when I'm removing the files copied in this PR just so we can get this cleanup process started.

148 changes: 148 additions & 0 deletions ci/azure-pipelines-contrib.yml
@@ -0,0 +1,148 @@
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|ruff)' reqs/requirements-dev-contrib.txt)
EXIT_STATUS=0
invoke fmt --check || EXIT_STATUS=$?
invoke lint || 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 "team@greatexpectations.io"
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'