Description
I’m in the process of configuring my Go app to be able to be automatically deployed to GAE in the standard environment on pushes to master
on GitHub.
So far, I’ve been able to set it up using Google App Engine’s flexible environment but I’m unable to take advantage of the Free Tier by doing so. I’m pretty sure what I’m doing wrong is misconfiguring my cloudbuild.yml
file since it seems like the code is actually getting to GAE but it will not run when it gets there.
Here’s my app.yaml
:
runtime: go112
Here’s my cloudbuild.yaml
(although this is changing as I’m basically just iterating over a bunch of different configurations to get something to work):
steps:
- name: 'gcr.io/cloud-builders/go'
args: ['install', '.']
env: ['PROJECT_ROOT=watchmyrepo']
- name: 'gcr.io/cloud-builders/go'
args: ['build', 'watchmyrepo']
env: ['PROJECT_ROOT=watchmyrepo']
- name: 'gcr.io/cloud-builders/go'
args: ['run', 'watchmyrepo']
env: ['PROJECT_ROOT=watchmyrepo']
artifacts:
objects:
location: 'gs://watchmyrepo-248001/'
paths: ['watchmyrepo']
The Go app itself is relatively standard in its layout/design and can be found here where I’m working on the “gae-standard” branch.
I’d ideally love to have:
- TravisCI run tests/deploy code to GAE
- GAE running the code in the standard environment
Right now, the TravisCI output seems like it’s deploying successfully, based on the logs (see below) and I see the project getting updated in the GCP console but there are no running instances - I feel like I’m missing something super simple but can’t quite figure out what it is.
The documentation on the TravisCI side is pretty clear and make sense - following that was no problem - but I’m stuck trying to figure out what else should be in the repo in order to make it successfully deploy on GAE.
If anyone has a good example to point me at, or some insight into what I’m doing wrong, I’d appreciate it.