Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Artifact from self-hosted windows runner not working at all

Deleted user October 17, 2022

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

1 answer

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2022

Hello @[deleted] ,

Welcome to Atlassian Community!

The artifacts should by default be automatically downloaded in the steps after the step that generated the artifact file.

I did some tests using windows runners on my end and the artifacts were correctly generated and downloaded in the subsequent steps.

In this case, I'd like to ask you to check the logs of your pipeline run for the Build teardown section and confirm if the runner is correctly identifying the matching file(s) to generate the artifact. You should see something like the below : 

Searching for files matching artifact pattern out/**

Artifact pattern out/** matched 1 files with a total size of 14 B

Compressed files matching artifact pattern out/** to 138 B in 0 seconds

Uploading artifact of 138 B

Successfully uploaded artifact in 0 seconds

If this message is shown, it means the artifact is being successfully generated. In that case, go to the next step and check for the Build Setup phase : 

Artifact "out/**": Downloading

Artifact "out/**": Downloaded 138 B in 0 seconds

Artifact "out/**": Extracting

Artifact "out/**": Extracted in 0 seconds

This means the step downloaded the available artifact and extracted it in the same path they were generated in the previous step.

Could you please confirm if any of the sections above are missing in your pipeline logs? 

Thank you, @[deleted] .

Kind regards,

Patrik S

Deleted user October 19, 2022

Hey @Patrik S .

Sadly I cannot post my original answer since it always says it has invalid HTML in it (it doesn't have any HTML in it in my eyes, just a code snippet) and afterwards it says that I already posted the same message but it didn't actually post :c

But regardless of this, I have nothing of this artifact stuff in my Pipeline. It has only 3 lines, searching for test results & co. and that's it.

I have no Idea why it is missing and why the Pipeline won't search for any artifacts... but maybe some option anywhere can disable this? I dunno..

Kind regards,
Julian R

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 19, 2022

Hello @[deleted] ,

 

Checking the YML file you shared in the first message, it seems to have a typo in the artifacts definition for the first step : 

artifcats:
- out/**

Could you please confirm if this typo is indeed present in your yml file in the repository and try fixing it and running again your pipeline? 

Deleted user October 20, 2022

Oh my god. I can't believe this. Thanks. I had something in my eyes I guess. I tried so many things but didn't see this typo.... thanks!

Like Patrik S likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 20, 2022

hey @[deleted] ,

You're welcome! Glad to know that fixing the typo solved the issue.

Feel free to reach out to us here in the community again in case you need any help, we'll be glad to assist!

Thank you, @[deleted] !

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events