I'm deploying my Laravel project on App Engine. I need to put some data like the password of the database in the app.yaml configuration file, I would like to do something like this when I have added $DB_PASSWORD in the environment variables of the Bitbucket repo.
Is there any way to accomplish this?
I don't really think the `env` set in bitbucket can be read by the App Engine `app.yml`. I suggest you do the following
1. Bitbucket pipelines ships with an awesome feature, Bitbucket pipes, which makes most of deployments easy. The good news, there exists a bitbucket pipe for Google App Engine, See Link below;
below is a snipe you can apply, do everything you need like building the app and `env` all in within the pipeline, so by the time it's sent to App Engine, the `env` already exists;
# image: php:7.2-fpm pipelines: default: - step: name: Build and Test script: - cp .env.example .env
# pass environment variables in travis to the app
- sed -ri 's~^DB_PASSWORD=~DB_PASSWORD=\$DB_PASSWORD~' .env - step: name: Deploy script: - pipe: atlassian/google-app-engine-deploy:0.2.1 variables: KEY_FILE: $KEY_FILE PROJECT: 'my-project'
2. You can maintain your config and I believe the `env` variables within `app.yml` should be defined in App Engine rather than bitbucket
I hope this helps
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events