This is an automated email from the ASF dual-hosted git repository.
zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new cf8d33a Remove duplicated profile docker-per-commit (#16380)
cf8d33a is described below
commit cf8d33afba171ec08ccf39dd765a22698ab90c4d
Author: 吴伟杰 <[email protected]>
AuthorDate: Fri Mar 25 22:51:00 2022 +0800
Remove duplicated profile docker-per-commit (#16380)
* Remove duplicated profile docker-per-commit
* Simplify docker-per-commit.yaml
---
.github/workflows/docker-per-commit.yaml | 11 ++-----
.../shardingsphere-proxy-distribution/pom.xml | 34 ++++------------------
2 files changed, 9 insertions(+), 36 deletions(-)
diff --git a/.github/workflows/docker-per-commit.yaml
b/.github/workflows/docker-per-commit.yaml
index fa72a40..397e5d6 100644
--- a/.github/workflows/docker-per-commit.yaml
+++ b/.github/workflows/docker-per-commit.yaml
@@ -29,7 +29,6 @@ on:
env:
HUB: ghcr.io/apache/shardingsphere
PROXY: ghcr.io/apache/shardingsphere-proxy
- ORIGINAL_PROXY_TAG: PER_COMMIT
jobs:
build:
@@ -41,8 +40,6 @@ jobs:
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
- with:
- submodules: true
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
@@ -61,9 +58,7 @@ jobs:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build docker images based on Java 8
- run: ./mvnw -B -Prelease,docker-per-commit -DskipTests
-Dmaven.javadoc.skip=true -Drat.skip=true clean install
- - name: Retag the image version to current commit id
- run: docker tag ${{ env.PROXY }}:${{ env.ORIGINAL_PROXY_TAG }} ${{
env.PROXY }}:${{ github.sha }}
- - name: Push docker images
+ - name: Build docker image
+ run: ./mvnw -B -Prelease,docker -DskipTests -Dmaven.javadoc.skip=true
-Dcheckstyle.skip=true -Drat.skip=true -Dproxy.image.repository=${{ env.PROXY
}} -Dproxy.image.tag=${{ github.sha }} clean install
+ - name: Push docker image
run: docker push ${{ env.PROXY }}:${{ github.sha }}
diff --git
a/shardingsphere-distribution/shardingsphere-proxy-distribution/pom.xml
b/shardingsphere-distribution/shardingsphere-proxy-distribution/pom.xml
index 3bbd776..fa40d2d 100644
--- a/shardingsphere-distribution/shardingsphere-proxy-distribution/pom.xml
+++ b/shardingsphere-distribution/shardingsphere-proxy-distribution/pom.xml
@@ -85,6 +85,10 @@
</profile>
<profile>
<id>docker</id>
+ <properties>
+
<proxy.image.repository>apache/shardingsphere-proxy</proxy.image.repository>
+ <proxy.image.tag>${project.version}</proxy.image.tag>
+ </properties>
<build>
<plugins>
<plugin>
@@ -99,34 +103,8 @@
</execution>
</executions>
<configuration>
-
<repository>apache/shardingsphere-proxy</repository>
- <tag>${project.version}</tag>
- <buildArgs>
-
<APP_NAME>${project.build.finalName}-shardingsphere-proxy-bin</APP_NAME>
- </buildArgs>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>docker-per-commit</id>
- <build>
- <plugins>
- <plugin>
- <groupId>com.spotify</groupId>
- <artifactId>dockerfile-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>shardingsphere-proxy-bin</id>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
-
<repository>ghcr.io/apache/shardingsphere-proxy</repository>
- <tag>PER_COMMIT</tag>
+ <repository>${proxy.image.repository}</repository>
+ <tag>${proxy.image.tag}</tag>
<buildArgs>
<APP_NAME>${project.build.finalName}-shardingsphere-proxy-bin</APP_NAME>
</buildArgs>