Part of #13
As a developer, I want OCI labels automatically added to my images so that I can trace builds back to source code and identify image metadata.
Following OCI Image Spec Annotations:
org.opencontainers.image.title
org.opencontainers.image.version
org.opencontainers.image.revision
org.opencontainers.image.source
org.opencontainers.image.created
org.opencontainers.image.authors
org.opencontainers.image.vendor
org.opencontainers.image.licenses
org.opencontainers.image.description
io.qrun.app.name
io.qrun.app.module
io.qrun.build.tool
qctl
io.qrun.build.version
In qrun.yaml:
qrun.yaml
package: labels: custom.label.one: "value1" custom.label.two: "value2" # Disable auto-labels autoLabels: false
# View labels after build docker inspect myapp:v1 --format '{{json .Config.Labels}}' | jq # Or with skopeo skopeo inspect docker://myapp:v1 | jq '.Labels'
OciLabels.java
LabelCollector.java
GitInfoProvider.java
PomInfoProvider.java
JibBuilder.java
OciLabels
LabelCollector
GitInfoProvider
PomInfoProvider
created
autoLabels: false
docker inspect
skopeo inspect
No dependencies set.
The note is not visible to the blocked user.
Part of #13
User Story
As a developer, I want OCI labels automatically added to my images so that I can trace builds back to source code and identify image metadata.
Design
Standard OCI Labels
Following OCI Image Spec Annotations:
org.opencontainers.image.titleorg.opencontainers.image.versionorg.opencontainers.image.revisionorg.opencontainers.image.sourceorg.opencontainers.image.createdorg.opencontainers.image.authorsorg.opencontainers.image.vendororg.opencontainers.image.licensesorg.opencontainers.image.descriptionQRun Custom Labels
io.qrun.app.nameio.qrun.app.moduleio.qrun.build.toolqctlio.qrun.build.versionConfiguration
In
qrun.yaml:Inspection
Files to Create/Modify
OciLabels.javaLabelCollector.javaGitInfoProvider.javaPomInfoProvider.javaJibBuilder.javaImplementation Tasks
OciLabelsenum with standard label namesLabelCollectorclassGitInfoProviderfor commit SHA and remote URLPomInfoProviderfor artifact metadatacreatedqrun.yamlautoLabels: falseto disableAcceptance Criteria
autoLabels: falsedisables auto-labelsdocker inspectskopeo inspect