============LICENSE_START=======================================================
Copyright (C) 2020 Bell Canada.
Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2022-2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<parent>
<groupId>org.onap.policy.models.sim</groupId>
<artifactId>models-sim-packages</artifactId>
- <version>2.7.0-SNAPSHOT</version>
+ <version>3.0.0-SNAPSHOT</version>
</parent>
<artifactId>models-simulator-docker</artifactId>
<docker.skip.push>false</docker.skip.push>
<docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
<docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+ <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir>
<maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
<!-- There is no code in this sub-module, only holds interfaces. So skip sonar. -->
<sonar.skip>true</sonar.skip>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goal>execute</goal>
</goals>
<configuration>
- <source>
- println 'Project version: ' + project.properties['dist.project.version']
- if (project.properties['dist.project.version'] != null) {
- def versionArray = project.properties['dist.project.version'].split('-')
- def minMaxVersionArray = versionArray[0].tokenize('.')
- if (project.properties['dist.project.version'].endsWith("-SNAPSHOT")) {
- project.properties['project.docker.latest.minmax.tag.version'] =
- minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-SNAPSHOT-latest"
- } else {
- project.properties['project.docker.latest.minmax.tag.version'] =
- minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-STAGING-latest"
- }
- println 'New tag for docker: ' + project.properties['project.docker.latest.minmax.tag.version']
- }
- </source>
+ <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
</configuration>
</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>
<name>onap/policy-models-simulator</name>
<build>
<cleanup>try</cleanup>
- <dockerFile>Dockerfile</dockerFile>
+ <dockerFile>${dockerFile}</dockerFile>
+ <contextDir>${docker.contextDir}</contextDir>
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>
<goal>build</goal>
<goal>push</goal>
</goals>
- <configuration>
- <image>onap/policy-models-simulator</image>
- </configuration>
</execution>
</executions>
</plugin>
<dependency>
<groupId>org.onap.policy.models.sim</groupId>
<artifactId>models-simulator-tarball</artifactId>
- <version>${project.version}</version>
+ <version>${project.version}</version>
<classifier>tarball</classifier>
<type>tar.gz</type>
</dependency>