Skip to content

Commit

Permalink
Merge pull request #53 from owncloud/remove-github-comment-from-ci
Browse files Browse the repository at this point in the history
[tests-only][full-ci]Remove github comment from drone CI
  • Loading branch information
saw-jan authored Jul 13, 2023
2 parents d7604d0 + 14d6298 commit 11de8a3
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ PLUGINS_SLACK = "plugins/slack:1"
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59-oxygen"
SELENIUM_STANDALONE_FIREFOX_DEBUG = "selenium/standalone-firefox-debug:3.8.1"
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli"
THEGEEKLAB_DRONE_GITHUB_COMMENT = "thegeeklab/drone-github-comment:1"

DEFAULT_PHP_VERSION = "7.4"
DEFAULT_NODEJS_VERSION = "14"
Expand Down Expand Up @@ -885,7 +884,6 @@ def acceptance(ctx):
"skip": False,
"debugSuites": [],
"skipExceptParts": [],
"earlyFail": True,
"enableApp": True,
"selUserNeeded": False,
}
Expand Down Expand Up @@ -923,14 +921,6 @@ def acceptance(ctx):
if params["skip"]:
continue

# switch off earlyFail if the PR title contains full-ci
if ("full-ci" in ctx.build.title.lower()):
params["earlyFail"] = False

# switch off earlyFail when running cron builds (for example, nightly CI)
if (ctx.build.event == "cron"):
params["earlyFail"] = False

if "externalScality" in params and len(params["externalScality"]) != 0:
# We want to use an external scality server for this pipeline.
# That uses some "standard" extraSetup and extraTeardown.
Expand Down Expand Up @@ -1142,7 +1132,7 @@ def acceptance(ctx):
"path": "%s/downloads" % dir["server"],
}],
}),
] + testConfig["extraTeardown"] + githubComment(params["earlyFail"]),
] + testConfig["extraTeardown"],
"services": databaseService(testConfig["database"]) +
browserService(testConfig["browser"]) +
emailService(testConfig["emailNeeded"]) +
Expand Down Expand Up @@ -1969,33 +1959,6 @@ def buildTestConfig(params):
configs.append(config)
return configs

def githubComment(earlyFail):
if (earlyFail):
return [{
"name": "github-comment",
"image": THEGEEKLAB_DRONE_GITHUB_COMMENT,
"pull": "if-not-exists",
"settings": {
"message": ":boom: Acceptance tests pipeline <strong>${DRONE_STAGE_NAME}</strong> failed. The build has been cancelled.\\n\\n${DRONE_BUILD_LINK}/${DRONE_JOB_NUMBER}${DRONE_STAGE_NUMBER}",
"key": "pr-${DRONE_PULL_REQUEST}",
"update": "true",
"api_key": {
"from_secret": "github_token",
},
},
"when": {
"status": [
"failure",
],
"event": [
"pull_request",
],
},
}]

else:
return []

def checkStarlark():
return [{
"kind": "pipeline",
Expand Down

0 comments on commit 11de8a3

Please sign in to comment.