OCI image spec labels for policy-docker images 17/129717/1
authordanielhanrahan <daniel.hanrahan@est.tech>
Tue, 28 Jun 2022 16:39:32 +0000 (17:39 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Wed, 29 Jun 2022 09:24:51 +0000 (10:24 +0100)
Issue-ID: POLICY-4264
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I8ab51f82a441361b8aa6b5f9aa0b6917ceea5399

policy-db-migrator/pom.xml
policy-db-migrator/src/main/docker/Dockerfile
policy-jdk/alpine/pom.xml
policy-jdk/alpine/src/main/docker/Dockerfile
policy-jre/alpine/pom.xml
policy-jre/alpine/src/main/docker/Dockerfile
pom.xml

index 590e5a9..c135ae2 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2021 Nordix Foundation
+   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>
+            </plugin>
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
index 0fbbdb3..ccea887 100644 (file)
 FROM onap/policy-jdk-alpine:2.3.1
 
 LABEL maintainer="Policy Team"
+LABEL org.opencontainers.image.title="Policy db-migrator"
+LABEL org.opencontainers.image.description="Policy db-migrator image based on Alpine"
+LABEL org.opencontainers.image.url="https://github.com/onap/policy-docker"
+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}"
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
 ENV POLICY_ETC /opt/app/policy/etc
index 02aca4b..d5f1e3c 100644 (file)
@@ -2,6 +2,7 @@
   ============LICENSE_START=======================================================
    Copyright (C) 2019 Ericsson, Tieto. All rights reserved.
    Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+   Modifications Copyright (C) 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>
+            </plugin>
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
index ca4021b..69a0c39 100644 (file)
 FROM onap/integration-python:9.1.0
 
 LABEL maintainer="Policy Team"
+LABEL org.opencontainers.image.title="Policy JDK Alpine"
+LABEL org.opencontainers.image.description="Policy Java 11 JDK image based on Alpine"
+LABEL org.opencontainers.image.url="https://github.com/onap/policy-docker"
+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}"
 
 ENV POLICY_HOME=/opt/app/policy
 
index 575aecd..fb24df6 100644 (file)
@@ -2,6 +2,7 @@
   ============LICENSE_START=======================================================
    Copyright (C) 2019 Ericsson, Tieto. All rights reserved.
    Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+   Modifications Copyright (C) 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>
+            </plugin>
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
index 803cc17..0d28b22 100644 (file)
@@ -1,7 +1,7 @@
 #   ============LICENSE_START=======================================================
 #    Copyright (C) 2019 Tieto. All rights reserved.
 #    Modifications Copyright (C) 2020, 2021 AT&T Intellectual Property. All rights reserved.
-#    Modifications Copyright (C) 2020 Nordix Foundation.
+#    Modifications Copyright (C) 2020, 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.
 FROM onap/integration-java11:9.0.0
 
 LABEL maintainer="Policy Team"
+LABEL org.opencontainers.image.title="Policy JRE Alpine"
+LABEL org.opencontainers.image.description="Policy Java 11 JRE image based on Alpine"
+LABEL org.opencontainers.image.url="https://github.com/onap/policy-docker"
+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}"
 
 ENV POLICY_HOME=/opt/app/policy
 
diff --git a/pom.xml b/pom.xml
index 17d0560..23f0875 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
    Copyright (C) 2018 Ericsson, Tieto. All rights reserved.
    Modifications Copyright (C) 2020 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.
     <packaging>pom</packaging>
     <name>policy-docker</name>
 
+    <build>
+        <pluginManagement>
+            <plugins>
+                <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>
+            </plugins>
+        </pluginManagement>
+    </build>
+
     <profiles>
         <profile>
             <id>docker</id>