Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define build time dependencies #181

Merged
merged 10 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/go/internal/spec/statik.go

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions test/packages/good/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
- name: ecs
reference: git@7a11f3e1f7d8f05e8f06623fd98254b8cb34c441
29 changes: 29 additions & 0 deletions versions/1/build.spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
##
## Describes the specification for the package's main manifest.yml file
##
spec:
# Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability
type: object
additionalProperties: false
properties:
dependencies:
type: array
description: Package dependencies
items:
type: object
additionalProperties: false
properties:
name:
type: string
description: Name of the dependency
enum:
- ecs
reference:
type: string
description: Source reference
pattern: 'git@[a-z0-9]{40}'
required:
- name
- reference
required:
- dependencies
5 changes: 4 additions & 1 deletion versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@
link: https://github.com/elastic/package-spec/pull/176
- description: Validate if field groups don't have units and metric types defined
type: enhancement
link: https://github.com/elastic/package-spec/pull/183
link: https://github.com/elastic/package-spec/pull/183
- description: Define build-time dependencies
type: enhancement
link: https://github.com/elastic/package-spec/pull/181
28 changes: 28 additions & 0 deletions versions/1/manifest.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,34 @@ spec:
pattern: '^(([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+\/[a-zA-Z0-9-]+))$'
required:
- github
build:
type: object
additionalProperties: false
properties:
dependencies:
type: array
description: Build-time dependencies
items:
type: object
additionalProperties: false
properties:
name:
type: string
description: Name of the dependency
enum:
- ecs
version:
type: string
description: Version of the dependency
reference:
type: string
description: Source reference
pattern: 'git@[a-z0-9]{40}'
required:
- name
- reference
required:
- dependencies
required:
- format_version
- name
Expand Down
5 changes: 5 additions & 0 deletions versions/1/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ spec:
name: "manifest.yml"
required: true
$ref: "./manifest.spec.yml"
- description: Package build manifest
type: file
contentMediaType: "application/x-yaml"
name: "build.yml"
$ref: "./build.spec.yml"
- description: The package's CHANGELOG file
type: file
contentMediaType: "application/x-yaml"
Expand Down