Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 3 | |
| 4 | <modelVersion>4.0.0</modelVersion> |
| 5 | |
| 6 | <artifactId>sdc-os-chef</artifactId> |
| 7 | |
| 8 | <parent> |
| 9 | <groupId>org.openecomp.sdc</groupId> |
| 10 | <artifactId>sdc-main</artifactId> |
| 11 | <version>1.0.0-SNAPSHOT</version> |
| 12 | </parent> |
| 13 | |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 14 | |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 15 | <build> |
| 16 | <plugins> |
| 17 | <plugin> |
| 18 | <groupId>com.google.code.maven-replacer-plugin</groupId> |
| 19 | <artifactId>replacer</artifactId> |
| 20 | <version>1.5.3</version> |
| 21 | <executions> |
| 22 | <execution> |
| 23 | <phase>prepare-package</phase> |
| 24 | <goals> |
| 25 | <goal>replace</goal> |
| 26 | </goals> |
| 27 | </execution> |
| 28 | </executions> |
| 29 | |
| 30 | <configuration> |
| 31 | <basedir>${project.basedir}</basedir> |
| 32 | <includes> |
| 33 | <include>sdc-backend/Dockerfile</include> |
| 34 | <include>sdc-frontend/Dockerfile</include> |
| 35 | <include>scripts/docker_run.sh</include> |
| 36 | </includes> |
| 37 | <replacements> |
| 38 | <replacement> |
| 39 | <token>__SDC-RELEASE__</token> |
| 40 | <value>${project.version}</value> |
| 41 | </replacement> |
| 42 | </replacements> |
| 43 | </configuration> |
| 44 | </plugin> |
| 45 | </plugins> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 46 | </build> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 47 | |
| 48 | <profiles> |
| 49 | <profile> |
| 50 | <id>docker</id> |
| 51 | <build> |
| 52 | <plugins> |
| 53 | <plugin> |
| 54 | <artifactId>maven-resources-plugin</artifactId> |
| 55 | <version>3.0.2</version> |
| 56 | <executions> |
| 57 | <execution> |
| 58 | <id>copy-resources-be</id> |
| 59 | <!-- here the phase you need --> |
| 60 | <phase>validate</phase> |
| 61 | <goals> |
| 62 | <goal>copy-resources</goal> |
| 63 | </goals> |
| 64 | <configuration> |
| 65 | <outputDirectory>${basedir}/sdc-backend</outputDirectory> |
| 66 | <resources> |
| 67 | <resource> |
| 68 | <directory>${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target</directory> |
| 69 | <includes> |
| 70 | <include>onboarding-be-*.war</include> |
| 71 | </includes> |
| 72 | </resource> |
| 73 | </resources> |
| 74 | </configuration> |
| 75 | </execution> |
| 76 | <execution> |
| 77 | <id>copy-resources-fe</id> |
| 78 | <!-- here the phase you need --> |
| 79 | <phase>validate</phase> |
| 80 | <goals> |
| 81 | <goal>copy-resources</goal> |
| 82 | </goals> |
| 83 | <configuration> |
| 84 | <outputDirectory>${basedir}/sdc-frontend</outputDirectory> |
| 85 | <resources> |
| 86 | <resource> |
David Greenberg | 3d35bb3 | 2017-02-20 19:00:11 +0200 | [diff] [blame] | 87 | <directory>${project.parent.basedir}/openecomp-ui/target</directory> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 88 | <includes> |
David Greenberg | 3d35bb3 | 2017-02-20 19:00:11 +0200 | [diff] [blame] | 89 | <include>onboarding-fe-${project.version}.war</include> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 90 | </includes> |
| 91 | </resource> |
| 92 | </resources> |
| 93 | </configuration> |
| 94 | </execution> |
| 95 | </executions> |
| 96 | </plugin> |
| 97 | |
| 98 | |
| 99 | |
| 100 | <plugin> |
| 101 | <groupId>io.fabric8</groupId> |
| 102 | <artifactId>docker-maven-plugin</artifactId> |
Michael Lando | 9dc5709 | 2017-02-20 23:46:47 +0200 | [diff] [blame] | 103 | <version>0.19.1</version> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 104 | |
| 105 | <configuration> |
| 106 | <verbose>true</verbose> |
| 107 | <apiVersion>1.23</apiVersion> |
| 108 | |
| 109 | <images> |
| 110 | |
| 111 | <!-- Build backend image --> |
| 112 | <image> |
| 113 | <name>openecomp/sdc-backend:%l</name> |
| 114 | <alias>sdc-backend</alias> |
| 115 | <build> |
| 116 | <cleanup>try</cleanup> |
Michael Lando | 9dc5709 | 2017-02-20 23:46:47 +0200 | [diff] [blame] | 117 | <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 118 | </build> |
| 119 | </image> |
| 120 | |
| 121 | <!-- Build frontend image --> |
| 122 | <image> |
| 123 | <name>openecomp/sdc-frontend:%l</name> |
| 124 | <alias>sdc-frontend</alias> |
| 125 | <build> |
| 126 | <cleanup>try</cleanup> |
Michael Lando | 9dc5709 | 2017-02-20 23:46:47 +0200 | [diff] [blame] | 127 | <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 128 | </build> |
| 129 | </image> |
| 130 | |
| 131 | <!-- Build elastic search image --> |
| 132 | <image> |
| 133 | <name>openecomp/sdc-elasticsearch:%l</name> |
| 134 | <alias>sdc-elasticsearch</alias> |
| 135 | <build> |
| 136 | <cleanup>try</cleanup> |
Michael Lando | 9dc5709 | 2017-02-20 23:46:47 +0200 | [diff] [blame] | 137 | <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 138 | </build> |
| 139 | </image> |
| 140 | |
| 141 | <!-- Build kibana image --> |
| 142 | <image> |
| 143 | <name>openecomp/sdc-kibana:%l</name> |
| 144 | <alias>sdc-kibana</alias> |
| 145 | <build> |
| 146 | <cleanup>try</cleanup> |
Michael Lando | 9dc5709 | 2017-02-20 23:46:47 +0200 | [diff] [blame] | 147 | <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 148 | </build> |
| 149 | </image> |
| 150 | |
David Greenberg | 3d35bb3 | 2017-02-20 19:00:11 +0200 | [diff] [blame] | 151 | <!-- Build cassandra image --> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 152 | <image> |
| 153 | <name>openecomp/sdc-cassandra:%l</name> |
| 154 | <alias>sdc-cassandra</alias> |
| 155 | <build> |
| 156 | <cleanup>try</cleanup> |
Michael Lando | 9dc5709 | 2017-02-20 23:46:47 +0200 | [diff] [blame] | 157 | <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 158 | </build> |
| 159 | </image> |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 160 | |
| 161 | </images> |
| 162 | </configuration> |
| 163 | <executions> |
| 164 | <execution> |
| 165 | <id>clean-images</id> |
| 166 | <phase>pre-clean</phase> |
| 167 | <goals> |
| 168 | <goal>remove</goal> |
| 169 | </goals> |
| 170 | <configuration> |
| 171 | <removeAll>true</removeAll> |
| 172 | <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l</image> |
| 173 | </configuration> |
| 174 | </execution> |
| 175 | |
| 176 | <execution> |
| 177 | <id>generate-images</id> |
| 178 | <phase>package</phase> |
| 179 | <goals> |
| 180 | <goal>build</goal> |
| 181 | </goals> |
| 182 | </execution> |
| 183 | |
| 184 | <execution> |
| 185 | <id>push-images</id> |
| 186 | <phase>deploy</phase> |
| 187 | <goals> |
| 188 | <goal>build</goal> |
| 189 | <goal>push</goal> |
| 190 | </goals> |
| 191 | <configuration> |
| 192 | <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l</image> |
| 193 | </configuration> |
| 194 | </execution> |
| 195 | </executions> |
| 196 | |
| 197 | </plugin> |
| 198 | |
| 199 | </plugins> |
| 200 | </build> |
| 201 | </profile> |
| 202 | </profiles> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 203 | </project> |