修复pipeline触发报错
This commit is contained in:
parent
f9a27338e4
commit
9148cb95e3
157
pom.xml
157
pom.xml
|
@ -252,161 +252,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>integration-test</id>
|
||||
<!--无需指定-->
|
||||
<!--<properties>-->
|
||||
<!--<gitlab.version>8.17.4</gitlab.version>-->
|
||||
<!--<postgres.version>9.5-1</postgres.version>-->
|
||||
<!--</properties>-->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.16</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>gitee.http.port</name>
|
||||
<value>${gitee.http.port}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>postgres.port</name>
|
||||
<value>${postgres.port}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>port-allocator-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>allocate-ports</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<ports>
|
||||
<port>
|
||||
<name>gitee.http.port</name>
|
||||
</port>
|
||||
<port>
|
||||
<name>gitee.ssh.port</name>
|
||||
</port>
|
||||
<port>
|
||||
<name>postgres.port</name>
|
||||
</port>
|
||||
</ports>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.14.2</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<images>
|
||||
<image>
|
||||
<name>sameersbn/postgresql:${postgres.version}</name>
|
||||
<alias>it-gitee-postgres</alias>
|
||||
<run>
|
||||
<namingStrategy>alias</namingStrategy>
|
||||
<env>
|
||||
<DB_NAME>giteehq_production</DB_NAME>
|
||||
<DB_USER>gitee</DB_USER>
|
||||
<DB_PASS>password</DB_PASS>
|
||||
<DB_EXTENSION>pg_trgm</DB_EXTENSION>
|
||||
</env>
|
||||
<ports>
|
||||
<port>${postgres.port}:5432</port>
|
||||
</ports>
|
||||
</run>
|
||||
</image>
|
||||
<image>
|
||||
<name>sameersbn/redis</name>
|
||||
<alias>it-gitee-redis</alias>
|
||||
<run>
|
||||
<namingStrategy>alias</namingStrategy>
|
||||
</run>
|
||||
</image>
|
||||
<image>
|
||||
<name>sameersbn/gitee</name>
|
||||
<alias>it-gitee-gitee</alias>
|
||||
<run>
|
||||
<namingStrategy>alias</namingStrategy>
|
||||
<links>
|
||||
<link>it-gitee-postgres:postgresql</link>
|
||||
<link>it-giee-redis:redisio</link>
|
||||
</links>
|
||||
<ports>
|
||||
<port>${gitee.http.port}:80</port>
|
||||
<port>${gitee.ssh.port}:22</port>
|
||||
</ports>
|
||||
<env>
|
||||
<DEBUG>false</DEBUG>
|
||||
<TZ>Asia/Kolkata</TZ>
|
||||
<GITEE_TIMEZONE>Kolkata</GITEE_TIMEZONE>
|
||||
<GITEE_PORT>${gitee.http.port}</GITEE_PORT>
|
||||
<GITEE_SSH_PORT>${gitee.ssh.port}</GITEE_SSH_PORT>
|
||||
<GITEE_SECRETS_DB_KEY_BASE>long-and-random-alpha-numeric-string</GITEE_SECRETS_DB_KEY_BASE>
|
||||
<GITEE_SECRETS_SECRET_KEY_BASE>long-and-random-alphanumeric-string</GITEE_SECRETS_SECRET_KEY_BASE>
|
||||
<GITEE_SECRETS_OTP_KEY_BASE>long-and-random-alpha-numeric-string</GITEE_SECRETS_OTP_KEY_BASE>
|
||||
<GITEE_HOST>172.17.0.1</GITEE_HOST>
|
||||
</env>
|
||||
<wait>
|
||||
<http>
|
||||
<url>http://localhost:${gitee.http.port}/</url>
|
||||
</http>
|
||||
<time>120000</time>
|
||||
</wait>
|
||||
</run>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>start</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>stop</id>
|
||||
<phase>post-integration-test</phase>
|
||||
<goals>
|
||||
<goal>stop</goal>
|
||||
<goal>remove</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -85,6 +85,9 @@ public abstract class AbstractWebHookTriggerHandler<H extends WebHook> implement
|
|||
protected abstract BuildStatusUpdate retrieveBuildStatusUpdate(H hook);
|
||||
|
||||
protected URIish retrieveUrIish(WebHook hook, GitSCM gitSCM) {
|
||||
if (gitSCM == null) {
|
||||
return null;
|
||||
}
|
||||
List<URIish> uris = new ArrayList<URIish>();
|
||||
try {
|
||||
if (hook.getRepository() != null) {
|
||||
|
|
Loading…
Reference in New Issue