|
| 1 | +# Moving SPK to Bedrock Repo: A Phased Approach |
| 2 | + |
| 3 | +## Phase 1: Prep work before moving SPK to Bedrock Repo |
| 4 | + |
| 5 | +### Bedrock Repo Changes |
| 6 | + |
| 7 | +By making following changes in existing Bedrock repo minimizes the number of |
| 8 | +changes after the merge and limits the testing scope. |
| 9 | + |
| 10 | +#### Current Bedrock Repo |
| 11 | + |
| 12 | +``` |
| 13 | +├── .github |
| 14 | +├── cluster |
| 15 | +├── docs |
| 16 | +├── gitops |
| 17 | +├── pipelines |
| 18 | +├── test |
| 19 | +├── tools |
| 20 | +├── LICENSE |
| 21 | +├── README.md |
| 22 | +├── .gitignore |
| 23 | +├── azure-pipelines.yml |
| 24 | +``` |
| 25 | + |
| 26 | +#### Proposed Changes |
| 27 | + |
| 28 | +- Create `src` folder in `cluster` folder |
| 29 | +- Move all files and folders except `src` from `cluster` to `cluster\src` |
| 30 | +- Move `azure-pipelines.yml` file from the root to `cluster\build\pipelines` |
| 31 | + directory and make sure all pipelines still works. |
| 32 | +- Move `test` folder to `cluster` folder and make sure all tests and pipelines |
| 33 | + still works. |
| 34 | +- Move `bedrock` related files from `tools` directory to `cluster\build` folder |
| 35 | + and make sure existing Bedrock release process still works. |
| 36 | +- [ ] Move following files form the `root` directory to `cluster` and make sure |
| 37 | + `cluster` project can be opened in VS Code. |
| 38 | + - LICENSE |
| 39 | + - .gitignore |
| 40 | + |
| 41 | +#### Testing |
| 42 | + |
| 43 | +After making the above changes, need to make sure that the follwing tests pass. |
| 44 | + |
| 45 | +- Verify the environments integration tests continue to work in `azdo` |
| 46 | +- Verify `bedrock` release provess work |
| 47 | +- Verify the project can be opened in VS Code from the `cluster` folder |
| 48 | + |
| 49 | +#### Bedrock repo after changes |
| 50 | + |
| 51 | +`Bedrock` repo would look like below after implementing the above changes. |
| 52 | + |
| 53 | +``` |
| 54 | +├── .github |
| 55 | +├── gitops |
| 56 | +├── cluster |
| 57 | + ├── build |
| 58 | + ├── pipelines |
| 59 | + ├── azure-pipelines.yml |
| 60 | + ├── tools |
| 61 | + ├── docs |
| 62 | + ├── src |
| 63 | + ├── test |
| 64 | + ├── LICENSE |
| 65 | + ├── README.md |
| 66 | + ├── .gitignore |
| 67 | +
|
| 68 | +``` |
| 69 | + |
| 70 | +### SPK Repo Changes |
| 71 | + |
| 72 | +Making following changes in existing SPK repo minimizes the number of changes |
| 73 | +after the merge and limits the testing scope to SPK functioanlity. |
| 74 | + |
| 75 | +#### Current SPK repo |
| 76 | + |
| 77 | +``` |
| 78 | +├── .github |
| 79 | +├── azure-pipelines |
| 80 | + ├── templates |
| 81 | +├── docs |
| 82 | + ├── commands |
| 83 | +├── guides |
| 84 | +├── patches |
| 85 | +├── scripts |
| 86 | +├── src |
| 87 | +├── technical-docs |
| 88 | + ├── designs |
| 89 | +├── tests |
| 90 | +├── tools |
| 91 | +├── typings |
| 92 | + ├── ssh-url |
| 93 | +├── .editorconfig |
| 94 | +├── .env.example |
| 95 | +├── .gitignore |
| 96 | +├── CHANGELOG.md |
| 97 | +├── README.md |
| 98 | +├── azure-pipelines.yml |
| 99 | +├── jest.config.js |
| 100 | +├── package.json |
| 101 | +├── release-pipeline.yml |
| 102 | +├── smoke-test-pipeline.yml |
| 103 | +├── spk-config.yaml |
| 104 | +├── tsconfig.json |
| 105 | +├── tslint.json |
| 106 | +├── typings |
| 107 | +├── webpack.config.js |
| 108 | +├── .yarn.lock |
| 109 | +``` |
| 110 | + |
| 111 | +#### Themes |
| 112 | + |
| 113 | +The main themes are related to organizing `docs` and `build` related artifacts |
| 114 | +in `spk` from the root to appropriate directories. |
| 115 | + |
| 116 | +1. Organize all pipeline yaml files, scripts, and tools that are related to |
| 117 | + building and releasing binaries under `build` directory. |
| 118 | + |
| 119 | +2. Organize all docs that are related to using and contributing bedrock under |
| 120 | + `docs` directory. |
| 121 | + |
| 122 | +#### Proposed Changes |
| 123 | + |
| 124 | +The majority of the proposed changes in `spk` repo are related to organizing |
| 125 | +`docs` and `build` folders. |
| 126 | + |
| 127 | +- Move following files from the `root` to `build\pipelines` folder and make sure |
| 128 | + all pipelines continue to work. |
| 129 | + - azure-pipelines.yml |
| 130 | + - release-pipeline.yml |
| 131 | + - smoke-test-pipeline.yml |
| 132 | +- Move following files from the `scripts` to `build\publishing` folder and |
| 133 | + verify the scripts generate `command` docs. |
| 134 | + - generateDoc.ts |
| 135 | + - locateAliases.ts |
| 136 | +- Move `patches` directory to `build\patches` folder and make sure `yarn build` |
| 137 | + and `yarn test` continue to work. |
| 138 | +- Move `azure-pipelines\templates` folder to `build\pipelines\templates` folder |
| 139 | + and verify all pipelines continue to work. |
| 140 | +- Move `guides\contributing.md` file to `documents\contribution` folder |
| 141 | +- Move `guides` folder to `documents` folder |
| 142 | +- Move `technical-docs\designs` to `documents\contribution\designs` folder |
| 143 | +- Remove `.github\workflows` folder since it is not being used |
| 144 | + |
| 145 | +#### Testing |
| 146 | + |
| 147 | +After making the above changes, need to make sure that the follwing tests pass. |
| 148 | + |
| 149 | +- Verify cli build pipeline is working |
| 150 | +- Verify cli integration test pipeline is working |
| 151 | +- Verify cli release pipeline is working |
| 152 | +- Verify cli autogenerated docs are working on GitHub pages |
| 153 | +- Verify all docs links are working |
| 154 | + |
| 155 | +#### SPK repo after changes |
| 156 | + |
| 157 | +`spk` repo would look like below after implementing the above changes. |
| 158 | + |
| 159 | +``` |
| 160 | +├── build |
| 161 | + ├── pipelines |
| 162 | + ├── templates |
| 163 | + ├── azure-pipelines.yml |
| 164 | + ├── release-pipeline.yml |
| 165 | + ├── smoke-test-pipeline.yml |
| 166 | + ├── patches |
| 167 | + ├── 001-azure-devops-node.patch |
| 168 | + ├── publishing |
| 169 | + ├── generateDoc.ts |
| 170 | + ├── locateAliases.ts |
| 171 | + ├── tools |
| 172 | + ├── release-version-bump.sh |
| 173 | + ├── tag-release.sh |
| 174 | + ├── update_introspection.sh |
| 175 | +├── docs |
| 176 | + ├── commands |
| 177 | +├── documents |
| 178 | + ├── contribution |
| 179 | + ├── contributing.md |
| 180 | + ├── designs |
| 181 | + ├── guides |
| 182 | +├── src |
| 183 | + ├── lib |
| 184 | + ├── commands |
| 185 | + ├── logger |
| 186 | +├── tests |
| 187 | +├── typings |
| 188 | + ├── ssh-url |
| 189 | +├── .editorconfig |
| 190 | +├── .gitignore |
| 191 | +├── jest.config.js |
| 192 | +├── tsconfig.json |
| 193 | +├── tslint.json |
| 194 | +├── CHANGELOG.md |
| 195 | +├── README.md |
| 196 | +├── package.json |
| 197 | +├── webpack.config.js |
| 198 | +├── .yarn.lock |
| 199 | +``` |
| 200 | + |
| 201 | +### Phase 2: Move SPK to Bedrock Repo |
| 202 | + |
| 203 | +TODO |
| 204 | + |
| 205 | +### Phase 3: Create a side by side new repo for Bedrock Infra/Cluster terraform |
| 206 | + |
| 207 | +TODO |
0 commit comments