Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Push value/variable from scripts to after-scripts

I'm working with Salesforce CI/CD and we have issue that output of CI doesn't show up in pipeline log.

I came up with idea that maybe we can use report of deployment status.
But, I hit the wall, step looks something like this:

sfdx force:source:deploy -p force-app/main/default/ -u abatvalidate -l RunLocalTests -c -w 30 | cut -c 10- | awk ‘FNR <= 1’ > ./deployment.txt          
echo cat ./deployment.txt          
sfdx force:source:deploy:report --targetusername abatvalidate --jobid $value --wait 30 --json         
apt-get update          
apt-get install -y jq           
value=`cat ./deployment.txt`        
- sfdx force:source:deploy:report --targetusername abatvalidate --jobid $value --wait 30 --json

What i need is way to push output of deployment.txt file into after-scripts.
But when script fails it straight up removes what's inside deployment.txt .
Is there any possibility to do it? I tried artifacts but they are not working.



Log in or Sign up to comment
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,230 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you