Commit b599914d authored by hanbing's avatar hanbing

[update] 优化Maven生命周期

parent f7b4d1cc
......@@ -19,7 +19,7 @@ pipeline {
stage('编译构建') {
steps {
sh '''
mvn clean install -Dmaven.test.skip=true com.google.cloud.tools:jib-maven-plugin:build -DsendCredentialsOverHttp=true
mvn clean install -Dmaven.test.skip=true -DsendCredentialsOverHttp=true
'''
}
}
......
......@@ -199,6 +199,16 @@
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.5.2</version>
<!-- 将jib与mvn构建的生命周期绑定 -->
<executions>
<execution>
<id>build-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<!--from节点用来设置镜像的基础镜像,相当于Docerkfile中的FROM关键字-->
<from>
......
......@@ -283,6 +283,14 @@
<!--可以进行HTTP-->
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
......
......@@ -236,6 +236,14 @@
<!--可以进行HTTP-->
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
......
......@@ -241,6 +241,14 @@
<!--可以进行HTTP-->
<allowInsecureRegistries>true</allowInsecureRegistries>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment