mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 03:40:01 -06:00
fix stop-recent-builds for forks
This commit is contained in:
@@ -214,8 +214,6 @@ def checkForRecentBuilds(ctx):
|
||||
return pipelines
|
||||
|
||||
def stopRecentBuilds(ctx):
|
||||
repo_slug = ctx.build.source_repo if ctx.build.source_repo else ctx.repo.slug
|
||||
|
||||
return [{
|
||||
"name": "stop-recent-builds",
|
||||
"image": "drone/cli:alpine",
|
||||
@@ -227,8 +225,8 @@ def stopRecentBuilds(ctx):
|
||||
},
|
||||
},
|
||||
"commands": [
|
||||
"drone build ls %s --status running > /drone/src/recentBuilds.txt" % repo_slug,
|
||||
"drone build info %s ${DRONE_BUILD_NUMBER} > /drone/src/thisBuildInfo.txt" % repo_slug,
|
||||
"drone build ls %s --status running > /drone/src/recentBuilds.txt" % ctx.repo.slug,
|
||||
"drone build info %s ${DRONE_BUILD_NUMBER} > /drone/src/thisBuildInfo.txt" % ctx.repo.slug,
|
||||
"cd /drone/src && ./tests/acceptance/cancelBuilds.sh",
|
||||
],
|
||||
"when": {
|
||||
|
||||
Reference in New Issue
Block a user