Gary Wu | d04e440 | 2017-07-28 12:26:54 -0700 | [diff] [blame] | 1 | #!/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 | |
| 19 | if [ -z "$1" ]; then |
| 20 | BUILD="snapshots" |
| 21 | else |
| 22 | BUILD=$1 |
| 23 | fi |
| 24 | |
| 25 | VERSION="1.1.0-SNAPSHOT" |
| 26 | |
| 27 | # docker root dir |
| 28 | ROOT=`git rev-parse --show-toplevel`/test/csit/docker |
| 29 | |
| 30 | cd $ROOT |
| 31 | for dirsrc in `$ROOT/scripts/ls-microservices.py | sort`; do |
| 32 | $ROOT/scripts/gen-dockerfiles.sh $dirsrc $BUILD & |
| 33 | done |
| 34 | wait |
| 35 | |
| 36 | |
| 37 | mkdir -p $ROOT/target |
| 38 | cat > $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> |
| 56 | EOF |
| 57 | for dirsrc in `$ROOT/scripts/ls-microservices.py | sort`; do |
| 58 | cat >> $ROOT/target/pom.xml <<EOF |
| 59 | <module>../${dirsrc}/target</module> |
| 60 | EOF |
| 61 | done |
| 62 | cat >> $ROOT/target/pom.xml <<EOF |
| 63 | </modules> |
| 64 | </project> |
| 65 | EOF |