New answers tagged

0

Environment approvals work per-stage. Split your jobs into separate stages: stages: - stage: development condition: contains(variables['Build.SourceBranch'], 'refs/heads/develop') jobs: - deployment: Deploy_Dev displayName: 'Deploy Develop to Dev Machine' pool: name: Development environment: 'development' ...


1

I'm not familiar with Invoke-Build, but appearantly it's a part of the InvokeBuild PowerShell module? In that case, you'll have to install the module as part of the script where you're using it. Your YAML should be something like this: - stage: Build jobs: - job: Build steps: - task: PowerShell@2 inputs: targetType: '...


0

If your after the branch name, and your branches don't include "directories" (example: releases/my_release), then Build.SourceBranchName will you give you "The last path segment in the ref". So, if Build.SourceBranch is refs/heads/master, then Build.SourceBranch will be master. Your YAML: trigger: branches: include: - master ...


Top 50 recent answers are included