Send data from bitbucket pipeline to EC2 instance

0

Hey, To describe my problem: I have an EC2 instance with the Allure Test docker container running on it. Allure is a test management platform for unit tests. The tests are generated with a bitbucket pipeline automatically every day. Now I want to send the test data files through the pipeline to the EC2 instance. All I found is about deploying a application with the service CodeDeploy but all I want is to send files from the pipeline to the file system of the instance.

Is that possible and if yes, can anyone help me with this issue?

BR, Mark

已提問 4 個月前檢視次數 155 次
1 個回答
0

Hi,

To keep things simple, why don't you use just S3: you create an additional stage in your pipeline where you push the test data files to S3.

Then, you add some polling mechanism from the EC2 instance ( through extension of existing initial test script or so) to poll the S3 and look for new files. When there are some, the script on EC2 copy them onto the instance file instance for use in next round of tests.

You can sophisticate if you wish by adding a Lambda trigger on the S3 writes by the pipeline to avoid polling from EC2: the Lambda would ssh to EC2 to trigger the copy script. But, that's probably overkill for the current use case that you describe.

Best,

Didier

profile pictureAWS
專家
已回答 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南