App Engine: different app.yaml files based on environment

后端 未结 3 880
我寻月下人不归
我寻月下人不归 2021-02-20 08:48

I am currently migrating an application to Google App Engine that relies on environment variables for various external connections. It looks like the app.yaml file is where I s

3条回答
  •  爱一瞬间的悲伤
    2021-02-20 09:00

    I needed a solution for this that would work with a CD pipeline. I use Build Triggers on my git repositories. Using these, I can template the branch name I'm launching from into my cloudbuild.yaml file. My first build step is then to generate app.yaml from a shell script using the branch_name as a conditional value.

    # cloudbuild.yaml
    - name: 'ubuntu'
      args: ['bash', 'app.yaml.sh', '$BRANCH_NAME']
    

提交回复
热议问题