First thing , I read https://community.atlassian.com/t5/Bitbucket-questions/How-do-I-use-Postgres-in-Bitbucket-Pipelines/qaq-p/461910 and https://confluence.atlassian.com/bitbucket/use-services-and-databases-in-bitbucket-pipelines-874786688.html.
For the settings I have no problem but I would to know how to interact with the database ?
For example, load a file of sql insert/create table via psql and then run test
Here is my config file :
Two ways I can think of to interact with your databases; personally I would write a task in JS to interact with Postgres, so that you can run it with npm eg.
npm run load_db
You can also install the postgresql client from the OS packages. Node 6.9.5 is based on debian, so you can use apt-get to install the postgresql-client package.
apt-get update && apt-get install -qy postgresql-client
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs