My agent gets executed before artifact is generated

Abhishek Kumar May 11, 2023

I am executing the below set of code through our bamboo pipeline

echo ${bamboo.build.working.directory}
cd "${bamboo.build.working.directory}"

chmod -R +rwx ${bamboo.build.working.directory}
chmod -R 777 ./

ls

docker run -v $(pwd):/zap/wrk/ --rm -t owasp/zap2docker-stable zap-baseline.py -t {domain} -g gen.conf -r ${bamboo.build.working.directory}/testreport.html
sleep 12m
ls -ltr

 

Still, I am getting the below error:

Failing as no matching files has been found and empty artifacts are not allowed.

 After 14 mins of being idle, our agent dies.

Please suggest.

1 answer

2 votes
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 11, 2023

Hello @Abhishek Kumar,

Welcome to Atlassian Community!

Do you see the "testreport.html" file being reported at the very end of you build by the "ls -ltr" command?

It may also be a case where the Artifact definition does not match "testreport.html". Can you review it and validate if that's set correctly?

Bamboo would expand variables in a Shell Script task using a different format. Can you try using the following format instead?

  • ${bamboo_build_working_directory}

More information here:

Cheers,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events