I have a bitbucket CI running on a self hosted Azure windows server. In the first step, the (C++) project shall be built, in the next one the runner shall run the unit tests and finally the integration tests. Right now, artifacts do not work at all, they are not provided to the next steps and I cannot find anything in Bitbucket to download them manually. I'm not sure if there are some configurations which enable/disable artifacts but I did not find anything in the web up to now...
My CI script looks like the following:
image: gcc:10.2
pipelines:
default:
- step:
name: Build
runs-on:
- self.hosted
- windows
script:
- ./build.ps1
- Get-ChildItem out/
artifcats:
- out/**
- step:
name: Unit Test
runs-on:
- self.hosted
- windows
script:
- Get-ChildItem out/
- ./build.ps1 # temporary, since artifacts do not work
- vstest.console.exe out/ConverterTest.dll
- step:
name: Integration Test
runs-on:
- self.hosted
- windows
script:
- ./build.ps1 # temporary, since artifacts do not work
- ./run_all_test.ps1 -RunningName "oc100_${Env:BITBUCKET_STEP_UUID}"
artifacts:
- test-client/out/
The build.ps1 script is the following one:
MSBuild.exe YunexKonverter.sln
MSBuild.exe YunexKonverter.sln /t:ConverterTest
New-Item -Path "." -Name "out" -ItemType "directory" -Force
Copy-Item -Path "x64/Debug/*" -Destination "out" -Recurse
In the output from the Get-ChildItem, I can see that at the end of step "Build" there are all files inside the out/ folder. At the beginning of step "Unit Test" there is no file in there anymore.... and I have absolutely no clue why.
Kind regards,
Julian