You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/09/15 06:18:07 UTC

[pulsar] branch master updated: [improve][CI] Ensure that ssh-access is only activated for pull requests outside of apache/pulsar (#17606)

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

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 0cf1dd6a2b3 [improve][CI] Ensure that ssh-access is only activated for pull requests outside of apache/pulsar (#17606)
0cf1dd6a2b3 is described below

commit 0cf1dd6a2b380c823131c2e5a8ff45cb93cde93f
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Sep 15 09:17:58 2022 +0300

    [improve][CI] Ensure that ssh-access is only activated for pull requests outside of apache/pulsar (#17606)
    
    - the if condition was missing for the ssh-access step in pulsar-java-test-image build job
    
    - add additional condition that applies to only pull_request events.
      - this is a better default
---
 .github/workflows/pulsar-ci-flaky.yaml |  2 +-
 .github/workflows/pulsar-ci.yaml       | 31 ++++++++++++++++---------------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/pulsar-ci-flaky.yaml b/.github/workflows/pulsar-ci-flaky.yaml
index 67f2f0cfb67..a65f6e61dec 100644
--- a/.github/workflows/pulsar-ci-flaky.yaml
+++ b/.github/workflows/pulsar-ci-flaky.yaml
@@ -75,7 +75,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index 97b6bbeb025..bbc60199965 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -75,7 +75,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -122,7 +122,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -165,7 +165,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -237,7 +237,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -259,6 +259,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -301,7 +302,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -356,7 +357,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -440,7 +441,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -573,7 +574,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -645,7 +646,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -695,7 +696,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -773,7 +774,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -806,7 +807,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -884,7 +885,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait
@@ -960,7 +961,7 @@ jobs:
 
       - name: Setup ssh access to build runner VM
         # ssh access is enabled for builds in own forks
-        if: ${{ github.repository != 'apache/pulsar' }}
+        if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         uses: ./.github/actions/ssh-access
         with:
           limit-access-to-actor: true
@@ -1005,7 +1006,7 @@ jobs:
       - name: Wait for ssh connection when build fails
         # ssh access is enabled for builds in own forks
         uses: ./.github/actions/ssh-access
-        if: ${{ failure() && github.repository != 'apache/pulsar' }}
+        if: ${{ failure() && github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
         continue-on-error: true
         with:
           action: wait