You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by wa...@apache.org on 2022/08/15 03:17:24 UTC

[incubator-pegasus] branch master updated: fix(actions): fix docker images conflict on different branches (#1114)

This is an automated email from the ASF dual-hosted git repository.

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new e7f9c7a00 fix(actions): fix docker images conflict on different branches (#1114)
e7f9c7a00 is described below

commit e7f9c7a00e41a77c87a8bf5923fc58c60c455185
Author: Yingchun Lai <la...@apache.org>
AuthorDate: Mon Aug 15 11:17:20 2022 +0800

    fix(actions): fix docker images conflict on different branches (#1114)
---
 .github/workflows/lint_and_test_cpp.yaml      | 15 +++++++++------
 .github/workflows/pegasus-regular-build.yml   |  2 +-
 .github/workflows/thirdparty-regular-push.yml |  4 ++--
 docker/README.md                              | 10 +++++-----
 docker/thirdparties-bin/Dockerfile            |  5 ++---
 5 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/.github/workflows/lint_and_test_cpp.yaml b/.github/workflows/lint_and_test_cpp.yaml
index 88aa2db9d..bfba00c58 100644
--- a/.github/workflows/lint_and_test_cpp.yaml
+++ b/.github/workflows/lint_and_test_cpp.yaml
@@ -55,7 +55,7 @@ jobs:
     needs: cpp_clang_format_linter
     runs-on: ubuntu-latest
     container:
-      image: apache/pegasus:thirdparties-bin-ubuntu1804
+      image: apache/pegasus:thirdparties-bin-ubuntu1804-${{ github.base_ref }}
     steps:
       - uses: actions/checkout@v2
       - name: Setup cache
@@ -72,6 +72,7 @@ jobs:
               - 'cmake_modules/**'
               - 'CMakeLists.txt'
               - 'run.sh'
+              - '.github/workflows/lint_and_test_cpp.yaml'
             src:
               - 'src/**'
             thirdparty:
@@ -142,7 +143,7 @@ jobs:
     needs: build_Release
     runs-on: ubuntu-latest
     container:
-      image: apache/pegasus:thirdparties-bin-ubuntu1804
+      image: apache/pegasus:thirdparties-bin-ubuntu1804-${{ github.base_ref }}
       options: --cap-add=SYS_PTRACE
     steps:
       - uses: actions/checkout@v2
@@ -168,7 +169,7 @@ jobs:
     needs: cpp_clang_format_linter
     runs-on: ubuntu-latest
     container:
-      image: apache/pegasus:thirdparties-bin-ubuntu1804
+      image: apache/pegasus:thirdparties-bin-ubuntu1804-${{ github.base_ref }}
     steps:
       - uses: actions/checkout@v2
       - name: Setup cache
@@ -185,6 +186,7 @@ jobs:
               - 'cmake_modules/**'
               - 'CMakeLists.txt'
               - 'run.sh'
+              - '.github/workflows/lint_and_test_cpp.yaml'
             src:
               - 'src/**'
             thirdparty:
@@ -249,7 +251,7 @@ jobs:
     needs: build_ASAN
     runs-on: ubuntu-latest
     container:
-      image: apache/pegasus:thirdparties-bin-ubuntu1804
+      image: apache/pegasus:thirdparties-bin-ubuntu1804-${{ github.base_ref }}
       options: --cap-add=SYS_PTRACE
     steps:
       - uses: actions/checkout@v2
@@ -275,7 +277,7 @@ jobs:
     needs: cpp_clang_format_linter
     runs-on: ubuntu-latest
     container:
-      image: apache/pegasus:thirdparties-bin-ubuntu1804
+      image: apache/pegasus:thirdparties-bin-ubuntu1804-${{ github.base_ref }}
     steps:
       - uses: actions/checkout@v2
       - name: Setup cache
@@ -292,6 +294,7 @@ jobs:
               - 'cmake_modules/**'
               - 'CMakeLists.txt'
               - 'run.sh'
+              - '.github/workflows/lint_and_test_cpp.yaml'
             src:
               - 'src/**'
             thirdparty:
@@ -356,7 +359,7 @@ jobs:
     needs: build_UBSAN
     runs-on: ubuntu-latest
     container:
-      image: apache/pegasus:thirdparties-bin-ubuntu1804
+      image: apache/pegasus:thirdparties-bin-ubuntu1804-${{ github.base_ref }}
       options: --cap-add=SYS_PTRACE
     steps:
       - uses: actions/checkout@v2
diff --git a/.github/workflows/pegasus-regular-build.yml b/.github/workflows/pegasus-regular-build.yml
index 475141376..a12bc523d 100644
--- a/.github/workflows/pegasus-regular-build.yml
+++ b/.github/workflows/pegasus-regular-build.yml
@@ -51,7 +51,7 @@ jobs:
             compiler: "clang-9,clang++-9"
             os: ubuntu1804
     container:
-      image: apache/pegasus:thirdparties-bin-${{ matrix.os }}
+      image: apache/pegasus:thirdparties-bin-${{ matrix.os }}-${{ github.ref_name }}
     defaults:
       run:
         working-directory: /root/incubator-pegasus
diff --git a/.github/workflows/thirdparty-regular-push.yml b/.github/workflows/thirdparty-regular-push.yml
index f19c832d6..280d5caec 100644
--- a/.github/workflows/thirdparty-regular-push.yml
+++ b/.github/workflows/thirdparty-regular-push.yml
@@ -58,7 +58,7 @@ jobs:
           file: ./docker/thirdparties-src/Dockerfile
           push: true
           tags: |
-            apache/pegasus:thirdparties-src
+            apache/pegasus:thirdparties-src-${{ github.ref_name }}
           build-args: |
             GITHUB_BRANCH=${{ github.ref_name }}
       - name: Image digest
@@ -93,7 +93,7 @@ jobs:
           file: ./docker/thirdparties-bin/Dockerfile
           push: true
           tags: |
-            apache/pegasus:thirdparties-bin-${{ matrix.osversion }}
+            apache/pegasus:thirdparties-bin-${{ matrix.osversion }}-${{ github.ref_name }}
           build-args: |
             GITHUB_BRANCH=${{ github.ref_name }}
             OS_VERSION=${{ matrix.osversion }}
diff --git a/docker/README.md b/docker/README.md
index 2faecbc66..eb75af3f3 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -51,14 +51,14 @@ It packages the downloaded sources into a zip in the container, so that
 other repos can easily extract third-parties from the container (via `docker cp`),
 without downloading from the cloud object storage.
 
-- `apache/pegasus:thirdparties-src`
+- `apache/pegasus:thirdparties-src-<branch>`
 
 ## thirdparties-bin
 
 This is a Docker image for Pegasus unit-testing. It prebuilts the thirdparty libraries,
 so jobs based on this image can skip building third-parties.
 
-- `apache/pegasus:thirdparties-bin-centos7`
-- `apache/pegasus:thirdparties-bin-ubuntu1604`
-- `apache/pegasus:thirdparties-bin-ubuntu1804`
-- `apache/pegasus:thirdparties-bin-ubuntu2004`
+- `apache/pegasus:thirdparties-bin-centos7-master`
+- `apache/pegasus:thirdparties-bin-ubuntu1604-master`
+- `apache/pegasus:thirdparties-bin-ubuntu1804-master`
+- `apache/pegasus:thirdparties-bin-ubuntu2004-master`
diff --git a/docker/thirdparties-bin/Dockerfile b/docker/thirdparties-bin/Dockerfile
index 5d2aaefed..eda3eddfd 100644
--- a/docker/thirdparties-bin/Dockerfile
+++ b/docker/thirdparties-bin/Dockerfile
@@ -15,10 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+ARG GITHUB_BRANCH=master
 ARG OS_VERSION=centos7
-FROM apache/pegasus:thirdparties-src as builder
-
-ARG OS_VERSION=centos7
+FROM apache/pegasus:thirdparties-src-${GITHUB_BRANCH} as builder
 FROM apache/pegasus:build-env-${OS_VERSION}
 
 WORKDIR /root


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org