aboutsummaryrefslogtreecommitdiffstats
path: root/cucumber-js-test-apis-ci/pom.xml
blob: b434408c1a8984be652bcaaeb628e0449a9cfd8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?xml version="1.0"?>
<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.openecomp.sdc</groupId>
    <artifactId>sdc-main</artifactId>
    <version>1.6.0-SNAPSHOT</version>
  </parent>
  <artifactId>cucumber-bdd</artifactId>
  <name>cucumber-bdd</name>
  <version>1.6.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.6.1</version>
        <executions>
          <execution>
            <id>clean.dist.folder</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}/node_modules</directory>
                  <includes>
                    <include>**/*</include>
                  </includes>
                </fileset>
                <fileset>
                  <directory>${basedir}/report</directory>
                  <includes>
                    <include>**/*</include>
                  </includes>
                </fileset>
                <fileset>
                  <directory>${basedir}/resources/downloads</directory>
                  <includes>
                    <include>**/*</include>
                  </includes>
                </fileset>
                <fileset>
                  <directory>${basedir}/docs</directory>
                  <includes>
                    <include>**/*</include>
                  </includes>
                </fileset>
                <fileset>
                  <directory>${basedir}</directory>
                  <includes>
                    <include>jenkinsConfig.json</include>
                  </includes>
                </fileset>
              </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.7</version>
        <configuration>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>

        <configuration>
          <installDirectory>${project.parent.parent.basedir}</installDirectory>
        </configuration>

        <executions>
          <execution>
            <id>install node and npm</id>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <nodeVersion>v10.17.0</nodeVersion>
              <npmVersion>6.11.3</npmVersion>
            </configuration>
          </execution>
          <execution>
            <id>npm run install</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>install</arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>${basedir}/docker</directory>
        <targetPath>${project.build.directory}/docker_assembly</targetPath>
        <filtering>false</filtering>
      </resource>
    </resources>
  </build>
  <profiles>
    <profile>
      <id>dev</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>create-reporting-folders</id>
                <phase>initialize</phase>
                <configuration>
                  <tasks>
                    <echo message="Generate reports and downloads folders"/>
                    <mkdir dir="${basedir}/report"/>
                    <mkdir dir="${basedir}/resources/downloads"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>

            <configuration>
              <workingDirectory>${project.basedir}</workingDirectory>
              <installDirectory>${project.parent.parent.basedir}</installDirectory>
            </configuration>

            <executions>

              <execution>
                <id>npm run install</id>
                <goals>
                  <goal>npm</goal>
                </goals>
                <configuration>
                  <arguments>install</arguments>
                </configuration>
              </execution>

              <execution>
                <id>npm run cucumber test</id>
                <goals>
                  <goal>npm</goal>
                </goals>
                <configuration>
                  <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
                  <arguments>run test-and-report</arguments>
                </configuration>
                <phase>test</phase>
              </execution>

              <execution>
                <id>npm run documentation</id>
                <goals>
                  <goal>npm</goal>
                </goals>
                <configuration>
                  <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
                  <arguments>run cucumber-docs</arguments>
                </configuration>
                <phase>install</phase>
              </execution>

            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>docker</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.0.2</version>
            <executions>
              <execution>
                <id>copy-resources</id>
                <phase>package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/docker_assembly/cucumber
                  </outputDirectory>
                  <resources>
                    <resource>
                      <directory>${basedir}</directory>
                      <includes>
                        <include>features/**/*</include>
                        <include>stepDefinitions/**/*</include>
                        <include>plugins/**/*</include>
                        <include>resources/**/*</include>
                        <include>node_modules/**/*</include>
                        <include>cucumber-common/**/*</include>
                        <include>*.js*</include>
                      </includes>
                      <filtering>false</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <configuration>
              <verbose>true</verbose>
              <apiVersion>1.23</apiVersion>
              <registry>nexus3.onap.org:10001</registry>
              <authConfig>
                <pull>
                  <username>docker</username>
                  <password>docker</password>
                </pull>
              </authConfig>
              <images>
                <!-- Build sanity image -->
                <image>
                  <name>onap/cucumber-sdc-api-tests</name>
                  <alias>cucumber-sdc-api-tests</alias>
                  <build>
                    <cleanup>try</cleanup>
                    <dockerFileDir>${project.build.directory}/docker_assembly</dockerFileDir>
                    <tags>
                      <tag>${docker.tag}</tag>
                      <tag>
                        ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
                      </tag>
                    </tags>
                  </build>
                </image>
              </images>
            </configuration>
            <executions>
              <execution>
                <id>clean-images</id>
                <phase>pre-clean</phase>
                <goals>
                  <goal>remove</goal>
                </goals>
                <configuration>
                  <removeAll>true</removeAll>
                  <images>
                    <image>onap/cucumber-sdc-api-tests</image>
                  </images>
                </configuration>
              </execution>
              <execution>
                <id>generate-images</id>
                <phase>install</phase>
                <goals>
                  <goal>build</goal>
                </goals>
              </execution>
              <execution>
                <id>push-images</id>
                <phase>deploy</phase>
                <goals>
                  <goal>push</goal>
                </goals>
                <configuration>
                  <images>
                    <image>onap/cucumber-sdc-api-tests</image>
                  </images>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>