Merge pull request #2368 from owncloud/fix-stop-recent-builds-fork

[CI][docs-only] fix stop-recent-builds for forks
This commit is contained in:
Willy Kloucek
2021-08-06 14:14:45 +02:00
committed by GitHub

View File

@@ -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": {