diff --git a/technical-docs/designs/repos-merge.md b/technical-docs/designs/repos-merge.md new file mode 100644 index 000000000..7d80880ef --- /dev/null +++ b/technical-docs/designs/repos-merge.md @@ -0,0 +1,207 @@ +# Moving SPK to Bedrock Repo: A Phased Approach + +## Phase 1: Prep work before moving SPK to Bedrock Repo + +### Bedrock Repo Changes + +By making following changes in existing Bedrock repo minimizes the number of +changes after the merge and limits the testing scope. + +#### Current Bedrock Repo + +``` +├── .github +├── cluster +├── docs +├── gitops +├── pipelines +├── test +├── tools +├── LICENSE +├── README.md +├── .gitignore +├── azure-pipelines.yml +``` + +#### Proposed Changes + +- Create `src` folder in `cluster` folder +- Move all files and folders except `src` from `cluster` to `cluster\src` +- Move `azure-pipelines.yml` file from the root to `cluster\build\pipelines` + directory and make sure all pipelines still works. +- Move `test` folder to `cluster` folder and make sure all tests and pipelines + still works. +- Move `bedrock` related files from `tools` directory to `cluster\build` folder + and make sure existing Bedrock release process still works. +- [ ] Move following files form the `root` directory to `cluster` and make sure + `cluster` project can be opened in VS Code. + - LICENSE + - .gitignore + +#### Testing + +After making the above changes, need to make sure that the follwing tests pass. + +- Verify the environments integration tests continue to work in `azdo` +- Verify `bedrock` release provess work +- Verify the project can be opened in VS Code from the `cluster` folder + +#### Bedrock repo after changes + +`Bedrock` repo would look like below after implementing the above changes. + +``` +├── .github +├── gitops +├── cluster + ├── build + ├── pipelines + ├── azure-pipelines.yml + ├── tools + ├── docs + ├── src + ├── test + ├── LICENSE + ├── README.md + ├── .gitignore + +``` + +### SPK Repo Changes + +Making following changes in existing SPK repo minimizes the number of changes +after the merge and limits the testing scope to SPK functioanlity. + +#### Current SPK repo + +``` +├── .github +├── azure-pipelines + ├── templates +├── docs + ├── commands +├── guides +├── patches +├── scripts +├── src +├── technical-docs + ├── designs +├── tests +├── tools +├── typings + ├── ssh-url +├── .editorconfig +├── .env.example +├── .gitignore +├── CHANGELOG.md +├── README.md +├── azure-pipelines.yml +├── jest.config.js +├── package.json +├── release-pipeline.yml +├── smoke-test-pipeline.yml +├── spk-config.yaml +├── tsconfig.json +├── tslint.json +├── typings +├── webpack.config.js +├── .yarn.lock +``` + +#### Themes + +The main themes are related to organizing `docs` and `build` related artifacts +in `spk` from the root to appropriate directories. + +1. Organize all pipeline yaml files, scripts, and tools that are related to + building and releasing binaries under `build` directory. + +2. Organize all docs that are related to using and contributing bedrock under + `docs` directory. + +#### Proposed Changes + +The majority of the proposed changes in `spk` repo are related to organizing +`docs` and `build` folders. + +- Move following files from the `root` to `build\pipelines` folder and make sure + all pipelines continue to work. + - azure-pipelines.yml + - release-pipeline.yml + - smoke-test-pipeline.yml +- Move following files from the `scripts` to `build\publishing` folder and + verify the scripts generate `command` docs. + - generateDoc.ts + - locateAliases.ts +- Move `patches` directory to `build\patches` folder and make sure `yarn build` + and `yarn test` continue to work. +- Move `azure-pipelines\templates` folder to `build\pipelines\templates` folder + and verify all pipelines continue to work. +- Move `guides\contributing.md` file to `documents\contribution` folder +- Move `guides` folder to `documents` folder +- Move `technical-docs\designs` to `documents\contribution\designs` folder +- Remove `.github\workflows` folder since it is not being used + +#### Testing + +After making the above changes, need to make sure that the follwing tests pass. + +- Verify cli build pipeline is working +- Verify cli integration test pipeline is working +- Verify cli release pipeline is working +- Verify cli autogenerated docs are working on GitHub pages +- Verify all docs links are working + +#### SPK repo after changes + +`spk` repo would look like below after implementing the above changes. + +``` +├── build + ├── pipelines + ├── templates + ├── azure-pipelines.yml + ├── release-pipeline.yml + ├── smoke-test-pipeline.yml + ├── patches + ├── 001-azure-devops-node.patch + ├── publishing + ├── generateDoc.ts + ├── locateAliases.ts + ├── tools + ├── release-version-bump.sh + ├── tag-release.sh + ├── update_introspection.sh +├── docs + ├── commands +├── documents + ├── contribution + ├── contributing.md + ├── designs + ├── guides +├── src + ├── lib + ├── commands + ├── logger +├── tests +├── typings + ├── ssh-url +├── .editorconfig +├── .gitignore +├── jest.config.js +├── tsconfig.json +├── tslint.json +├── CHANGELOG.md +├── README.md +├── package.json +├── webpack.config.js +├── .yarn.lock +``` + +### Phase 2: Move SPK to Bedrock Repo + +TODO + +### Phase 3: Create a side by side new repo for Bedrock Infra/Cluster terraform + +TODO