diff options
author | lizi <li.zi30@zte.com.cn> | 2017-10-13 12:52:13 +0800 |
---|---|---|
committer | lizi <li.zi30@zte.com.cn> | 2017-10-13 12:52:13 +0800 |
commit | cb12c129a25a3aac6a3896f3c0c8f6d34df7c082 (patch) | |
tree | e4d7b893fddf6501148917b655643162f9c584a5 | |
parent | 17767843a7874a4d2748ad1c097369432b5524c2 (diff) |
Add staging version.
Change-Id: I0e600737789de31e4d7743cad2577f6a757a0ca3
Issue-ID: AAI-432
Signed-off-by: lizi <li.zi30@zte.com.cn>
-rw-r--r-- | esr-mgr/dependency-reduced-pom.xml | 61 | ||||
-rw-r--r-- | standalone/pom.xml | 122 | ||||
-rw-r--r-- | standalone/src/main/assembly/conf/extsys.yml | 2 |
3 files changed, 96 insertions, 89 deletions
diff --git a/esr-mgr/dependency-reduced-pom.xml b/esr-mgr/dependency-reduced-pom.xml index 4407846..481d79b 100644 --- a/esr-mgr/dependency-reduced-pom.xml +++ b/esr-mgr/dependency-reduced-pom.xml @@ -100,6 +100,67 @@ </plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>swagger</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.kongchen</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>3.1.1</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-hibernate-validations</artifactId>
+ <version>1.5.6</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <apiSources>
+ <apiSource>
+ <springmvc>false</springmvc>
+ <locations>org.onap.aai.esr.resource</locations>
+ <basePath>/api/aai-esr-server/v1/</basePath>
+ <info>
+ <title>API Descriptions for External System Management</title>
+ <version>v1</version>
+ <description>This page shows all the APIs available in the ESR server module.</description>
+ <termsOfService>http://www.github.com/kongchen/swagger-maven-plugin</termsOfService>
+ <contact>
+ <email>li.zi30@zte.com.cn</email>
+ <name>Zi Li</name>
+ </contact>
+ <license>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
+ <name>Apache 2.0</name>
+ </license>
+ </info>
+ <securityDefinitions />
+ <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
+ </apiSource>
+ </apiSources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-jersey2-jaxrs</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/standalone/pom.xml b/standalone/pom.xml index f9d5e58..2736e71 100644 --- a/standalone/pom.xml +++ b/standalone/pom.xml @@ -35,12 +35,8 @@ <linux64outputdir>target/assembly/${linux64id}</linux64outputdir> <win64outputdir>target/assembly/${win64id}</win64outputdir> <version.output>target/version</version.output> - <docker.image.name>onap/aai/esr-server</docker.image.name> - <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format> - <docker.push.registry></docker.push.registry> - <skip.docker.build>true</skip.docker.build> - <skip.docker.tag>true</skip.docker.tag> - <skip.docker.push>true</skip.docker.push> + <aai.esr.server.project.version>${project.version}</aai.esr.server.project.version> + <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format> </properties> <build> <plugins> @@ -191,10 +187,36 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + println project.properties['aai.esr.server.project.version']; + def versionArray; + if ( project.properties['aai.esr.server.project.version'] != null ) { + versionArray = project.properties['aai.esr.server.project.version'].split('-'); + } + + project.properties['project.docker.latesttag.version']=versionArray[0] + "-STAGING-latest"; + + println 'New Tag for docker:' + + project.properties['project.docker.latesttag.version']; + </source> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> - <!--<profiles> + <profiles> <profile> <id>docker</id> <build> @@ -213,7 +235,9 @@ <dockerFileDir>${basedir}/target/version/</dockerFileDir> <dockerFile>${basedir}/target/version/Dockerfile</dockerFile> <tags> - <tag>${project.version}-STAGING-latest</tag> + <tag>${project.version}</tag> + <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> + <tag>${project.docker.latesttag.version}</tag> </tags> </build> </image> @@ -241,86 +265,8 @@ </plugins> </build> </profile> - </profiles> --> - <profiles> - <profile> - <id>docker</id> - <build> - <plugins> - <plugin> - <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.4.11</version> - <inherited>false</inherited> - <configuration> - <images> - <image> - <imageName>onap/aai/esr-server</imageName> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/version/</dockerFileDir> - <dockerFile>${basedir}/target/version/Dockerfile</dockerFile> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>build-image</id> - <phase>package</phase> - <goals> - <goal>build</goal> - </goals> - <configuration> - <skipDockerBuild>${skip.docker.build}</skipDockerBuild> - </configuration> - </execution> - <execution> - <id>tag-image-timestamped-version</id> - <phase>deploy</phase> - <goals> - <goal>tag</goal> - </goals> - <configuration> - <image>${docker.image.name}</image> - <newName>${docker.push.registry}/${docker.image.name}:${project.version}-${maven.build.timestamp}</newName> - <pushImage>${skip.docker.push}</pushImage> - <skipDockerTag>${skip.docker.tag}</skipDockerTag> - </configuration> - </execution> - <execution> - <id>tag-image-project-version</id> - <phase>deploy</phase> - <goals> - <goal>tag</goal> - </goals> - <configuration> - <image>${docker.image.name}</image> - <newName>${docker.push.registry}/${docker.image.name}:${project.version}</newName> - <pushImage>${skip.docker.push}</pushImage> - <skipDockerTag>${skip.docker.tag}</skipDockerTag> - </configuration> - </execution> - <execution> - <id>tag-image-latest-version</id> - <phase>deploy</phase> - <goals> - <goal>tag</goal> - </goals> - <configuration> - <image>${docker.image.name}</image> - <newName>${docker.push.registry}/${docker.image.name}:latest</newName> - <pushImage>${skip.docker.push}</pushImage> - <skipDockerTag>${skip.docker.tag}</skipDockerTag> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - + </profiles> + <dependencies> <dependency> <groupId>org.onap.aai.esr-server</groupId> diff --git a/standalone/src/main/assembly/conf/extsys.yml b/standalone/src/main/assembly/conf/extsys.yml index dc67e25..af28302 100644 --- a/standalone/src/main/assembly/conf/extsys.yml +++ b/standalone/src/main/assembly/conf/extsys.yml @@ -18,7 +18,7 @@ template: Hello, %s! #defaultName: ${DW_DEFAULT_NAME:-Stranger} # the micro service ip -serviceIp: +serviceIp: 127.0.0.1 msbDiscoveryIp: 10.74.148.80 msbDiscoveryPort: 10081 msbServerAddr: http://10.74.148.80:80 |