Cloudbees Pipeline for Couchbase scripts execution

Hi Team,

We have planned to automate the process of executing the scripts in couchbase via CI/CD. Could you please guide on how to plan for this?

Hi @richa_bharwal,

Could you expand a bit more on what you mean by executing scripts in Couchbase via CI/CD? What are you trying to achieve using these scripts? It will help us to give you a better answer.

We want to automate the master document update via pipeline rather than manually executing the queries in workbench or import file via web console and then execute. But instead we want to input the script to cloudbees pipeline and can execute the script as per the specified cb server like we do via CLI. For which we might need cloudbees to enable docker to run cbq or so.

So if I understand correctly, you are trying to update the documents on your CB server using either a query or the import file on the UI & would like to run this from the CI/CD environment.

If you want to run queries from your CI/CD pipeline, you can do it as you mentioned using tools like cbq or cbimport (cli for data import). You can run them in your CI environment in any of the ways you can run Couchbase (Docker, installation on env, etc).

Another alternative might be to use the REST interface to run your queries.

The things to keep in mind would be the following:

  • Access to the Couchbase cluster in which you make changes from the pipeline environment.
1 Like

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.

That is an interesting setup that you have got there. As long as the environment where you are running the Ansible Job (Jenkins in your case) has access to the Couchbase cluster, things should work.