| 4079 | } |
| 4080 | |
| 4081 | static void k8s_patch_edge(cbm_pipeline_ctx_t *ctx, int64_t src, int64_t tgt, |
| 4082 | const k8s_patch_t *p) { |
| 4083 | if (src <= 0 || tgt <= 0 || src == tgt) { |
| 4084 | return; |
| 4085 | } |
| 4086 | char ek[CBM_SZ_2K]; |
| 4087 | char ep[CBM_SZ_2K]; |
| 4088 | cbm_json_escape(ek, (int)sizeof(ek), p->kust); |
| 4089 | cbm_json_escape(ep, (int)sizeof(ep), p->path ? p->path : "inline"); |
| 4090 | char props[CBM_SZ_4K + CBM_SZ_1K]; |
| 4091 | snprintf(props, sizeof(props), |
| 4092 | "{\"via\":\"patch\",\"kustomization\":\"%s\",\"patch\":\"%s\",\"line\":%d}", ek, ep, |
| 4093 | p->line); |
| 4094 | cbm_gbuf_insert_edge(ctx->gbuf, src, tgt, "OVERRIDE", props); |
| 4095 | } |
| 4096 | |
| 4097 | /* The build a patch acts in: its manifests, their Resources by name |
| 4098 | * (`names`: "Kind/name" -> ids, this build's only -- a repository-wide name |
no test coverage detected