Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could find the branch error in azure yaml #591

Open
bharuk opened this issue May 19, 2023 · 2 comments
Open

could find the branch error in azure yaml #591

bharuk opened this issue May 19, 2023 · 2 comments

Comments

@bharuk
Copy link

bharuk commented May 19, 2023

trigger: none

resources:
webhooks:
- webhook: gspdeltawebhook ### Webhook alias
connection: gspdeltawebhook
filters:
- path: pull_request.merged
value: true
- path: pull_request.base.ref
value: "develop" ##branch

repositories:
- repository: b2b-gsp-slfdelta  
  type: githubenterprise
  name:repo/b2b-gsp-slfdelta
  ref: develop
  endpoint: repo1

variables:
- name: devops_dir
value: "/home/vsts/work/1/b2b-gsp-deltadevops"
- name: global_dir
value: "/home/vsts/work/1/s/b2b-gsp-slfdelta"
- group: vargroup-sfdx
stages:

  • stage: Creation
    jobs:
    • job: Build
      timeoutInMinutes: 360
      pool:
      vmImage: ubuntu-latest

      steps:

      • checkout: self
        path: b2b-gsp-deltadevops

      • checkout: b2b-gsp-slfdelta

      • template: AzDevopsTemplate/prepareAgent.yaml

      • template: AzDevopsTemplate/keyfiles.yaml

      • bash: |
        cd $(devops_dir)
        sfdx force:auth:jwt:grant --clientid $(DevhubclientId) --jwtkeyfile $(DevserverkeyFile.secureFilePath) --username $(DevhubUserName) --instanceurl $(DevhubInstanceURL)
        displayName: 'Authenticate'

      • script: |
        cd $(global_dir)
        sfdx force:source:deploy -p force-app -w 60 --targetusername $(DevhubUserName)
        displayName: 'Deploy package'

      • task: Bash@3
        inputs:
        targetType: 'inline'
        script: |
        cd $(global_dir)
        sfdx force:mdapi:describemetadata -u $(DevhubUserName) -f $(global_dir)/describe.log --apiversion "56.0"
        cat describe.log

      • task: UsePythonVersion@0
        inputs:
        versionSpec: '3.9'

      • script: |
        pip install -r $(devops_dir)/requirements.txt
        cd $(global_dir)
        git branch
        python $(devops_dir)/python-scripts/mergerDX/merger.py merge_delta --source "feature-version1" --target "develop" --api-version "54.0"

Error:

2023-05-19T11:26:50.8527286Z
2023-05-19T11:26:50.8528398Z [notice] A new release of pip is available: 22.0.4 -> 23.1.2
2023-05-19T11:26:50.8528762Z [notice] To update, run: pip install --upgrade pip
2023-05-19T11:26:51.0626369Z * (HEAD detached at origin/067ee0dbc1fc2b794b155dc4a0937542cc9b2bb4)
2023-05-19T11:26:51.3020235Z [WARNING] Default remote 'origin' does not exist, forcing no fetch
2023-05-19T11:26:51.3021000Z [INFO] Clean up target folder 'srcToDeploy'
2023-05-19T11:26:51.3021838Z [INFO] Extracting metadata types from 'describe.log'
2023-05-19T11:26:51.3022232Z [INFO] Preparing to merge 'feature-version1' into 'develop'
2023-05-19T11:26:51.3022444Z [INFO] Validating branches source and target branches in remote (origin)
2023-05-19T11:26:51.3022752Z [FATAL] Couldn't find branch 'feature-version1', exiting...
2023-05-19T11:26:51.3136660Z ##[debug]Exit code 123 received from tool '/usr/bin/bash'
2023-05-19T11:26:51.3141574Z ##[debug]STDIO streams have closed for tool '/usr/bin/bash'
2023-05-19T11:26:51.3188462Z ##[error]Bash exited with code '123'.
2023-05-19T11:26:51.3194974Z ##[debug]Processed: ##vso[task.issue type=error;]Bash exited with code '123'.
2023-05-19T11:26:51.3195607Z ##[debug]task result: Failed
2023-05-19T11:26:51.3199174Z ##[debug]Processed: ##vso[task.complete result=Failed;done=true;]
2023-05-19T11:26:51.3209331Z ##[section]Finishing: CmdLine

@LiliaSabitova
Copy link

Hi @bharuk, thank you for reporting this. We'll take a look at this issue when we have enough capacity.

@bharuk
Copy link
Author

bharuk commented May 19, 2023

when i am running the pipeline getting error branches b2b-gsp-slfdelta in this repo we have three branches master develop and feature-version1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants