title: Is it possible to refrence files inside Azure DevOps pipeline templates when these templates reside in a standalone repo?
body: <p>I'm setting up several pipelines in Azure DevOps. To make my teams life easier, I'm using job templates.</p>
  
  <p>These job templates are in a a proper repository, just for them.</p>
  
  <p>For every pipeline I define the repository to get the templates from.</p>
  
  <p>Some tasks in these templates run powershell code, and I want this code to be in a script file, to be reusable and stored in the same repo as the template.</p>
  
  <p>When the pipelines runs, the template is embeded, it tries to locate the powershell script inside project repo actually being built/deployed.</p>
  
  <p>How can i achieve this?</p>
  
  <p>The workaround is to have inline code which I really don't want to have.</p>
  
  <p>Any constructive answer will be very appreciated.</p>
  
  <p>Thanks</p>
  
  <p>After some digging I couldn't find any way to specify a script file as source to powershell task in a template.</p>
  
  <p>Inside pipeline definition:</p>
  
  <pre><code>resources:
    repositories:
      - repository: templates
        type: git
        name: deploy-templates
  
  variables:
    artifactName: 'Trade Data ETL - $(Build.SourceBranchName)'
  
  stages:
  - stage: Build
    displayName: Build
    variables:
    - group: DEV-Credential-Group
    - group: COMMON-Settings-Group
  
    jobs:
    - template: ssis/pipelines/stage-build.yml@templates  # Template reference
      parameters:
        artifactName: '$(artifactName)'
  </code></pre>
  
  <p>Inside template file:</p>
  
  <pre><code>- task: PowerShell@2
      inputs:
        filePath: ssis/pipelines/scripts/build-ssis-project.ps1
        arguments: '-ProjectToBuild "tradedata-ldz-ssis/tradedata-ldz-ssis.dtproj'
        pwsh: true
  </code></pre>