We have an issue related to deployments from pull requests. It seems other people have also had some issues with this.
For one project we have, it has a 3 stage build process. We want to make artifacts that were created in the first stage available to the next stages. We’re putting these artifacts on S3 using S3 Deployment. They are set as public readable, so we can download them again in the other stages without authenticating. The problem comes when we try to submit a PR: the deployment blocks don’t run at all. While I can understand that you wouldn’t want an application deployment to be triggered from a PR, it would be fine for us if the PR used some of our S3 storage for artifact management.
The alternative would be to use the AWS CLI to upload the artifacts, but the problem is the authentication, since encrypted environment variables also aren’t made available to PRs.
There is an example in the documentation demonstrating use of S3, but it seems to be assuming the use of a bucket that has public write permissions, which is definitely not a feasible solution for us.
One thing I tried doing was using the Travis cache for the artifact management, but sadly I didn’t find this to be a completely reliable mechanism. Sometimes when I went to retrieve artifacts from the cache they were missing.
I’m wondering if anyone else has had this problem and if there is any workaround someone could suggest?