Upload XML Files from EC2 Instance to S3

Hi,

I’m Running Test Cases from Octopus on EC2 Instance, Once those Test Cases are done running generating the XML files. Can you please help me in Uploading those generated XML files to S3 using scripting.
If you have any suggestion how to write script in Octopus or if you have any script sample’s can you please help me by sharing those.
When it generates the XML files the folder structure is like image .

Every time when i runs Test Cases from Octopus it generate new directory with numbers naming pattern under Reports.Can you please help me how octopus can take the latest folder that created under Reports.

Hi @sonuvojjala

I’m afraid that we don’t have anything specifically for this, you will likely want to use the AWS powershell module to push to the S3 bucket.

You should be able to get the most-recently created directory by using something like Get-ChildItem | sort LastWriteTime | select -last 1 in the Reports directory to get the most recently created directory.

Good luck getting this running!

Thank you @Justin_Walsh

Let me give a try.

1 Like