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 all 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/_dev/build/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just approved the other PR but we have one more name here: dependency.

I assume the ecs dependency can only be used once, should we add it by name instead of array?

dependencies:
  ecs:
    reference: foo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced array with objects. I assume it's just to prevent custom dependencies that users may try to introduce and we don't want them now.

ecs:
reference: git@7a11f3e1f7d8f05e8f06623fd98254b8cb34c441
26 changes: 26 additions & 0 deletions versions/1/_dev/build/build.spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
##
## 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: object
description: Package dependencies
additionalProperties: false
properties:
ecs:
description: ECS dependency
type: object
additionalProperties: false
properties:
reference:
type: string
description: Source reference
pattern: 'git@[a-z0-9]{40}'
required:
- reference
required:
- dependencies
5 changes: 5 additions & 0 deletions versions/1/_dev/build/spec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
spec:
additionalContents: false
contents:
- description: Package build manifest
type: file
contentMediaType: "application/x-yaml"
name: "build.yml"
$ref: "./build.spec.yml"
- description: Folder containing resources related to docs.
type: folder
name: docs
Expand Down
5 changes: 4 additions & 1 deletion versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,7 @@
link: https://github.com/elastic/package-spec/pull/183
- description: Introduce "reference" property for fields
type: enhancement
link: https://github.com/elastic/package-spec/pull/179
link: https://github.com/elastic/package-spec/pull/179
- description: Define build-time dependencies
type: enhancement
link: https://github.com/elastic/package-spec/pull/181