Skip to content

Commit

Permalink
Combine logs breakout and integrity protection into one version and s…
Browse files Browse the repository at this point in the history
…tep ArtC
  • Loading branch information
m-linner-ericsson committed Aug 9, 2024
1 parent 49e7875 commit 1c11939
Show file tree
Hide file tree
Showing 12 changed files with 616 additions and 58 deletions.
30 changes: 29 additions & 1 deletion definitions/EiffelActivityFinishedEvent/4.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,35 @@ properties:
required:
- conclusion
persistentLogs:
$ref: ../EiffelPersistentLogs/1.0.0.yml
_description: An array of persistent log files generated during
execution.
type: array
items:
type: object
properties:
mediaType:
_description: The [media type](https://en.wikipedia.org/wiki/Media_type)
of the URI's payload. Can be used to differentiate
between various representations of the same log, e.g.
text/html for human consumption and text/plain or application/json
for the machine-readable form.
type: string
name:
_description: The name of the log file.
type: string
tags:
_description: Arbitrary tags and keywords that describe
this log.
type: array
items:
type: string
uri:
_description: The URI at which the log can be retrieved.
type: string
required:
- name
- uri
additionalProperties: false
customData:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion definitions/EiffelActivityFinishedEvent/4.1.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ properties:
required:
- conclusion
persistentLogs:
$ref: ../EiffelPersistentLogs/1.1.0.yml
$ref: ../EiffelPersistentLogs/1.0.0.yml
customData:
type: array
items:
Expand Down
29 changes: 28 additions & 1 deletion definitions/EiffelArtifactCreatedEvent/4.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,34 @@ properties:
items:
type: string
integrityProtection:
$ref: ../EiffelIntegrityProtection/1.0.0.yml
_description: An optional object containing a digest of
the file's contents, i.e. a checksum, computed using
the specified algorithm.
type: object
properties:
alg:
_description: The cryptographic algorithm used to compute
the digest of the file's contents.
_format: One of the hash algorithms listed in section 1 of
[NIST FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf),
excluding "SHA-1".
type: string
enum:
- SHA-224
- SHA-256
- SHA-384
- SHA-512
- SHA-512/224
- SHA-512/256
digest:
_description: The digest of the file contents.
_format: A lowercase string of hexadecimal digits.
type: string
pattern: ^[0-9a-f]+$
required:
- alg
- digest
additionalProperties: false
required:
- name
additionalProperties: false
Expand Down
227 changes: 227 additions & 0 deletions definitions/EiffelArtifactCreatedEvent/4.0.1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
# Copyright 2017-2024 Ericsson AB and others.
# For a full list of individual contributors, please see the commit history.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
$schema: https://json-schema.org/draft/2020-12/schema#
_name: EiffelArtifactCreatedEvent
_version: 4.0.1
_abbrev: ArtC
_description: The EiffelArtifactCreatedEvent declares that a software
artifact has been created, what its coordinates are, what it contains
and how it was created.
type: object
properties:
meta:
$ref: ../EiffelMetaProperty/4.0.0.yml
data:
type: object
properties:
identity:
_description: The identity of the created artifact, in [purl
format](https://github.com/package-url/purl-spec).
_format: '[purl specification](https://github.com/package-url/purl-spec)'
type: string
pattern: '^pkg:'
fileInformation:
_description: A list of the artifact file contents. This information
is optional and, when included, MAY include a complete or
incomplete list of contents. In other words, it may be used
to highlight only particular files of interest, such as launcher
binaries or other entry-points.
type: array
items:
type: object
properties:
name:
_description: The name (including relative path from
the root of the artifact) on syntax appropriate for
the artifact packaging type.
type: string
tags:
_description: Any tags associated with the file, to support
navigation and identification of items of interest.
type: array
items:
type: string
integrityProtection:
$ref: ../EiffelIntegrityProtection/1.0.0.yml
required:
- name
additionalProperties: false
buildCommand:
_description: The command used to build the artifact within
the identified environment. Used for reproducability purposes.
type: string
requiresImplementation:
_description: |-
Defines whether this artifact requires an implementing artifact. This is typically used for interfaces requiring some backend implementation, although the interface does not presume to define _which_ implementation. Implicitly interpreted as "ANY" if undefined.
NONE signifies that there SHALL no implementations of this artifact. In other words, a composition containing another artifact identifying it in __data.implements__ would be illegal.
ANY signifies that there may or may not be implementations of this artifact.
EXACTLY_ONE signifies that a legal composition must contain one and only one implementation of this artifact.
AT_LEAST_ONE signifies that a legal composition must contain one or more implementations of this artifact.
type: string
enum:
- NONE
- ANY
- EXACTLY_ONE
- AT_LEAST_ONE
dependsOn:
_description: An array of [purl identified](https://github.com/package-url/purl-spec)
entities this artifact depends on. While not included in
the purl specification itself, the Eiffel protocol allows
version range notation according to [Maven syntax](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402)
to be used for the version component of the package identity.
Note that the purl specification always requires the version
component to be percent-encoded.
_format: '[purl specification](https://github.com/package-url/purl-spec)'
type: array
items:
type: string
pattern: '^pkg:'
implements:
_description: An array of [purl identified](https://github.com/package-url/purl-spec)
entities this artifact implements. The typical use case of
this is to identify interfaces implemented by this artifact.
While not included in the purl specification itself, the
Eiffel protocol allows version range notation according to
[Maven syntax](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402)
to be used for the version component of the package identity.
Note that the purl specification always requires the version
component to be percent-encoded.
_format: '[purl specification](https://github.com/package-url/purl-spec)'
type: array
items:
type: string
pattern: '^pkg:'
name:
_description: Any (colloquial) name of the artifact. Unlike
__data.identity__, this is not intended as an unambiguous
identifier of the artifact, but as a descriptive and human
readable name.
type: string
customData:
type: array
items:
$ref: ../EiffelCustomDataProperty/2.0.0.yml
required:
- identity
additionalProperties: false
links:
type: array
items:
$ref: ../EiffelEventLink/2.0.0.yml
required:
- meta
- data
- links
additionalProperties: false
_links:
CAUSE:
description: 'Identifies a cause of the event occurring. SHOULD
not be used in conjunction with __CONTEXT__: individual events
providing __CAUSE__ within a larger context gives rise to ambiguity.
It is instead recommended to let the root event of the context
declare __CAUSE__.'
required: false
multiple: true
targets:
any_type: true
types: []
COMPOSITION:
description: Identifies the composition from which this artifact
was built.
required: false
multiple: false
targets:
any_type: false
types:
- EiffelCompositionDefinedEvent
CONTEXT:
description: Identifies the activity or test suite of which this
event constitutes a part.
required: false
multiple: false
targets:
any_type: false
types:
- EiffelActivityTriggeredEvent
- EiffelTestSuiteStartedEvent
ENVIRONMENT:
description: Identifies the environment in which this artifact
was built.
required: false
multiple: false
targets:
any_type: false
types:
- EiffelEnvironmentDefinedEvent
FLOW_CONTEXT:
description: 'Identifies the flow context of the event: which is
the continuous integration and delivery flow in which this occurred
– e.g. which product, project, track or version this is applicable
to.'
required: false
multiple: true
targets:
any_type: false
types:
- EiffelFlowContextDefinedEvent
PREVIOUS_VERSION:
description: Identifies a latest previous version (there may be
more than one in case of merges) of the artifact the event represents.
required: false
multiple: true
targets:
any_type: false
types:
- EiffelArtifactCreatedEvent
_history:
- version: 4.0.1
changes: Use common fragment for Integrity Protection.
- version: 4.0.0
changes: Update meta schema to Draft 2020-12 and add link validation.
- version: 3.3.0
introduced_in: edition-arica
changes: Added data.fileInformation.integrityProtection member (see [Issue 290](https://github.com/eiffel-community/eiffel/issues/290)).
- version: 3.2.0
introduced_in: edition-arica
changes: Add schema URL to the meta object (see [Issue 280](https://github.com/eiffel-community/eiffel/issues/280)).
- version: 3.1.0
introduced_in: edition-lyon
changes: Add links.domainId member (see [Issue 233](https://github.com/eiffel-community/eiffel/issues/233)).
- version: 3.0.0
introduced_in: edition-agen
changes: Improved information integrity protection (see [Issue
185](https://github.com/eiffel-community/eiffel/issues/185)).
- version: 2.0.0
introduced_in: edition-agen
changes: Introduced purl identifiers instead of GAVs (see [Issue
182](https://github.com/eiffel-community/eiffel/issues/182))
- version: 1.1.0
introduced_in: edition-toulouse
changes: Multiple links of type FLOW_CONTEXT allowed.
- version: 1.0.0
introduced_in: edition-bordeaux
changes: Initial version.
_examples:
- title: Simple example
url: ../examples/events/EiffelArtifactCreatedEvent/simple.json
- title: Interface example
url: ../examples/events/EiffelArtifactCreatedEvent/interface.json
- title: Backend example
url: ../examples/events/EiffelArtifactCreatedEvent/backend.json
- title: Dependent example
url: ../examples/events/EiffelArtifactCreatedEvent/dependent.json
- title: Checksum example
url: ../examples/events/EiffelArtifactCreatedEvent/checksum.json
3 changes: 2 additions & 1 deletion definitions/EiffelPersistentLogs/1.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ items:
uri:
_description: The URI at which the log can be retrieved.
type: string
integrityProtection:
$ref: ../EiffelIntegrityProtection/1.0.0.yml
required:
- name
- uri
additionalProperties: false

49 changes: 0 additions & 49 deletions definitions/EiffelPersistentLogs/1.1.0.yml

This file was deleted.

Loading

0 comments on commit 1c11939

Please sign in to comment.