[Question] Pipeline code to read the exe copied locally
- Dominant language
- C#
- Stars
- 448
- Forks
- 247
- PR merge metrics
- No merged PRs in 30d
Description
### Release version
APIOps Toolkit v6.0.1.4
### Question Details
I am trying to import the exe and copy it to the pipeline workspace from where the extractor or publisher can read it from. The extractor iexe is running fine but it is not able to find the rest of the api definitions that I have also placed in the same workspace.
The code to checkout both the exe and the api definition files are:
- checkout: 'git://Project/apiops-blueprints'
path: blueprints // this is where exe resides
- checkout: 'git://Project/$(apimRepositoryName)'
path: apidefinitions
- publish: '$(Pipeline.Workspace)/blueprints'
displayName: 'Publish Blueprints'
artifact: blueprints
- publish: '$(Pipeline.Workspace)/apidefinitions'
displayName: 'Publish APIDefinitions'
artifact: apidefinitions
In the 'Fetch Extractor' powershell task, I have the following command:
$executableFilePath = Join-Path "$(Pipeline.Workspace)/blueprints/apim/extractor/binaries/$(apiops_release_version)/extractor-win-x64/" "extractor.exe"
And the environment variable I am setting is as follows:
CONFIGURATION_YAML_PATH: apidefinitions/$(configurationYamlPath)
The Fetch Extractor works fine but the pipeline fails on 'Run extractor' task, with the following error:
##[error]Unhandled exception. System.IO.FileNotFoundException: The configuration file 'apidefinitions/extractor.configuration.yaml' was not found and is not optional. The expected physical path was 'D:\a\1\s\apidefinitions\extractor.configuration.yaml'.
I have also tried using '../' in the CONFIGURATION_YAML_PATH env variable but it results in the same error.
Is there any better way to do this? The requirement is to be able to simply checkout the exe from devops and place it in the build agent so that extractor tool can access it. Thanks
### Expected behavior
The requirement is to be able to simply checkout the exe from devops and place it in the build agent so that extractor tool can access it. Thanks
### Actual behavior
The Fetch Extractor works fine but the pipeline fails on 'Run extractor' task, with the following error:
##[error]Unhandled exception. System.IO.FileNotFoundException: The configuration file 'apidefinitions/extractor.configuration.yaml' was not found and is not optional. The expected physical path was 'D:\a\1\s\apidefinitions\extractor.configuration.yaml'.
### Reproduction Steps
1. Checkout the exe
2. Set up the environment variable with the location of exe and location of config file.
3. Run the pipeline.
Contributor guide
Assessment
This issue has not been assessed yet.