Goal
This article describes how to reinitialize the git directory of a configuration as code project, when this directory and/or its files have been deleted and cannot be recovered.
Prerequisites
- Write access to the Octopus Deploy project
- Write access to the project's repository in git
Please note that if the original .ocl files have been deleted and cannot be recovered, you will not be able to restore the previously defined processes and configurations for this project. The following steps assumes you no longer have these files. These steps will reinitialize the git directory linked to this project, and will allow you to recreate your deployment process, runbooks, and variables in place, without having to delete and recreate the entire project.
If you still have a copy of the original .ocl files from the deleted repository, you can simply restore these files to the project directory path.
Steps
- Confirm the git repository and directory location defined for your project. This can be found in the project's Version Control tab, under "Repository" and "Git File Storage Directory." (The default file directory is
.octopus.) - If the git repository or the file storage directory defined above no longer exist, create it.
- Add the following three empty files to the file storage directory for this project:
deployment_process.ocl
deployment_settings.ocl
variables.ocl
- Add file
schema_version.oclwith the following line:
version = 15
The exact version number doesn't really matter here, as it will automatically be overwritten to the appropriate version the next time your project writes to this repository.
Verify
Check the following tabs - you should no longer see any warnings about missing repository files in the UI, and should now be able to make changes to the project and save.
- Process
- Settings
- Runbooks
- Project Variables
Be sure to go to your project's Settings tab, reconfigure the deployment settings as needed, and save.