OCI image spec labels for clamp backend 12/129712/1
authordanielhanrahan <daniel.hanrahan@est.tech>
Tue, 28 Jun 2022 15:04:58 +0000 (16:04 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Tue, 28 Jun 2022 15:04:58 +0000 (16:04 +0100)
Issue-ID: POLICY-4259
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ic99842c14f26af5c58ff7000c13a1a5d19077869

runtime/pom.xml
runtime/src/main/docker/backend/Dockerfile
runtime/src/main/docker/backend/suse.Dockerfile

index 7e3d7b2..606d1be 100644 (file)
@@ -4,7 +4,7 @@
   ONAP POLICY-CLAMP
   ================================================================================
   Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2021 Nordix Foundation.
+  Modifications Copyright (C) 2021-2022 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
                     </execution>
                 </executions>
             </plugin>
+
+            <plugin>
+                <groupId>io.github.git-commit-id</groupId>
+                <artifactId>git-commit-id-maven-plugin</artifactId>
+                <version>5.0.0</version>
+                <executions>
+                    <execution>
+                        <id>get-the-git-infos</id>
+                        <goals>
+                            <goal>revision</goal>
+                        </goals>
+                        <phase>initialize</phase>
+                    </execution>
+                </executions>
+                <configuration>
+                    <skipPoms>false</skipPoms>
+                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
+                    <includeOnlyProperties>
+                        <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
+                        <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
+                    </includeOnlyProperties>
+                    <commitIdGenerationMode>full</commitIdGenerationMode>
+                </configuration>
+            </plugin>
+
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
index bb96415..7bb3357 100644 (file)
@@ -2,8 +2,8 @@
 # ============LICENSE_START=======================================================\r
 # ONAP CLAMP\r
 # ================================================================================\r
-# Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights\r
-#                             reserved.\r
+# Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights reserved.\r
+# Modifications Copyright (C) 2022 Nordix Foundation.\r
 # ================================================================================\r
 # Licensed under the Apache License, Version 2.0 (the "License");\r
 # you may not use this file except in compliance with the License.\r
 \r
 FROM onap/integration-java11:8.0.0\r
 \r
-MAINTAINER "The Onap Team"\r
+LABEL maintainer="Policy Team"\r
 LABEL Description="This image contains alpine, openjdk 11 and policy clamp"\r
+LABEL org.opencontainers.image.title="Policy CLAMP runtime"\r
+LABEL org.opencontainers.image.description="Policy CLAMP runtime image based on Alpine"\r
+LABEL org.opencontainers.image.url="https://github.com/onap/policy-clamp"\r
+LABEL org.opencontainers.image.vendor="ONAP Policy Team"\r
+LABEL org.opencontainers.image.licenses="Apache-2.0"\r
+LABEL org.opencontainers.image.created="${git.build.time}"\r
+LABEL org.opencontainers.image.version="${git.build.version}"\r
+LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"\r
 \r
 ARG http_proxy\r
 ARG https_proxy\r
index 9ab5424..704dfa3 100644 (file)
 
 FROM opensuse/leap:15.3
 
-MAINTAINER "The Onap Team"
+LABEL maintainer="Policy Team"
 LABEL Description="This image contains opensuse, openjdk 11 and policy clamp"
+LABEL org.opencontainers.image.title="Policy CLAMP runtime"
+LABEL org.opencontainers.image.description="Policy CLAMP runtime image based on OpenSuse"
+LABEL org.opencontainers.image.url="https://github.com/onap/policy-clamp"
+LABEL org.opencontainers.image.vendor="ONAP Policy Team"
+LABEL org.opencontainers.image.licenses="Apache-2.0"
+LABEL org.opencontainers.image.created="${git.build.time}"
+LABEL org.opencontainers.image.version="${git.build.version}"
+LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
 
 ARG http_proxy
 ARG https_proxy