I want to use Box as a repository for documents that I am building in a CI/CD pipeline (circleci.com).
I imagined the process would be something like:
- Download the box-cli as part of Docker setup that runs the CI/CD pipeline
- Obtain an API access key from my box.com (or setup a service user in my org)
- Store the access key as secrets in my CI/CD pipeline config
- At the end of the build process, run the box-cli with the access keys to upload the document
From a bit of looking around the Box API, it seems that I need to:
- Download and build the box-cli along with its node dependencies (there is no install public package for box-cli)
- Create a Box App - I'm unclear on what sort of configuration is required
- Setup OAuth tokens and store them as CI/CD secrets
- Setup some sort of refresh process for the OAuth tokens and update the CI/CD secrets
- At the end of the build process, run the box-cli with the refreshed OAuth tokens to upload the document - somehow this interfaces with the Box App
This seems a lot of pain for a simple use case. Am I on the correct path, or am I missing something?
