Skip to content

Commit

Permalink
Merge branch 'master' into release-0.8.0
Browse files Browse the repository at this point in the history
for #1272
  • Loading branch information
jnweiger committed Aug 11, 2023
2 parents 28f4939 + 4fe6207 commit ef4c458
Show file tree
Hide file tree
Showing 3 changed files with 518 additions and 203 deletions.
39 changes: 1 addition & 38 deletions .drone.star
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 @@ -887,7 +886,6 @@ def acceptance(ctx):
"skip": False,
"debugSuites": [],
"skipExceptParts": [],
"earlyFail": True,
"enableApp": True,
"selUserNeeded": False,
}
Expand Down Expand Up @@ -925,14 +923,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 @@ -1144,7 +1134,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 @@ -1971,33 +1961,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 ef4c458

Please sign in to comment.