You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi! I'm working on a project and we are using bitbucket pipelines for the first time.
We have a project that runs calculations and then exports the results to a CSV file to "C:/temp/". The name of the file is dynamic and bound with the time it ran, but I don't have an issue there.
The issue I have is that I want to check the CSV file with a pipeline, meaning that Somewhere on the bitbucket or pipeline (to be honest I don't really know) the file will be also exported to "C:/temp/"... How do I get to this file in the bitbucket or pipeline directory?
string CSVFiles = Directory.GetFiles("C:/temp/", "*.csv");
was my initial idea but this seems to fail.
The stacktrace it gives is:
System.IO.DirectoryNotFoundException : Could not find a part of the path '/opt/atlassian/pipelines/agent/build/SMLDC.Tests/bin/Debug/netcoreapp3.0/C:/temp'. Stack Trace:
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetFiles(String path, String searchPattern)
at SMLDC.Tests.IntegrationTest.Setup() in /opt/atlassian/pipelines/agent/build/SMLDC.Tests/IntegrationTest.cs:line 31