diff --git a/README.md b/README.md index f950e6f..fc1cc62 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/) -[![Build Status](https://dev.azure.com/shotgun-ecosystem/Toolkit/_apis/build/status/shotgunEvents?branchName=master)](https://dev.azure.com/shotgun-ecosystem/Toolkit/_build/latest?definitionId=89&branchName=master) +[![Supported Python versions: 3.9 - 3.11](https://img.shields.io/badge/Python-3.9_|_3.10_|_3.11-blue?logo=python&logoColor=f5f5f5)](https://www.python.org/ "Supported Python versions") +[![Build Status](https://dev.azure.com/shotgun-ecosystem/ShotGrid%20Jira%20Bridge/_apis/build/status/shotgunEvents?branchName=master)](https://dev.azure.com/shotgun-ecosystem/ShotGrid%20Jira%20Bridge/_build/latest?definitionId=122&branchName=master) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Linting](https://img.shields.io/badge/PEP8%20by-Hound%20CI-a873d1.svg)](https://houndci.com) diff --git a/azure_pipelines.yml b/azure_pipelines.yml index f1f8aa8..3c75b03 100644 --- a/azure_pipelines.yml +++ b/azure_pipelines.yml @@ -8,15 +8,6 @@ # agreement to the Shotgun Pipeline Toolkit Source Code License. All rights # not expressly granted therein are reserved by Shotgun Software Inc. -# Imports the shared Azure CI tools from the master branch of shotgunsoftware/tk-ci-tools -resources: - repositories: - - repository: templates - type: github - name: shotgunsoftware/tk-ci-tools - ref: refs/heads/master - endpoint: shotgunsoftware - # We want builds to trigger for 3 reasons: # - The master branch sees new commits # - Each PR should get rebuilt when commits are added to it. @@ -33,12 +24,6 @@ pr: include: - "*" -# This pulls in a variable group from Azure. Variables can be encrypted or not. -variables: -- group: deploy-secrets - # Launch into the build pipeline. jobs: -- template: build-pipeline.yml@templates - parameters: - has_unit_tests: false +- template: azure_pipelines/code-style-validation.yml diff --git a/azure_pipelines/code-style-validation.yml b/azure_pipelines/code-style-validation.yml new file mode 100644 index 0000000..13659a7 --- /dev/null +++ b/azure_pipelines/code-style-validation.yml @@ -0,0 +1,40 @@ +# Copyright (c) 2025 Shotgun Software Inc. +# +# CONFIDENTIAL AND PROPRIETARY +# +# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit +# Source Code License included in this distribution package. See LICENSE. +# By accessing, using, copying or modifying this work you indicate your +# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights +# not expressly granted therein are reserved by Shotgun Software Inc. + + +jobs: +- job: code_style_validation + displayName: Code Style Validation + pool: + vmImage: ubuntu-latest + + steps: + - task: UsePythonVersion@0 + displayName: Use Python 3.11 + inputs: + versionSpec: 3.11 + + - task: Bash@3 + displayName: Install Python dependencies + inputs: + targetType: inline + script: pip install -U pre-commit + + - task: Bash@3 + displayName: Update pre-commit hook versions + inputs: + targetType: inline + script: pre-commit autoupdate + + - task: Bash@3 + displayName: Validate code + inputs: + targetType: inline + script: pre-commit run --all