Skip to content

Commit 48df179

Browse files
authored
Merge pull request #561 from Labelbox/jt/al-2320
2 parents 0a5524f + 9a67b20 commit 48df179

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

e2e_tests_codefresh_pipeline.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: "1.0"
2+
stages:
3+
- "clone"
4+
- "build"
5+
- "e2e_test"
6+
steps:
7+
main_clone:
8+
title: "Cloning repository"
9+
type: "git-clone"
10+
repo: "Labelbox/labelbox-python"
11+
stage: "clone"
12+
revision: "${{CF_BRANCH}}"
13+
parallel_build:
14+
type: "parallel"
15+
stage: "build"
16+
steps:
17+
build_sdk_test:
18+
description: "Building Docker image for sdk tests"
19+
tag: "testing"
20+
type: "build"
21+
image_name: "sdk-tests"
22+
disable_push: true
23+
working_directory: "${{main_clone}}"
24+
dockerfile: "Dockerfile"
25+
e2e_test:
26+
title: "Python SDK e2e tests"
27+
description: "Running Python SDK e2e tests"
28+
fail_fast: false
29+
stage: "e2e_test"
30+
image: "${{build_sdk_test}}"
31+
working_directory: "IMAGE_WORK_DIR"
32+
commands:
33+
- pytest
34+
send_slack_success_to_pages_active_learning:
35+
title: "Alert on success to pages active learning"
36+
type: slack-message-sender
37+
arguments:
38+
WEBHOOK_URL: "${{slack_webhook_url}}"
39+
MESSAGE: "SDK Tests have succeeded-- ${{CF_BUILD_URL}}"
40+
when:
41+
condition:
42+
all:
43+
succeeded: e2e_test.result == 'success'
44+
send_slack_failure_to_e2e:
45+
title: "Alert on failure to e2e channel"
46+
type: slack-message-sender
47+
arguments:
48+
WEBHOOK_URL: "${{slack_webhook_e2e}}"
49+
MESSAGE: "SDK Tests have failed-- ${{CF_BUILD_URL}}"
50+
when:
51+
condition:
52+
all:
53+
failed: e2e_test.result == 'failure'
54+
send_slack_failure_to_deploy_prod:
55+
title: "Alert on failure to deployments prod channel"
56+
type: slack-message-sender
57+
arguments:
58+
WEBHOOK_URL: "${{slack_webhook_deployments_prod}}"
59+
MESSAGE: "SDK Tests have failed-- ${{CF_BUILD_URL}}"
60+
when:
61+
condition:
62+
all:
63+
failed: e2e_test.result == 'failure'
64+
check_for_failures:
65+
image: alpine
66+
commands:
67+
- exit 1
68+
when:
69+
condition:
70+
any:
71+
myCondition: e2e_test.result == 'failure'

0 commit comments

Comments
 (0)