metadata

package
v0.31.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

README

Metadata

Metadata is written in YAML and JSON format during in, and can be provided to out via a YAML or JSON file.

The contents of this metadata (in YAML format) are as follows:


---
release:
  version: "v1.0.0"
  id: 12345
  release_type: All-In-One
  release_date: 1997-12-31
  eula_slug: "pivotal_beta_eula"
  description: |
    "wow this is a long description for this product"
  release_notes_url: http://example.com
  availability: Selected User Groups Only
  product_files:
  - id: 9283
  user_group_ids:
    - 8
    - 23
    - 42
  controlled: false
  eccn: "5D002"
  license_exception: "ENC Unrestricted"
  end_of_support_date: "2015-05-10"
  end_of_guidance_date: "2015-06-30"
  end_of_availability_date: "2015-07-04"
product_files:
- file: relative/path/to/some/product/file
  id: 9283
  upload_as: some human-readable name
  description: |
    some
    multi-line
    description
- file: another/relative/path/to/some/other/product/file
  id: 5432
  upload_as: some other human-readable name
  description: |
    some
    multi-line
    description
  file_type: "Software"
  docs_url: "http://foobar.com/readme.html"
  system_requirements: ["spinning platters", "das blinkenlights"]
  platforms: ["Linux"]
  included_files: ["Component 1", "Another component"]
file_groups:
- id: 2345
  name: "some file group"
  product_files:
  - id: 5432
dependency_specifiers:
- specifier: 1.8.*
  product_slug: some-product
- specifier: ~>1.9.1
  product_slug: some-product
- specifier: 2.3.4
  product_slug: some-product
upgrade_path_specifiers:
- specifier: 0.2.*
- specifier: ~>0.0.5
- specifier: 0.2.0-build.2050

Release

The top-level release key is required.

  • version: Required. Version of the new release.

    Note, if sorting by semantic version in the source config (i.e. sort_by: semver) then this version must be a valid semantic version.

    Also, if product_version is a regex in the source config then this version must conform to that regex.

    These constraints prevent inconsistencies that would occur when creating a new version of a resource that cannot be discovered by the check for that resource.

  • id: Optional. Written during in and ignored during out.

  • release_type: Required. See the official docs for the supported types.

    Note, if filtering by release_type in the source config then this release type must be the same.

    This is to prevent inconsistencies that would occur when creating a new version of a resource that cannot be discovered by the check for that resource.

  • eula_slug: Required. The EULA slug e.g. pivotal_software_eula.

    See the official docs for the supported values.

  • release_date: Optional. Release date in the form of: YYYY-MM-DD.

    If it is not present, the release date will be set to the current date.

  • description: Optional. Free-form description text. e.g.

    The description for this release.
    
    May contain line breaks.
    
  • release_notes_url: Optional. The release notes URL e.g. http://url.to/release/notes.

  • availability: Optional. Supported values are:

    • Admins Only
    • All Users
    • Selected User Groups Only
  • product_files: Optional. Written during in and ignored during out.

  • user_group_ids: Optional. Comma-separated list of user group IDs.

    Each user group in the list will be added to the release. Will be used only if the availability is set to Selected User Groups Only.

  • controlled: Optional. Boolean, defaults to false.

  • eccn: Optional. String.

  • license_exception:: Optional. String.

  • end_of_support_date: Optional. Date in the form of: YYYY-MM-DD.

  • end_of_guidance_date: Optional. Date in the form of: YYYY-MM-DD.

  • end_of_availability_date: Optional. Date in the form of: YYYY-MM-DD.

Product files

The top-level product_files key is optional. If provided, it is permitted to be an empty array.

Each element in product_files must have a non-empty value for the file key. All other keys are optional. The purpose of the keys is as follows:

  • file Required. Relative path to file. Must match exactly one file located via the out param file_glob, or the resource will exit with error.

  • description Optional. The file description (also known as File Notes in Pivotal Network).

  • upload_as Optional. The display name for the file in Pivotal Network. This affects only the display name; the filename of the uploaded file remains the same as that of the local file.

  • file_type Optional. The type of file. Must be one of Software, Documentation or Open Source License. If not specified, defaults to Software

  • docs_url Optional. A URL for documentation relevant to this file.

  • system_requirements Optional. Additional list of requirements for using this file. For example: JDK version or system resources such as memory or storage requirements.

  • platforms Optional. A list of platforms supported by this file. Valid values are: Android, AWS, Apt-Get, BOSH, Brew, CentOS, Chef, GVM, Generic, Google Compute Engine, iOS, Linux, MSI, Maven Repo, Microsoft Hyper-V, OS X, OVM, OpenStack, Oracle Linux, Pivotal CF, Puppet, RHEL, RedHat KVM, SLES, Solaris, Ubuntu, VHCS, VM, Virtual Appliance, Windows, Windows Server, Yum and vSphere.

  • included_files Optional. A list of files or components included with this file.

File Groups

The top-level file_groups key is written to during in but is not read from during out. Therefore it cannot be used to set file groups when creating or updating a release.

Dependency Specifiers

The top-level dependency_specifiers key is optional. If provided, it is permitted to be an empty array.

Each element in dependency_specifiers must have a non-empty value for both the specifier key and the product_slug key.

See supported specifier formats in the Pivnet API docs

Upgrade Path Specifiers

The top-level upgrade_path_specifiers key is optional. If provided, it is permitted to be an empty array.

Each element in upgrade_path_specifiers must have a non-empty value for the specifier key.

See supported specifier formats in the Pivnet API docs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency added in v0.16.0

type Dependency struct {
	Release DependentRelease `yaml:"release,omitempty"`
}

type DependencySpecifier added in v0.28.0

type DependencySpecifier struct {
	ID          int    `yaml:"id,omitempty"`
	Specifier   string `yaml:"specifier,omitempty"`
	ProductSlug string `yaml:"product_slug,omitempty"`
}

type DependentRelease added in v0.16.0

type DependentRelease struct {
	ID      int     `yaml:"id,omitempty"`
	Version string  `yaml:"version,omitempty"`
	Product Product `yaml:"product,omitempty"`
}

type FileGroup added in v0.27.0

type FileGroup struct {
	ID           int                    `yaml:"id,omitempty"`
	Name         string                 `yaml:"name,omitempty"`
	ProductFiles []FileGroupProductFile `yaml:"product_files,omitempty"`
}

type FileGroupProductFile added in v0.27.0

type FileGroupProductFile struct {
	ID int `yaml:"id,omitempty"`
}

type Metadata

type Metadata struct {
	Release               *Release               `yaml:"release,omitempty"`
	ProductFiles          []ProductFile          `yaml:"product_files,omitempty"`
	DependencySpecifiers  []DependencySpecifier  `yaml:"dependency_specifiers,omitempty"`
	UpgradePathSpecifiers []UpgradePathSpecifier `yaml:"upgrade_path_specifiers,omitempty"`
	FileGroups            []FileGroup            `yaml:"file_groups,omitempty"`

	// Deprecated
	Dependencies []Dependency  `yaml:"dependencies,omitempty"`
	UpgradePaths []UpgradePath `yaml:"upgrade_paths,omitempty"`
}

func (Metadata) Validate

func (m Metadata) Validate() ([]string, error)

type Product added in v0.16.0

type Product struct {
	ID   int    `yaml:"id,omitempty"`
	Slug string `yaml:"slug,omitempty"`
	Name string `yaml:"name,omitempty"`
}

type ProductFile

type ProductFile struct {
	File               string   `yaml:"file,omitempty"`
	Description        string   `yaml:"description,omitempty"`
	UploadAs           string   `yaml:"upload_as,omitempty"`
	AWSObjectKey       string   `yaml:"aws_object_key,omitempty"`
	FileType           string   `yaml:"file_type,omitempty"`
	FileVersion        string   `yaml:"file_version,omitempty"`
	SHA256             string   `yaml:"sha256,omitempty"`
	MD5                string   `yaml:"md5,omitempty"`
	ID                 int      `yaml:"id,omitempty"`
	Version            string   `yaml:"version,omitempty"`
	DocsURL            string   `yaml:"docs_url,omitempty"`
	SystemRequirements []string `yaml:"system_requirements,omitempty"`
	Platforms          []string `yaml:"platforms,omitempty"`
	IncludedFiles      []string `yaml:"included_files,omitempty"`
}

type Release added in v0.13.0

type Release struct {
	ID                    int                  `yaml:"id,omitempty"`
	Version               string               `yaml:"version"`
	ReleaseType           string               `yaml:"release_type"`
	EULASlug              string               `yaml:"eula_slug"`
	ReleaseDate           string               `yaml:"release_date"`
	Description           string               `yaml:"description"`
	ReleaseNotesURL       string               `yaml:"release_notes_url"`
	Availability          string               `yaml:"availability"`
	UserGroupIDs          []string             `yaml:"user_group_ids,omitempty"`
	Controlled            bool                 `yaml:"controlled"`
	ECCN                  string               `yaml:"eccn"`
	LicenseException      string               `yaml:"license_exception"`
	EndOfSupportDate      string               `yaml:"end_of_support_date"`
	EndOfGuidanceDate     string               `yaml:"end_of_guidance_date"`
	EndOfAvailabilityDate string               `yaml:"end_of_availability_date"`
	ProductFiles          []ReleaseProductFile `yaml:"product_files,omitempty"`
}

type ReleaseProductFile added in v0.27.0

type ReleaseProductFile struct {
	ID int `yaml:"id,omitempty"`
}

type UpgradePath added in v0.20.0

type UpgradePath struct {
	ID      int    `yaml:"id,omitempty"`
	Version string `yaml:"version,omitempty"`
}

type UpgradePathSpecifier added in v0.30.6

type UpgradePathSpecifier struct {
	ID        int    `yaml:"id,omitempty"`
	Specifier string `yaml:"specifier,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL