github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/docs/3-create-a-jackal-package/5-package-create-lifecycle.md (about) 1 # Package Create Lifecycle 2 3 The following diagram shows the order of operations for the `jackal package create` command and the hook locations for [actions](../../examples/component-actions/README.md). 4 5 ## `jackal package create` 6 7 ```mermaid 8 graph TD 9 A1(cd to directory with jackal.yaml)-->A2 10 A2(load jackal.yaml into memory)-->A3 11 A3(set package architecture if not provided)-->A4 12 A4(filter components by architecture and flavor)-->A5 13 A5(migrate deprecated component configs)-->A6 14 A6(parse component imports)-->A7 15 A7(process create-time variables)-->A8 16 A8(process extensions)-->A9 17 A9(remove duplicate images/repos if --differential flag used)-->A10 18 A10(run validations)-->A11 19 A11(confirm package create):::prompt-->A12 20 21 subgraph 22 A12(run each '.actions.onCreate.before'):::action-->A13(load '.charts') 23 A13-->A14(load '.files') 24 A14-->A15(load '.dataInjections') 25 A15-->A16(load '.manifests') 26 A16-->A17(load '.repos') 27 A17-->A18(run each '.actions.onCreate.after'):::action 28 A18-->A19{Success?} 29 A19-->|Yes|A20(run each\n'.actions.onCreate.success'):::action 30 A19-->|No|A999 31 end 32 33 A20-->A21(load all '.images') 34 A21-->A22(generate SBOMs unless --skip-sbom flag was used) 35 A22-->A23(cd back to original working directory) 36 A23-->A24(archive components into tarballs) 37 A24-->A25(generate checksums for all package files) 38 A25-->A26(record package build metadata) 39 A26-->A27(write the jackal.yaml to disk) 40 A27-->A28(sign the package if a key was provided) 41 A28-->A29{Output to OCI?} 42 A29-->|Yes|A30(publish package to OCI registry) 43 A29-->|No|A31(archive package into a tarball and write to disk) 44 A30-->A32 45 A31-->A32 46 A32(write SBOM files to disk if --sbom or --sbom-out flags used)-->A33 47 A33(view SBOMs if --sbom flag used)-->A34 48 A34[Jackal Package Create Successful]:::success 49 50 A999[Abort]:::fail 51 52 classDef prompt fill:#4adede,color:#000000 53 classDef action fill:#bd93f9,color:#000000 54 classDef fail fill:#aa0000 55 classDef success fill:#008000,color:#fff; 56 ```