# H-8. Shared Services and the pipeline bootstrap

9 manual steps. The [rebuild guide](/wiki/rebuild/) explains the columns, the identities and the change-set commands.


| # | Action | Where | Identity | How | Why not code | Check |
| --- | --- | --- | --- | --- | --- | --- |
| H-8.1 | Shared Services as the StackSets delegated admin | master | MasterAdmin | `org-setup.sh delegate-stacksets apply` | no CloudFormation resource | S2-04 |
| H-8.2 | GitHub connection `hkb-github` (named by `HKB_GITHUB_CONNECTION_NAME`) | Shared Services | CT-Exec in the console | CodeConnections console: create, then complete the GitHub authorization handshake (ADR-0022) | the OAuth handshake is interactive | `shared-services.sh connection` shows AVAILABLE |
| H-8.3 | The catalog source, `hkb-pipeline-params` | Shared Services | CT-Exec | `shared-services.sh params-plan`, then `params-exec <cs>` | the pipeline reads it; it cannot create itself | S2-11 |
| H-8.4 | The pipeline foundation: key, artifact bucket, topic, roles (the site orchestrator since step 3.14, DQ-82, the tools orchestrator since TL.2; re-applied the same way whenever the foundation changes) | Shared Services | CT-Exec | `shared-services.sh foundation-plan`, then `foundation-exec <cs>` | the pipeline's own prerequisites | S2-01 |
| H-8.5 | `hkb-pipeline-params` again, now with the foundation's key | Shared Services | CT-Exec | as H-8.3 | see rebuild note 1 | S2-11 |
| H-8.6 | Confirm the SNS subscription email (pipeline notifications) | inbox | - | as H-6.4 | as H-6.4 | as H-6.4 |
| H-8.7 | The pipeline, created once with `hkb-pipeline-cfn-self` as its service role; it updates itself afterwards | Shared Services | CT-Exec | `shared-services.sh pipeline-plan`, then `pipeline-exec <cs>` | the self-updating pipeline cannot create itself | S2-02, S2-03 |
| H-8.8 | Start a run by hand after a self-update that changes a pipeline's structure (that run cancels itself), or when a merge's paths start no pipeline (DQ-101) | Shared Services | CT-Exec | `shared-services.sh release` (platform), `release site` or `release tools` | CodePipeline behaviour | S2-03 |
| H-8.9 | The tools pipeline's prerequisites (TL.2, DQ-127): the foundation gains `hkb-pipeline-tools-orchestrator`; `hkb-pipeline-tools` in Security joins the artifact key and bucket policies; `hkb-pipeline-cfn-self` may manage `hkb-pipeline-tools` and pass the tools roles; the failure alert covers it. **Before merging the PR that defines the pipeline** (rebuild note 5) | Shared Services | CT-Exec | as H-8.4; the change set adds one role and modifies the key, the bucket policy, the two rules, `hkb-pipeline-cfn-self` and nothing else | the pipeline's own prerequisites | after the merge, `shared-services.sh state tools` shows Source, Validate and Noop Succeeded |

