Bill of Materials ================= The bill of materials (bom) is a list of artifacts produced by the build. ## Generating a new bom A new bill of materials is generated on each build and placed in `artifacts/bom.$(Version).xml`. In addition, this bill of materials can be produced without building the repo by running `build.ps1 -bom`. ## Configuration data :x: The bom SHOULD NOT contain data that is for configuration. Configuration data is any kind of parameter that a consumer needs to find the artifact. Examples of ephemeral data: - File paths - Download links - Passwords ## Format The bill of materials is an XML file. Here is a minimal example of a bom. ```xml ``` ### Elements #### `` Describes the build output. The root element of the document. Optional attributes: - `Id` - a unique identifier describing this build. - `Created` - a timestamp of when the build was created. #### `` Describes a group of artifacts Optional attributes: - `Category` - an arbitrary category name. #### `` Describes a file produced by the build. Required attributes: - `Id` - the file name of the artifact. Id MUST BE unique per each bill of materials. - `Type` - an arbitrary string describing the semantic type of the artifact. Optional attributes: - Others - any other attributes on the element are considered metadata values about the artifact. #### `` Describes artifact dependencies. #### `` Describes a dependency between two artifacts. Requried attributes - `Source` - the artifact that has a dependency. This artifact MUST BE defined by an `` in the same `` - `Target` - the thing it depends on. This artifact MAY OR MAY NOT be described in this ``. It might have been produced in a previous build or be produced by a partner team. ## Artifact types These are some common artifact types produced by the build. - NuGetPackage - NuGetSymbolsPackage - DebianPackage - RedhatPackage - ZipArchive - TarGzArchive - TextFile - LzmaArchive - TestBundle ## Artifact categories Tools may use the category information to define how they handle different files. These are common categories for artifacts used in aspnet/Universe. - ship - used for files that will be published to NuGet.org, microsoft.com, or other official publication locations - shipoob - used for files that will be distributed in other mechanism. - noship - these files should not be published to partner teams or released publically. This may include test artifacts. ## A more complete example ```xml ``` ### Example usage: signing In the example above, some of the `` items were marked `ShouldBeSigned="true"`. Our signing tool could use this as a way to determine which files should be passed on to signing. ### Example usage: metadata In the example above, some of the artifacts could contain data like FileHash, CommitHash, RepositoryUrl, BranchName, and others. It is up to the consumer of the bom to define how to interpret and use this.