Skip to contentSkip to conversation

CI: Don't run Coverity on forks

PATCH In review Andrew Cooper 2 participants 4 messages Mar 21, 2022 – Mar 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CI: Don't run Coverity on forks

By default, workflows run in all forks, but the Coverity token is specific to us, causing all other runs to fail.

---
CC: Roger Pau Monné <[email protected]>
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 .github/workflows/coverity.yml | 1 +
 1 file changed, 1 insertion(+)
.github/workflows/coverity.yml +1 -0
index 427fb86f947f..f613f9ed3652 100644
@@ -8,6 +8,7 @@ on:
 
 jobs:
   coverity:
+    if: github.repository_owner == 'xen-project'
     runs-on: ubuntu-latest
     steps:
     - name: Install build dependencies
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andrew Cooper

By default, workflows run in all forks, but the Coverity token is specific to us, causing all other runs to fail.

Albeit I have a suggestion to make this more useful I think

Quoted 16 lines

---
CC: Roger Pau Monné <[email protected]>
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 .github/workflows/coverity.yml | 1 +
 1 file changed, 1 insertion(+)
.github/workflows/coverity.yml +0 -0
index 427fb86f947f..f613f9ed3652 100644

.github/workflows/coverity.yml on: · line 11

Quoted 4 lines
.github/workflows/coverity.yml +1 -0
@@ -8,6 +8,7 @@ on:
 
 jobs:
   coverity:
+    if: github.repository_owner == 'xen-project'

Since I don't know anything else similar, why not make this a secret,
ie: ${{ secrets.RUN_COVERITY_SCAN }}? So that people could decide to enable coverity on their own repos if desired.

We would also need to introduce a ${{ secrets.COVERITY_SCAN_PROJECT }}

To allow setting a different project name.

Thanks, Roger.

#2 lore raw
Quoted 33 lines · Roger Pau Monné
Quoted 4 lines · Andrew Cooper

By default, workflows run in all forks, but the Coverity token is specific to us, causing all other runs to fail.

Albeit I have a suggestion to make this more useful I think

Quoted 16 lines

---
CC: Roger Pau Monné <[email protected]>
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 .github/workflows/coverity.yml | 1 +
 1 file changed, 1 insertion(+)
.github/workflows/coverity.yml +0 -0
index 427fb86f947f..f613f9ed3652 100644

.github/workflows/coverity.yml on: · line 11

Quoted 4 lines
.github/workflows/coverity.yml +1 -0
@@ -8,6 +8,7 @@ on:
 
 jobs:
   coverity:
+    if: github.repository_owner == 'xen-project'

Since I don't know anything else similar, why not make this a secret,
ie: ${{ secrets.RUN_COVERITY_SCAN }}? So that people could decide to enable coverity on their own repos if desired.

Quoted 3 lines

We would also need to introduce a ${{ secrets.COVERITY_SCAN_PROJECT }}

To allow setting a different project name.

We wouldn't need a secret here.  We could do it on on the existence of the PROJECT field.

But if we're doing this, then we also need to make the branch selectable too via the same mechanism.

~Andrew

#3 lore raw
Quoted 36 lines · Andrew Cooper
Quoted 35 lines · Roger Pau Monné
Quoted 4 lines · Andrew Cooper

By default, workflows run in all forks, but the Coverity token is specific to us, causing all other runs to fail.

Albeit I have a suggestion to make this more useful I think

Quoted 16 lines

---
CC: Roger Pau Monné <[email protected]>
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 .github/workflows/coverity.yml | 1 +
 1 file changed, 1 insertion(+)
.github/workflows/coverity.yml +0 -0
index 427fb86f947f..f613f9ed3652 100644

.github/workflows/coverity.yml on: · line 11

Quoted 4 lines
.github/workflows/coverity.yml +1 -0
@@ -8,6 +8,7 @@ on:
 
 jobs:
   coverity:
+    if: github.repository_owner == 'xen-project'

Since I don't know anything else similar, why not make this a secret,
ie: ${{ secrets.RUN_COVERITY_SCAN }}? So that people could decide to enable coverity on their own repos if desired.

We would also need to introduce a ${{ secrets.COVERITY_SCAN_PROJECT }}

Quoted 7 lines
Quoted 1 line

To allow setting a different project name.

We wouldn't need a secret here.  We could do it on on the existence of the PROJECT field.

But if we're doing this, then we also need to make the branch selectable too via the same mechanism.

Sure, that would be better.

Those don't need to be secrets, but I don't know another way to store such data in a github project.

Thanks, Roger.