Skip to content

Commit

Permalink
Merge pull request #5631 from owncloud/only-unittest-pipelines
Browse files Browse the repository at this point in the history
[unit-tests-only] Run minimum pipelines for unit tests only PRs
  • Loading branch information
phil-davis authored Aug 5, 2021
2 parents 446c611 + 1de2e98 commit cf3a511
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,16 @@ def main(ctx):
return pipelines + deploys + checkStarlark()

def beforePipelines(ctx):
return yarnlint() + checkForRecentBuilds(ctx) + changelog(ctx) + website(ctx) + cacheOcisPipeline(ctx)
if "unit-tests-only" in ctx.build.title.lower():
return yarnlint() + checkForRecentBuilds(ctx)
else:
return yarnlint() + checkForRecentBuilds(ctx) + changelog(ctx) + website(ctx) + cacheOcisPipeline(ctx)

def stagePipelines(ctx):
unitTestPipelines = unitTests(ctx)
if "unit-tests-only" in ctx.build.title.lower():
return unitTestPipelines

acceptancePipelines = acceptance(ctx)
if acceptancePipelines == False:
return unitTestPipelines
Expand Down Expand Up @@ -1038,7 +1044,7 @@ def unitTests(ctx):
def acceptance(ctx):
pipelines = []

if "acceptance" not in config or "unit-tests-only" in ctx.build.title.lower():
if "acceptance" not in config:
return pipelines

if type(config["acceptance"]) == "bool":
Expand Down

0 comments on commit cf3a511

Please sign in to comment.