Coder Social home page Coder Social logo

Comments (3)

asottile avatar asottile commented on June 1, 2024 1

works fine for me: #80

report your actual bug rather than prescribing a solution

from azure-pipeline-templates.

asottile avatar asottile commented on June 1, 2024 1

are you using the template? it's not meant to be copied into the azure-pipelines.yml file but instead consumed via inclusion

from azure-pipeline-templates.

jyotirmay123 avatar jyotirmay123 commented on June 1, 2024

Sorry for the proposal.

I tried to use the pre-commit pipeline as it is in Azure and it throws below error:

/azure-pipelines.yml (Line: 2, Col: 3): A mapping was not expected

My copied pipeline below: (Just removed ruby dependency)

parameters:
  - name: python
    type: string
    default: '3.9'

jobs:
  - job: precommit
    pool:
      vmImage: ubuntu-latest
    variables:
      PRE_COMMIT_HOME: $(Pipeline.Workspace)/pre-commit-cache

    steps:
      - task: UsePythonVersion@0
        inputs:
          versionSpec: ${{parameters.python}}

      - script: |
          echo "##vso[task.setvariable variable=PY]$(python -VV)"
        displayName: set version variables

      - task: CacheBeta@0
        inputs:
          key: pre-commit | "4" | .pre-commit-config.yaml | "$(PY)"
          path: $(PRE_COMMIT_HOME)

      - script: python -m pip install --upgrade pre-commit
        displayName: install pre-commit
      - script: pre-commit run --all-files --show-diff-on-failure
        displayName: run pre-commit

And with the proposed changes, it works correctly.

from azure-pipeline-templates.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.