0

I have a working azure pipeline code which looks like the code below.

trigger:
- none

resources:
  repositories:
  - repository: 'xxx - xxx'
    type: git
    name: 'xxx - xxx'

stages:
- stage: xxx
  jobs:
  - deployment: xxx
    environment: xxx
    variables:
    - group: xxx
    timeoutInMinutes: 90
    pool:
      name: 'xxx'
      demands:
        - RunSF -equals True
      vmImage: 'ubuntu-20.04'
    strategy:
      runOnce:
        deploy:
          steps:
          - checkout: self
          - checkout: 'xxx'
            path: s/app
          - template: 'templates/xxx.yml'
          - task: DownloadSecureFile@1
            name: xxx
            inputs:
              secureFile: 'xxx.key'
          - template: 'templates/xxx.yml'
          - template: 'templates/xxx.yml'
          - template: 'templates/xxx-build-package.yml'
          - template: 'templates/xxx-deploy.yml'
            parameters:
                validateOrDeploy: 'Validate'
                emailUpsert: false

I want to create a new pipeline similar to this pipeline so I copied the this pipeline and pasted it onto new yaml template and used it to create new azure devops pipeline. However when I run the pipeline, I run into an error and I have searched for the cause with any lead. The error is as below:

remote: Azure Repos        
remote: 
remote: Found 0 objects to send. (0 ms)        
From https://xxxxxxxxxxxxxxxxxxxxxxxxxxxx
 * branch            xxxxxxxxxxxxxxxxx -> FETCH_HEAD
git checkout --progress --force refs/remotes/origin/xxxxxxxxxxxxxxxxxxxxxxx
Note: switching to 'refs/remotes/origin/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at df4c22d Added azure-test.yaml
Finishing: Checkout CICD2@main to s/CICD

Any tips would be highly appreciated

user11036847
  • 455
  • 1
  • 4
  • 12
  • This isn't necessarily an issue, you could define a build variable "advice.detachedHead" with value "false" and run and it shouldn't show up again. – KevinLee May 12 '23 at 14:32

0 Answers0