Score:2

How to checkout a branch from azure devops pipeline?

cn flag

I kept trigger to cloud_singlesignon branch.

But my pipeline saved to azure-pipelines and the default branch to the repo is master.

But the checkout not happening from cloud_singlesignon.

I observed, it is checking out from branch where the pipeline is saved(azure-pipelines), not the one in trigger

Any idea how to troubleshoot this?

my pipeline:

trigger:
- cloud_singlesignon
 
resources:
  - repo: self
 
pool:
  vmImage: ubuntu-latest
 
steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'
 
- script: |
    wget https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz
    pwd
    ls -lRt
  displayName: 'Download jdk'
- task: JavaToolInstaller@0
  inputs:
    versionSpec: '16'
    jdkArchitectureOption: 'x64'
    jdkSourceOption: 'LocalDirectory'
    jdkFile: 'OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz'
    jdkDestinationDirectory: '/opt/jdkcustom'
    cleanDestinationDirectory: true
- script: |
    java -version
    ls -lRt
    pwd
    ls $(Pipeline.Workspace)
    git log --oneline | wc -l
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.