yaml
3 TopicsStruggling with Git and multi stage yaml pipeline...
Hey, Trying to do a multistage yaml pipeline and running into an issue with Git. My pipeline is starting off with creating a new branch based on the build id, snippet of the code below: $exportBranchName = "PipelineRun_BuildId$(Build.BuildId)" cd $(Build.SourcesDirectory) git config user.email "email address removed for privacy reasons" git config user.name "Pipeline" git checkout -b $exportBranchName git push -u origin $exportBranchName I'm then calling two separate template files that do slightly different things, however the ending in the templated files to push the changes into the above branch is the same in both. Strangely the second template file works, but the first fails with the error "fatal: not a git repository (or any of the parent directories): .git". Sample code below that's pushing the changes: git fetch $exportBranchName = "PipelineRun_BuildId$(Build.BuildId)" cd $(Build.SourcesDirectory) git config user.email "email address removed for privacy reasons" git config global user.name "Pipeline" git checkout $exportBranchName git add --all git commit -m "Comiting ${{ parameters.solutionName }} to branch PipelineRun_BuildId$(Build.BuildId)" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push --set-upstream origin $exportBranchName Just wondering if anyone has an idea to what's causing the first to fail, but not the second?1.1KViews0likes0CommentsUsing new YAML pipelines to do release like the old pipelines did
I am trying to get YAML pipelines to do what I need but I cannot get my head around this: Using the old pipelines you can build using one pipeline, then have a release pipeline run thru different stages using that build output. I commonly used this to build something, then release it to the TEST environment (using a test stage). After the user tests are ok, I re-ran the same release pipeline but executed the PROD stage instead. This used the same build as the last time. All examples both builds and publishes in the same pipeline, but this will build and publish the latest version all the time, and that is not what I am looking for. There is the PublishPipelineArtifact task and the DownloadBuildArtifacts but these either publishes within the same pipeline, or gets the latest verion. I know that my scenario is possible and supported, but I just can't make it work. is there anyone out there can can supply me with code/links/clips/hints? I would be very grateful. Lastly: Am I going about this the wrong way? Am I trying to solve something that really isn't a problem?1.2KViews0likes0Comments##[warning]No test result files matching reports/*.xml were found.
Hi Everyone, Request you to please check this. Thank you in Advance. after running the pytest, the XML file is not getting generated. ##[warning]No test result files matching reports/*.xml were found. after running the below command also. The XML file is not getting generated. python3 2_deploy_dev/test_dev.py '${{ parameters.DEPLOYER_URL }}' '${{ parameters.DEPLOYER_API_KEY }}' '${{ parameters.API_SERVICE_ID }}' '${{ parameters.API_ENDPOINT_ID }}' '${{ parameters.API_DEV_INFRA_ID }}' -m pytest -o junit_family=xunit1 --junitxml=reports/DEV_TEST.xml4.7KViews0likes0Comments