blob: 531eb3041d73998a354bb05f0f2ef2b4fda7163e [file] [log] [blame]
Gary Wud04e4402017-07-28 12:26:54 -07001#!/bin/bash
2#
3# Copyright 2016-2017 Huawei Technologies Co., Ltd.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# $1 autorelease build
18
19if [ -z "$1" ]; then
20 BUILD="snapshots"
21else
22 BUILD=$1
23fi
24
25VERSION="1.1.0-SNAPSHOT"
26
27# docker root dir
28ROOT=`git rev-parse --show-toplevel`/test/csit/docker
29
30cd $ROOT
31for dirsrc in `$ROOT/scripts/ls-microservices.py | sort`; do
32 $ROOT/scripts/gen-dockerfiles.sh $dirsrc $BUILD &
33done
34wait
35
36
37mkdir -p $ROOT/target
38cat > $ROOT/target/pom.xml <<EOF
39<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
40 <modelVersion>4.0.0</modelVersion>
41 <groupId>org.openo.integration.docker</groupId>
42 <artifactId>docker-root</artifactId>
43 <version>${VERSION}</version>
44 <packaging>pom</packaging>
45 <build>
46 <plugins>
47 <plugin>
48 <groupId>io.fabric8</groupId>
49 <artifactId>docker-maven-plugin</artifactId>
50 <version>0.19.0</version>
51 <extensions>true</extensions>
52 </plugin>
53 </plugins>
54 </build>
55 <modules>
56EOF
57for dirsrc in `$ROOT/scripts/ls-microservices.py | sort`; do
58cat >> $ROOT/target/pom.xml <<EOF
59 <module>../${dirsrc}/target</module>
60EOF
61done
62cat >> $ROOT/target/pom.xml <<EOF
63 </modules>
64</project>
65EOF