Home > OS >  Error at running bash script AzDevOps pipelines
Error at running bash script AzDevOps pipelines

Time:12-01

i have repository folder named configuration consists the databasefs_api.json. but the problem is i am unable to find the file while deploying of this state and experiencing the mentioned error.

- bash: |
   # Write your commands here
   
   echo 'test env'
   
   curl -X POST -H "Authorization: Bearer yuvwXXXXXXX"  -d @configuration/databasefs_api.json https://adb-YYYYYYYY.X.azuredatabricks.net/api/2.0/jobs/create > file.json
   
   displayName: 'Bash Script'

Error:


Couldn't read data from file "D:kent/configuration/databasefs_api.json", this makes an empty POST

CodePudding user response:

For the checkout action, we must manually add the checkout task to the release stage. A deployment job doesn't clone automatically to the source repo. These jobs only support one checkout step.

Hope this helps!

sample example

stages:
- stage: build
  jobs:
  - job:
    steps:
    - publish: '$(Build.ArtifactStagingDirectory)/scripts'
      artifact: drop

- stage: test
  dependsOn: build
  jobs:
  - job:
    steps:
    - download: current
      artifact: drop
  • Related