---
# System prepended metadata

title: Draft Proposal for CICD scripts to be reused

---

# Draft Proposal for CICD scripts to be reused

## What we are trying to accomplish

Evaluate whether it is possible to re-use CICD scripts that exists in other repo.
It is very likely that we will want to provide similar functions that we discussed for the Resourcing repo for other repos as well. It is also discussed that - Resourcing repo, might be split up so that code that needs to operate on sensitive data are stored elsewhere (and you may not have access). But, the code from this repo will still need to be deployed.

So, the thought is, we need to evaluate whether it is possible to re-use CICD scripts.  That is, we will create a separate project that contains all of the deployment utilities and scripts (say repo COMMON).  Then, if repo A needs to be uploaded to the DO system - repo A simply needs to hook into COMMON and run the scripts to do the upload.

## After Evaluation

After Evaluating if it is possible to re-use the CI/CD script, I found that it would be a bit hard to trigger a CI/CD script from a different repo than what it resides in, since triggers are triggered by events like **push**, **merge**, etc.

So I Had to re-think the process and come up with a proposal of how we can re-use some parts of the CI/CD scripts as `shell scripts` not `ci.yml` files that represents CI?CD scripts.


## Proposal of using re-usable shell scripts.

So the idea is  having a deployment repo with shell scripts that can be re-usable by multiple repos (and their CI/CD scripts).

So How it would work is, we would continue to have CI/CD scripts in each and every repo that needs CI/CD but with minimal code to execute the right shell script in our deployment repo, that will be executed on the DO host and say update/upload the code their. 