georgms
February 9, 2021, 10:42am
1
According to Google App Engine Deployment - Travis CI it is not possible to deploy Pull Requests to Google App Engine:
Note that pull request builds skip the deployment step altogether.
Why is that?
My use case is this:
Create a Pull Request
Deploy it as a separate version on Google App Engine (ie. a staging app).
Ideally, post the Google App Engine URL to the GitHub Pull Request.
Of course we could just enable branch builds but:
This will put extra load on our Travis account due to extra (branch) builds that we would otherwise not want.
No connection to the Pull Request so the Google App Engine URL cannot be posted.
I think my use case sounds reasonable. Am I missing something? Why is it not possible to deploy Pull Requests?
Montana
February 16, 2021, 8:23am
2
Hey @georgms ,
Take a read of this Medium post:
georgms
February 16, 2021, 9:50am
3
Hey Montana,
thanks for the response!
Unfortunately the article does not mention how to deploy Pull Requests to Google App Engine, or am I missing something?
Cheers
Georg
Montana
February 16, 2021, 10:09am
4
Hey @georgms ,
Of course there can be workarounds for example:
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
bash ./someScript.sh
fi'
Some of the reasons Google does this is, allowing any untrustworthy PR to deploy your app is simply not acceptable.
As stated above though, there are obvious workarounds. Hope this helps.
georgms
February 16, 2021, 1:23pm
5
Hey @Montana !
Some of the reasons Google does this is, allowing any untrustworthy PR to deploy your app is simply not acceptable.
As far as I can tell it’s a Travis issue, not a Google one, since I can just deploy a Pull Request manually (gcloud app deploy …
), right?
Of course I could use some script magic to deploy the Pull Request from Travis, but there’s currently no way to deploy Pull Request using Travis’ Google App Engine deployer, right?
Thanks!
Georg