Has anyone successfully created a bitbucket pipeline for deployment using Trellis

I’m trying to get this pipeline set up for my trellis site so I can deploy to Kinsta on commit but I’m pretty new to pipelines. I’m currently stuck on the .vault_pass file not being found by the bitbucket pipeline. Clearly this file is not being committed to the repo, so is it even possible to run ansible-playbook deploy.yml -e env=staging -e site=staging-iresq.com --limit=kinsta_staging from a pipeline? Do I need to use the other method of creating vault password through the command line instead of the .vault_pass file? Here’s my pipeline so far

This is the error that’s showing up after the deploy action for reference
ERROR! The vault password file /opt/atlassian/pipelines/agent/build/trellis/.vault_pass was not found

It seems that you can create a secrets file in using their “vault-password-file” option, here are a few links that might help:

Providing Vault Passwords
https://docs.ansible.com/ansible/latest/user_guide/vault.html#providing-vault-passwords

CI/CD example

I’ve had success in using just ENV variables in other cases within the bitbucket pipelines which can be exported in the “script” commands. I hope this helps and good luck.

1 Like

Thanks for the help. I was able to get it to work using BitBucket secret ENV variables. I created a temp .vault_pass file with the secret variable and I was able to deploy successfully.

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.