:boom: To see the trace, please open the link in the console ...
\\n\\n\\n\\n" >> comments.file',
- 'for f in *.zip; do echo "#### npx playwright show-trace $CACHE_ENDPOINT/$CACHE_BUCKET/${DRONE_REPO}/${DRONE_BUILD_NUMBER}/tracing/$f \n" >> comments.file; done',
- 'echo "\n
" >> comments.file',
- "more comments.file",
- ],
- "environment": {
- "CACHE_ENDPOINT": {
- "from_secret": "cache_s3_server",
- },
- "CACHE_BUCKET": {
- "from_secret": "cache_s3_bucket",
- },
- },
- "when": {
- "status": [
- "failure",
- ],
- "event": [
- "pull_request",
- "cron",
- ],
- },
- }]
-
-def e2eGithubComment():
- prefix = "E2E tests failed: ${DRONE_BUILD_LINK}/${DRONE_JOB_NUMBER}${DRONE_STAGE_NUMBER}/1"
- return [{
- "name": "github-comment",
- "image": THEGEEKLAB_DRONE_GITHUB_COMMENT,
- "pull": "if-not-exists",
- "settings": {
- "message": "%s/reports/e2e/playwright/tracing/comments.file" % dirs["web"],
- "key": "pr-${DRONE_PULL_REQUEST}",
- "update": "true",
- "api_key": {
- "from_secret": "github_token",
- },
- },
- "commands": [
- "cd %s/reports/e2e/playwright/tracing/" % dirs["web"],
- "if [ -s comments.file ]; then echo '%s' | cat - comments.file > temp && mv temp comments.file && /bin/drone-github-comment; fi" % prefix,
- ],
- "when": {
- "status": [
- "failure",
- ],
- "event": [
- "pull_request",
- ],
- },
- }]
-
-def failEarly(ctx, early_fail):
- """failEarly sends posts a comment about the failed pipeline to the github pr and then kills all pipelines of the current build
-
- Args:
- ctx: drone passes a context with information which the pipeline can be adapted to
- early_fail: boolean if an early fail should happen or not
-
- Returns:
- pipeline steps
- """
- if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "tag" or ctx.build.event == "cron"):
- return []
-
- if (early_fail):
- return [
- {
- "name": "github-comment",
- "image": THEGEEKLAB_DRONE_GITHUB_COMMENT,
- "settings": {
- "message": ":boom: Acceptance test [