How can I create a pipeline with Jenkins for Couchbase

Can you please help and suggest on how can I create pipeline for couchbase scripts to be executed on the couchbase server with Jenkins. How can I use cbq commands in Jenkins?

Hello and welcome to this community @crazyrich :wave:
Would that article help in any way?

Hi @poddingue No this won’t. This explains how to deploy Java project which is using couchbase (not the highlight of the article). I need how can I automate the process of script execution on Couchbase server using jenkins.

1 Like

How would you do it without Jenkins?

@halkeye One can login to the couchbase server and via CLI (cbq) we can run the script having queries.
Ex: /opt/couchbase/bin/cbq -e couchbase://10.x.x.x -u -p -file update_script.sql

can you not just do that?
sh('/opt/couchbase/bin/cbq -e couchbase://10.x.x.x -u -p -file update_script.sql')

FYI, I am using Ansible to automate this process.
Creating an Ansible job in Ansible Tower which will pick the playbook from git repo and then create a Jenkins job to trigger that Ansible Job.
Thanks!