Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

webhooks/circleci: Overhaul the CircleCI integration.

Hemanth V. Alluri5bbfaa225b1c
diff --git a/static/images/integrations/circleci/001.png b/static/images/integrations/circleci/001.png
index ba769ff842d..c3b8089ca2e 100644
Binary files a/static/images/integrations/circleci/001.png and b/static/images/integrations/circleci/001.png differ
diff --git a/static/images/integrations/circleci/002.png b/static/images/integrations/circleci/002.png
new file mode 100644
index 00000000000..a5e19aa969a
Binary files /dev/null and b/static/images/integrations/circleci/002.png differ
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
index bb289d88ea4..bf3f1f4ee77 100644
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -561,7 +561,8 @@ DOC_SCREENSHOT_CONFIG: Dict[str, List[ScreenshotConfig]] = {
ScreenshotConfig('repo_push_update_single_branch.json', '004.png', 'bitbucket',
bot_name='Bitbucket Server Bot')],
'buildbot': [ScreenshotConfig('started.json')],
- 'circleci': [ScreenshotConfig('build_passed.json')],
+ 'circleci': [ScreenshotConfig('github_bionic_production_build_success_multiple_parties.json', image_name='001.png'),
+ ScreenshotConfig('bitbucket_private_repo_pull_request_failure.json', image_name='002.png')],
'clubhouse': [ScreenshotConfig('story_create.json')],
'codeship': [ScreenshotConfig('error_build.json')],
'crashlytics': [ScreenshotConfig('issue_message.json')],
diff --git a/zerver/webhooks/circleci/doc.md b/zerver/webhooks/circleci/doc.md
index 7046a1d7417..32edef21e38 100644
--- a/zerver/webhooks/circleci/doc.md
+++ b/zerver/webhooks/circleci/doc.md
@@ -18,3 +18,4 @@ your build statuses.
{!congrats.md!}
![](/static/images/integrations/circleci/001.png)
+![](/static/images/integrations/circleci/002.png)
diff --git a/zerver/webhooks/circleci/fixtures/bitbucket_private_repo_pull_request_failure.json b/zerver/webhooks/circleci/fixtures/bitbucket_private_repo_pull_request_failure.json
new file mode 100755
index 00000000000..4660f679b19
--- /dev/null
+++ b/zerver/webhooks/circleci/fixtures/bitbucket_private_repo_pull_request_failure.json
@@ -0,0 +1,363 @@
+{
+ "payload": {
+ "compare": null,
+ "previous_successful_build": {
+ "build_num": 2,
+ "status": "success",
+ "build_time_millis": 33841
+ },
+ "build_parameters": {
+ "CIRCLE_JOB": "build"
+ },
+ "oss": false,
+ "all_commit_details_truncated": false,
+ "committer_date": "",
+ "steps": [
+ {
+ "name": "Spin Up Environment",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Spin Up Environment",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:35.777Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T10:25:31.268Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 0,
+ "run_time_millis": 4509,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Preparing Environment Variables",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Preparing Environment Variables",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:36.310Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T10:25:36.286Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 99,
+ "run_time_millis": 24,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Checkout code",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Checkout code",
+ "bash_command": "#!/bin/sh\nset -e\n\n# Workaround old docker images with incorrect $HOME\n# check https://github.com/docker/docker/issues/2968 for details\nif [ \"${HOME}\" = \"/\" ]\nthen\n export HOME=$(getent passwd $(id -un) | cut -d: -f6)\nfi\n\necho Using SSH Config Dir $SSH_CONFIG_DIR\n\nmkdir -p $SSH_CONFIG_DIR\n\necho 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\nbitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==\n' >> $SSH_CONFIG_DIR/known_hosts\n\n(umask 077; touch $SSH_CONFIG_DIR/id_rsa)\nchmod 0600 $SSH_CONFIG_DIR/id_rsa\n(cat <<EOF > $SSH_CONFIG_DIR/id_rsa\n$CHECKOUT_KEY\nEOF\n)\n\nexport GIT_SSH_COMMAND='ssh -i $SSH_CONFIG_DIR/id_rsa -o UserKnownHostsFile=$SSH_CONFIG_DIR/known_hosts'\n\n# use git+ssh instead of https\ngit config --global url.\"ssh://[email protected]\".insteadOf \"https://bitbucket.org\" || true\ngit config --global gc.auto 0 || true\n\nif [ -e /home/circleci/project/.git ]\nthen\n cd /home/circleci/project\n git remote set-url origin \"$CIRCLE_REPOSITORY_URL\" || true\nelse\n mkdir -p /home/circleci/project\n cd /home/circleci/project\n git clone \"$CIRCLE_REPOSITORY_URL\" .\nfi\n\nif [ -n \"$CIRCLE_TAG\" ]\nthen\n git fetch --force origin \"refs/tags/${CIRCLE_TAG}\"\nelse\n git fetch --force origin \"unstable:remotes/origin/unstable\"\nfi\n\n\nif [ -n \"$CIRCLE_TAG\" ]\nthen\n git reset --hard \"$CIRCLE_SHA1\"\n git checkout -q \"$CIRCLE_TAG\"\nelif [ -n \"$CIRCLE_BRANCH\" ]\nthen\n git reset --hard \"$CIRCLE_SHA1\"\n git checkout -q -B \"$CIRCLE_BRANCH\"\nfi\n\ngit reset --hard \"$CIRCLE_SHA1\"",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:37.330Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T10:25:36.319Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 101,
+ "run_time_millis": 1011,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "sudo pip install requests",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "sudo pip install requests",
+ "bash_command": "#!/bin/bash -eo pipefail\nsudo pip install requests",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:38.811Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "start_time": "2020-06-12T10:25:37.339Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 102,
+ "run_time_millis": 1472,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "python run.py",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": true,
+ "infrastructure_fail": null,
+ "name": "python run.py",
+ "bash_command": "#!/bin/bash -eo pipefail\npython run.py",
+ "status": "failed",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:39.013Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "start_time": "2020-06-12T10:25:38.819Z",
+ "background": false,
+ "exit_code": 1,
+ "insignificant": false,
+ "canceled": null,
+ "step": 103,
+ "run_time_millis": 194,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Uploading test results",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Uploading test results",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:39.035Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "start_time": "2020-06-12T10:25:39.020Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 104,
+ "run_time_millis": 15,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Uploading artifacts",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Uploading artifacts",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T10:25:39.059Z",
+ "type": "test",
+ "allocation_id": "5ee358114751e46626b7e95e-0-build/7E6855FF",
+ "start_time": "2020-06-12T10:25:39.044Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 105,
+ "run_time_millis": 15,
+ "has_output": true
+ }
+ ]
+ }
+ ],
+ "body": "",
+ "usage_queued_at": "2020-06-12T10:25:21.563Z",
+ "context_ids": [],
+ "fail_reason": null,
+ "retry_of": null,
+ "reponame": "circleci-test",
+ "ssh_users": [],
+ "build_url": "https://circleci.com/bb/Hypro999/circleci-test/5",
+ "parallel": 1,
+ "failed": true,
+ "branch": "unstable",
+ "username": "Hypro999",
+ "author_date": "2020-06-12T10:25:03.000Z",
+ "why": "bitbucket",
+ "user": {
+ "is_user": true,
+ "login": "Hypro999",
+ "avatar_url": "https://secure.gravatar.com/avatar/c4b80edf0959d0f22ece999a27a997e9?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FHA-5.png",
+ "name": "Hemanth V. Alluri",
+ "vcs_type": "bitbucket",
+ "id": "{073cdd10-0fee-4b71-9904-50cf5f3ecd33}"
+ },
+ "vcs_revision": "eaa88f9eac0fad86c46a8fe35462fe2c904d84b1",
+ "workflows": {
+ "job_name": "build",
+ "job_id": "69fcea62-1c56-439e-bdfe-f74017b45cde",
+ "workflow_id": "540db7d1-8ad3-4dd0-9bdc-2e1904066bf0",
+ "workspace_id": "540db7d1-8ad3-4dd0-9bdc-2e1904066bf0",
+ "upstream_job_ids": [],
+ "upstream_concurrency_map": {},
+ "workflow_name": "workflow"
+ },
+ "owners": [
+ "Hypro999"
+ ],
+ "vcs_tag": null,
+ "pull_requests": [
+ {
+ "head_sha": null,
+ "url": "https://bitbucket.org/Hypro999/circleci-test/pull-requests/1"
+ }
+ ],
+ "build_num": 5,
+ "infrastructure_fail": false,
+ "committer_email": null,
+ "has_artifacts": true,
+ "previous": {
+ "build_num": 4,
+ "status": "failed",
+ "build_time_millis": 15936
+ },
+ "status": "failed",
+ "committer_name": null,
+ "retries": null,
+ "subject": "Add a breaking change.",
+ "vcs_type": "bitbucket",
+ "timedout": false,
+ "dont_build": null,
+ "lifecycle": "finished",
+ "no_dependency_cache": false,
+ "stop_time": "2020-06-12T10:25:39.109Z",
+ "ssh_disabled": true,
+ "build_time_millis": 7876,
+ "picard": {
+ "build_agent": {
+ "image": "circleci/picard@sha256:847ae88f32aaf7cfc04321b3eb25a7519630a949cf35df0d0b77ea1d7e886bd3",
+ "properties": {
+ "executor": "docker",
+ "nomad_ami": "ami-07194a5d4dd689502",
+ "availability_zone": "us-east-1c",
+ "instance_id": "i-0621811b3dc51c575",
+ "instance_ip": "172.16.91.76",
+ "build_agent": "1.0.34234-27aa9735"
+ }
+ },
+ "resource_class": {
+ "cpu": 2,
+ "ram": 4096,
+ "class": "medium",
+ "name": "Docker Medium"
+ },
+ "executor": "docker"
+ },
+ "circle_yml": {
+ "string": "version: 2\njobs:\n build:\n working_directory: null\n docker:\n - image: circleci/python:3.6.4\n steps:\n - checkout\n - run: sudo pip install requests\n - run: python run.py\n - store_test_results:\n path: test-results\n - store_artifacts:\n path: test-results\n destination: tr1\n environment:\n - CIRCLE_COMPARE_URL: https://bitbucket.org/Hypro999/circleci-test/branches/compare/eaa88f9eac0fad86c46a8fe35462fe2c904d84b1..7002beaea5a42561645b93be0aefdefc72a517c1\nnotify:\n webhooks:\n - url: https://webhook.site/378703d4-2758-42c8-a279-74df95cd78f0\nworkflows:\n version: 2\n workflow:\n jobs:\n - build\n"
+ },
+ "messages": [],
+ "is_first_green_build": false,
+ "job_name": null,
+ "start_time": "2020-06-12T10:25:31.233Z",
+ "canceler": null,
+ "all_commit_details": [
+ {
+ "committer_date": "",
+ "body": "",
+ "branch": "unstable",
+ "author_date": "2020-06-12T09:15:58.000Z",
+ "committer_email": null,
+ "commit": "6b5361c1661581d975e84b68904ae9bfba75d5e5",
+ "committer_login": null,
+ "committer_name": null,
+ "subject": "Initial commit",
+ "commit_url": "https://bitbucket.org/Hypro999/circleci-test/commits/6b5361c1661581d975e84b68904ae9bfba75d5e5",
+ "author_login": null,
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ },
+ {
+ "committer_date": "",
+ "body": "",
+ "branch": "unstable",
+ "author_date": "2020-06-12T10:07:12.000Z",
+ "committer_email": null,
+ "commit": "b04b124883f6d12046383acc376bfa327f369c81",
+ "committer_login": null,
+ "committer_name": null,
+ "subject": "Add a first draft for CircleCI configuration.",
+ "commit_url": "https://bitbucket.org/Hypro999/circleci-test/commits/b04b124883f6d12046383acc376bfa327f369c81",
+ "author_login": null,
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ },
+ {
+ "committer_date": "",
+ "body": "",
+ "branch": "unstable",
+ "author_date": "2020-06-12T10:25:03.000Z",
+ "committer_email": null,
+ "commit": "eaa88f9eac0fad86c46a8fe35462fe2c904d84b1",
+ "committer_login": null,
+ "committer_name": null,
+ "subject": "Add a breaking change.",
+ "commit_url": "https://bitbucket.org/Hypro999/circleci-test/commits/eaa88f9eac0fad86c46a8fe35462fe2c904d84b1",
+ "author_login": null,
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ }
+ ],
+ "platform": "2.0",
+ "outcome": "failed",
+ "vcs_url": "https://bitbucket.org/Hypro999/circleci-test",
+ "author_name": "Hemanth V. Alluri",
+ "node": null,
+ "queued_at": "2020-06-12T10:25:21.595Z",
+ "canceled": false,
+ "author_email": "[email protected]"
+ }
+}
diff --git a/zerver/webhooks/circleci/fixtures/build_failed.json b/zerver/webhooks/circleci/fixtures/build_failed.json
deleted file mode 100644
index e9d03d17866..00000000000
--- a/zerver/webhooks/circleci/fixtures/build_failed.json
+++ /dev/null
@@ -1,420 +0,0 @@
-{
- "payload" : {
- "compare" : "https://github.com/username/RepoName/compare/142cf1303998...542d73ba2ec6",
- "previous_successful_build" : null,
- "build_parameters" : null,
- "oss" : true,
- "all_commit_details_truncated" : false,
- "committer_date" : "2016-05-09T17:56:22+02:00",
- "steps" : [ {
- "name" : "Starting the build",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Starting the build",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:56:37.133Z",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/ad7af93c52d72ec3033b0375-username-RepoName-0-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=U56E5WthVkl4vthJDxn49EPT3tY%3D",
- "start_time" : "2016-05-09T15:56:32.215Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 0,
- "run_time_millis" : 4918,
- "has_output" : true
- } ]
- }, {
- "name" : "Start container",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Start container",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:56:45.279Z",
- "source" : "config",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/dd7af93c52d72ec3533b0375-username-RepoName-1-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=Ghhvg3xlZM0zQqEdsWh4oMJCJUo%3D",
- "start_time" : "2016-05-09T15:56:37.142Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 1,
- "run_time_millis" : 8137,
- "has_output" : true
- } ]
- }, {
- "name" : "Enable SSH",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Enable SSH",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:56:47.139Z",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/0e7af93c52d72ec3d33b0375-username-RepoName-2-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=kEfrvffJwggipBvCgQ4uRjZ11DI%3D",
- "start_time" : "2016-05-09T15:56:45.288Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 2,
- "run_time_millis" : 1851,
- "has_output" : true
- } ]
- }, {
- "name" : "Restore source cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Restore source cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:56:53.366Z",
- "source" : "cache",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/3e7af93c52d72ec3f33b0375-username-RepoName-3-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=6yAGieA6zjfXySs9w4CVW4Bx4%2FM%3D",
- "start_time" : "2016-05-09T15:56:47.147Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 3,
- "run_time_millis" : 6219,
- "has_output" : true
- } ]
- }, {
- "name" : "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:56:57.360Z",
- "source" : "config",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/8e7af93c52d72ec3543b0375-username-RepoName-4-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=%2BwyLffSeEU9%2FeJFdln6PKb%2FEg4Q%3D",
- "start_time" : "2016-05-09T15:56:53.375Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 4,
- "run_time_millis" : 3985,
- "has_output" : true
- } ]
- }, {
- "name" : "Configure the build",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Configure the build",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:00.677Z",
- "source" : "cache",
- "type" : "machine",
- "start_time" : "2016-05-09T15:56:57.368Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 5,
- "run_time_millis" : 3309,
- "has_output" : false
- } ]
- }, {
- "name" : "Restore cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Restore cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:05.053Z",
- "source" : "cache",
- "type" : "machine",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/fe7af93c52d72ec3c43b0375-username-RepoName-6-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=h%2Fz%2Bpe8PEozUBqoocx5i5qXrQNI%3D",
- "start_time" : "2016-05-09T15:57:00.682Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 6,
- "run_time_millis" : 4371,
- "has_output" : true
- } ]
- }, {
- "name" : "virtualenv",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "virtualenv",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:05.989Z",
- "source" : "inference",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/1f7af93c52d72ec3153b0375-username-RepoName-7-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=Ngn5%2FeClV1Tz5hKUyRGaXMB2skE%3D",
- "start_time" : "2016-05-09T15:57:05.062Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 7,
- "run_time_millis" : 927,
- "has_output" : true
- } ]
- }, {
- "name" : "pip install unittest-xml-reporting",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "pip install unittest-xml-reporting",
- "bash_command" : "pip install unittest-xml-reporting",
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:08.365Z",
- "source" : "inference",
- "type" : "dependencies",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/3f7af93c52d72ec3153b0375-username-RepoName-8-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=4IJ5PK5t3u%2FZSzo0dLaE19PKGrM%3D",
- "start_time" : "2016-05-09T15:57:05.997Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 8,
- "run_time_millis" : 2368,
- "has_output" : true
- } ]
- }, {
- "name" : "Save cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Save cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:12.703Z",
- "source" : "cache",
- "type" : "database",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/7f7af93c52d72ec3453b0375-username-RepoName-9-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=GdbHbMuhECyPLVHFJiIPJR%2BJINY%3D",
- "start_time" : "2016-05-09T15:57:08.374Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 9,
- "run_time_millis" : 4329,
- "has_output" : true
- } ]
- }, {
- "name" : "Django Test",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : true,
- "infrastructure_fail" : null,
- "name" : "Django Test",
- "bash_command" : null,
- "status" : "failed",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:14.054Z",
- "source" : "inference",
- "type" : "test",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/008af93c52d72ec3853b0375-username-RepoName-10-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=U6lYXJEbggSqqY0qvw9rwroTtDY%3D",
- "start_time" : "2016-05-09T15:57:12.711Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 10,
- "run_time_millis" : 1343,
- "has_output" : true
- } ]
- }, {
- "name" : "Collect test metadata",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Collect test metadata",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:18.012Z",
- "type" : "teardown",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/308af93c52d72ec3a53b0375-username-RepoName-11-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=Aj8%2BrJEk7t9QInbbOn%2FcJii9PmE%3D",
- "start_time" : "2016-05-09T15:57:14.126Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 11,
- "run_time_millis" : 3886,
- "has_output" : true
- } ]
- }, {
- "name" : "Collect artifacts",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Collect artifacts",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:26.013Z",
- "type" : "teardown",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/608af93c52d72ec3e53b0375-username-RepoName-12-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582860&Signature=OngeuO58QxmiDkD5tKQ31RXK%2FmI%3D",
- "start_time" : "2016-05-09T15:57:18.020Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 12,
- "run_time_millis" : 7993,
- "has_output" : true
- } ]
- }, {
- "name" : "Disable SSH",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Disable SSH",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T15:57:26.026Z",
- "type" : "teardown",
- "start_time" : "2016-05-09T15:57:26.022Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 15,
- "run_time_millis" : 4,
- "has_output" : false
- } ]
- } ],
- "body" : "",
- "usage_queued_at" : "2016-05-09T15:58:04.783Z",
- "retry_of" : null,
- "reponame" : "RepoName",
- "ssh_users" : [ ],
- "build_url" : "https://circleci.com/gh/username/project/build_number",
- "parallel" : 1,
- "failed" : true,
- "branch" : "master",
- "username" : "username",
- "author_date" : "2016-05-09T17:56:22+02:00",
- "why" : "github",
- "user" : {
- "vcs_type" : "github",
- "id" : "5993758",
- "name" : "User name",
- "login" : "username",
- "avatar_url" : "https://avatars.githubusercontent.com/u/5993758?v=3",
- "is_user" : true
- },
- "vcs_revision" : "542d73ba2ec6b97dff4403bc92b3f874362f04e1",
- "owners" : [ "username" ],
- "vcs_tag" : null,
- "build_num" : 4,
- "infrastructure_fail" : false,
- "committer_email" : "[email protected]",
- "previous" : {
- "build_num" : 3,
- "status" : "success",
- "build_time_millis" : 48997
- },
- "status" : "failed",
- "committer_name" : "User name",
- "pull_request_urls" : [ ],
- "retries" : null,
- "subject" : "b",
- "vcs_type" : "github",
- "timedout" : false,
- "dont_build" : null,
- "lifecycle" : "finished",
- "no_dependency_cache" : false,
- "stop_time" : "2016-05-09T15:57:26.571Z",
- "ssh_disabled" : false,
- "build_time_millis" : 55383,
- "circle_yml" : {
- "string" : "general:\n build_dir: circlecitest\n\nnotify:\n webhooks:\n # A list of hook hashes, containing the URL field\n - url: http://requestb.in/vrfwumvr\n"
- },
- "messages" : [ ],
- "is_first_green_build" : false,
- "job_name" : null,
- "start_time" : "2016-05-09T15:56:31.188Z",
- "canceler" : null,
- "all_commit_details" : [ {
- "committer_date" : "2016-05-09T17:56:22+02:00",
- "body" : "",
- "branch" : "master",
- "author_date" : "2016-05-09T17:56:22+02:00",
- "committer_email" : "[email protected]",
- "commit" : "542d73ba2ec6b97dff4403bc92b3f874362f04e1",
- "committer_login" : null,
- "committer_name" : "User name",
- "subject" : "b",
- "commit_url" : "https://github.com/username/RepoName/commit/542d73ba2ec6b97dff4403bc92b3f874362f04e1",
- "author_login" : null,
- "author_name" : "User name",
- "author_email" : "[email protected]"
- } ],
- "outcome" : "failed",
- "vcs_url" : "https://github.com/username/RepoName",
- "author_name" : "User name",
- "node" : [ {
- "public_ip_addr" : "54.205.70.160",
- "port" : 64668,
- "username" : "ubuntu",
- "image_id" : "s3://lxc-images/circletar-1741-cc586-20160424T232626Z",
- "ssh_enabled" : null
- } ],
- "queued_at" : "2016-05-09T15:56:31.170Z",
- "canceled" : false,
- "author_email" : "[email protected]"
-}
-}
diff --git a/zerver/webhooks/circleci/fixtures/build_failed_when_previous_build_failed.json b/zerver/webhooks/circleci/fixtures/build_failed_when_previous_build_failed.json
deleted file mode 100644
index b5b671cbd8f..00000000000
--- a/zerver/webhooks/circleci/fixtures/build_failed_when_previous_build_failed.json
+++ /dev/null
@@ -1,420 +0,0 @@
-{
- "payload": {
- "compare" : "https://github.com/username/Reponame/compare/542d73ba2ec6...121749a519b4",
- "previous_successful_build" : null,
- "build_parameters" : null,
- "oss" : true,
- "all_commit_details_truncated" : false,
- "committer_date" : "2016-05-09T18:22:50+02:00",
- "steps" : [ {
- "name" : "Starting the build",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Starting the build",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:03.210Z",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/161ea23dd240f9a2269b0375-username-Reponame-0-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=p0TgETxXRD%2FA2MumxR8PgmJyVcM%3D",
- "start_time" : "2016-05-09T16:22:58.711Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 0,
- "run_time_millis" : 4499,
- "has_output" : true
- } ]
- }, {
- "name" : "Start container",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Start container",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:11.490Z",
- "source" : "config",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/461ea23dd240f9a2769b0375-username-Reponame-1-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=tOJMjHqHUowvmFtOOurcKbMPZow%3D",
- "start_time" : "2016-05-09T16:23:03.220Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 1,
- "run_time_millis" : 8270,
- "has_output" : true
- } ]
- }, {
- "name" : "Enable SSH",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Enable SSH",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:13.986Z",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/d61ea23dd240f9a2f69b0375-username-Reponame-2-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=29KEAOYKipW45BoUxJOO1nwv4wk%3D",
- "start_time" : "2016-05-09T16:23:11.502Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 2,
- "run_time_millis" : 2484,
- "has_output" : true
- } ]
- }, {
- "name" : "Restore source cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Restore source cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:15.956Z",
- "source" : "cache",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/171ea23dd240f9a2179b0375-username-Reponame-3-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=%2B2c6%2FwQIImOswwfTj3bBxB1J6vQ%3D",
- "start_time" : "2016-05-09T16:23:13.997Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 3,
- "run_time_millis" : 1959,
- "has_output" : true
- } ]
- }, {
- "name" : "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:19.084Z",
- "source" : "config",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/471ea23dd240f9a2379b0375-username-Reponame-4-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=Mfe4SJjuPi7tvHEWGFLrpidi1Pk%3D",
- "start_time" : "2016-05-09T16:23:15.967Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 4,
- "run_time_millis" : 3117,
- "has_output" : true
- } ]
- }, {
- "name" : "Configure the build",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Configure the build",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:22.428Z",
- "source" : "cache",
- "type" : "machine",
- "start_time" : "2016-05-09T16:23:19.095Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 5,
- "run_time_millis" : 3333,
- "has_output" : false
- } ]
- }, {
- "name" : "Restore cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Restore cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:26.210Z",
- "source" : "cache",
- "type" : "machine",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/b71ea23dd240f9a2a79b0375-username-Reponame-6-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=nrzvxQzvTIsD7z2LeOvZbO7U6Ms%3D",
- "start_time" : "2016-05-09T16:23:22.436Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 6,
- "run_time_millis" : 3774,
- "has_output" : true
- } ]
- }, {
- "name" : "virtualenv",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "virtualenv",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:27.257Z",
- "source" : "inference",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/281ea23dd240f9a2e79b0375-username-Reponame-7-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=CcNL7dnkFIBB%2FHvUvf%2BFA%2FIPZUE%3D",
- "start_time" : "2016-05-09T16:23:26.220Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 7,
- "run_time_millis" : 1037,
- "has_output" : true
- } ]
- }, {
- "name" : "pip install unittest-xml-reporting",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "pip install unittest-xml-reporting",
- "bash_command" : "pip install unittest-xml-reporting",
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:28.892Z",
- "source" : "inference",
- "type" : "dependencies",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/381ea23dd240f9a2f79b0375-username-Reponame-8-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=cS%2FgBkQvRmIn51mmB4Myh60qsTw%3D",
- "start_time" : "2016-05-09T16:23:27.264Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 8,
- "run_time_millis" : 1628,
- "has_output" : true
- } ]
- }, {
- "name" : "Save cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Save cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:31.780Z",
- "source" : "cache",
- "type" : "database",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/481ea23dd240f9a2089b0375-username-Reponame-9-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=OfncCSVgIy%2BYaFHOmyFTdmqOjjo%3D",
- "start_time" : "2016-05-09T16:23:28.902Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 9,
- "run_time_millis" : 2878,
- "has_output" : true
- } ]
- }, {
- "name" : "Django Test",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : true,
- "infrastructure_fail" : null,
- "name" : "Django Test",
- "bash_command" : null,
- "status" : "failed",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:33.042Z",
- "source" : "inference",
- "type" : "test",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/981ea23dd240f9a2389b0375-username-Reponame-10-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=bjhmjnFFshuh9KXBfbUQ8hDn8uc%3D",
- "start_time" : "2016-05-09T16:23:31.790Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 10,
- "run_time_millis" : 1252,
- "has_output" : true
- } ]
- }, {
- "name" : "Collect test metadata",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Collect test metadata",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:36.172Z",
- "type" : "teardown",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/c81ea23dd240f9a2589b0375-username-Reponame-11-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=XfMdL56Tb9GeUYODrSb5b3c8PJQ%3D",
- "start_time" : "2016-05-09T16:23:33.157Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 11,
- "run_time_millis" : 3015,
- "has_output" : true
- } ]
- }, {
- "name" : "Collect artifacts",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Collect artifacts",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:43.665Z",
- "type" : "teardown",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/291ea23dd240f9a2889b0375-username-Reponame-12-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578441&Signature=pUoU792ReOgVVPuP6%2F2kKqtqU%2F4%3D",
- "start_time" : "2016-05-09T16:23:36.182Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 12,
- "run_time_millis" : 7483,
- "has_output" : true
- } ]
- }, {
- "name" : "Disable SSH",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Disable SSH",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:23:43.684Z",
- "type" : "teardown",
- "start_time" : "2016-05-09T16:23:43.676Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 15,
- "run_time_millis" : 8,
- "has_output" : false
- } ]
- } ],
- "body" : "",
- "usage_queued_at" : "2016-05-09T16:24:36.416Z",
- "retry_of" : null,
- "reponame" : "RepoName",
- "ssh_users" : [ ],
- "build_url" : "https://circleci.com/gh/username/project/build_number",
- "parallel" : 1,
- "failed" : true,
- "branch" : "master",
- "username" : "username",
- "author_date" : "2016-05-09T18:22:50+02:00",
- "why" : "github",
- "user" : {
- "vcs_type" : "github",
- "id" : "5993758",
- "name" : "User name",
- "login" : "username",
- "avatar_url" : "https://avatars.githubusercontent.com/u/5993758?v=3",
- "is_user" : true
- },
- "vcs_revision" : "121749a519b438f3f006e184abc840e70d456d47",
- "owners" : [ "username" ],
- "vcs_tag" : null,
- "build_num" : 5,
- "infrastructure_fail" : false,
- "committer_email" : "[email protected]",
- "previous" : {
- "build_num" : 4,
- "status" : "failed",
- "build_time_millis" : 55383
- },
- "status" : "failed",
- "committer_name" : "User name",
- "pull_request_urls" : [ ],
- "retries" : null,
- "subject" : "c",
- "vcs_type" : "github",
- "timedout" : false,
- "dont_build" : null,
- "lifecycle" : "finished",
- "no_dependency_cache" : false,
- "stop_time" : "2016-05-09T16:23:45.180Z",
- "ssh_disabled" : false,
- "build_time_millis" : 48814,
- "circle_yml" : {
- "string" : "general:\n build_dir: circlecitest\n\nnotify:\n webhooks:\n # A list of hook hashes, containing the URL field\n - url: http://requestb.in/vrfwumvr\n"
- },
- "messages" : [ ],
- "is_first_green_build" : false,
- "job_name" : null,
- "start_time" : "2016-05-09T16:22:56.366Z",
- "canceler" : null,
- "all_commit_details" : [ {
- "committer_date" : "2016-05-09T18:22:50+02:00",
- "body" : "",
- "branch" : "master",
- "author_date" : "2016-05-09T18:22:50+02:00",
- "committer_email" : "[email protected]",
- "commit" : "121749a519b438f3f006e184abc840e70d456d47",
- "committer_login" : null,
- "committer_name" : "User name",
- "subject" : "c",
- "commit_url" : "https://github.com/username/Reponame/commit/121749a519b438f3f006e184abc840e70d456d47",
- "author_login" : null,
- "author_name" : "User name",
- "author_email" : "[email protected]"
- } ],
- "outcome" : "failed",
- "vcs_url" : "https://github.com/username/Reponame",
- "author_name" : "User name",
- "node" : [ {
- "public_ip_addr" : "54.92.202.154",
- "port" : 64744,
- "username" : "ubuntu",
- "image_id" : "s3://lxc-images/circletar-1741-cc586-20160424T232626Z",
- "ssh_enabled" : null
- } ],
- "queued_at" : "2016-05-09T16:22:56.350Z",
- "canceled" : false,
- "author_email" : "[email protected]"
- }
-}
diff --git a/zerver/webhooks/circleci/fixtures/build_passed.json b/zerver/webhooks/circleci/fixtures/build_passed.json
deleted file mode 100644
index dc35edb0646..00000000000
--- a/zerver/webhooks/circleci/fixtures/build_passed.json
+++ /dev/null
@@ -1,500 +0,0 @@
-{
- "payload": {
- "compare": "https://github.com/username/RepoName/compare/6920bd506184...73d745dc5cca",
- "previous_successful_build": {
- "build_num": 8,
- "status": "success",
- "build_time_millis": 49544
- },
- "build_parameters": null,
- "oss": true,
- "all_commit_details_truncated": false,
- "committer_date": "2016-05-09T19:43:03+02:00",
- "steps": [
- {
- "name": "Starting the build",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": false,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Starting the build",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:11.048Z",
- "type": "infrastructure",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/de671c76626a34dcddcc0375-username-RepoName-0-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=gkBS%2BwBFiC4jDuxzXrAyCn6heFE%3D",
- "start_time": "2016-05-09T17:46:05.952Z",
- "exit_code": null,
- "canceled": null,
- "step": 0,
- "run_time_millis": 5096,
- "has_output": true
- }
- ]
- },
- {
- "name": "Start container",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Start container",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:19.152Z",
- "source": "config",
- "type": "infrastructure",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/0f671c76626a34dc3ecc0375-username-RepoName-1-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=LREfyz00wuzwKXie4kOEnLLPyoE%3D",
- "start_time": "2016-05-09T17:46:11.056Z",
- "exit_code": 0,
- "canceled": null,
- "step": 1,
- "run_time_millis": 8096,
- "has_output": true
- }
- ]
- },
- {
- "name": "Enable SSH",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Enable SSH",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:21.010Z",
- "type": "infrastructure",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/1f671c76626a34dcbecc0375-username-RepoName-2-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=rPk2hDVW0sky4hfh0PHO43OwGsw%3D",
- "start_time": "2016-05-09T17:46:19.158Z",
- "exit_code": null,
- "canceled": null,
- "step": 2,
- "run_time_millis": 1852,
- "has_output": true
- }
- ]
- },
- {
- "name": "Restore source cache",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": false,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Restore source cache",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:22.866Z",
- "source": "cache",
- "type": "checkout",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/3f671c76626a34dcdecc0375-username-RepoName-3-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=3mXDVeKbeGQ%2BIRNs7C5HXqCBpXM%3D",
- "start_time": "2016-05-09T17:46:21.018Z",
- "exit_code": null,
- "canceled": null,
- "step": 3,
- "run_time_millis": 1848,
- "has_output": true
- }
- ]
- },
- {
- "name": "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:25.856Z",
- "source": "config",
- "type": "checkout",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/5f671c76626a34dceecc0375-username-RepoName-4-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=CqqLgI7Jfk943kqbaPwsIqfnuEo%3D",
- "start_time": "2016-05-09T17:46:22.874Z",
- "exit_code": 0,
- "canceled": null,
- "step": 4,
- "run_time_millis": 2982,
- "has_output": true
- }
- ]
- },
- {
- "name": "Configure the build",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": false,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Configure the build",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:29.178Z",
- "source": "cache",
- "type": "machine",
- "start_time": "2016-05-09T17:46:25.863Z",
- "exit_code": null,
- "canceled": null,
- "step": 5,
- "run_time_millis": 3315,
- "has_output": false
- }
- ]
- },
- {
- "name": "Restore cache",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": false,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Restore cache",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:35.855Z",
- "source": "cache",
- "type": "machine",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/9f671c76626a34dc5fcc0375-username-RepoName-6-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=p3pdN63VBafFplCOVi8KmlMCnbE%3D",
- "start_time": "2016-05-09T17:46:29.183Z",
- "exit_code": null,
- "canceled": null,
- "step": 6,
- "run_time_millis": 6672,
- "has_output": true
- }
- ]
- },
- {
- "name": "virtualenv",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "virtualenv",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:36.790Z",
- "source": "inference",
- "type": "checkout",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/00771c76626a34dcbfcc0375-username-RepoName-7-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=ldi9Ac1pbpOLnbUYO8tP112OWTo%3D",
- "start_time": "2016-05-09T17:46:35.862Z",
- "exit_code": 0,
- "canceled": null,
- "step": 7,
- "run_time_millis": 928,
- "has_output": true
- }
- ]
- },
- {
- "name": "pip install",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "pip install",
- "bash_command": "if [ -e requirements.txt ]; then pip install -r requirements.txt;else pip install -r requirements.pip;fi",
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:38.323Z",
- "source": "inference",
- "type": "dependencies",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/20771c76626a34dccfcc0375-username-RepoName-8-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=ydUob0Rmh4UKSp4KWio9D2tdTp4%3D",
- "start_time": "2016-05-09T17:46:36.797Z",
- "exit_code": 0,
- "canceled": null,
- "step": 8,
- "run_time_millis": 1526,
- "has_output": true
- }
- ]
- },
- {
- "name": "pip install unittest-xml-reporting",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "pip install unittest-xml-reporting",
- "bash_command": "pip install unittest-xml-reporting",
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:39.857Z",
- "source": "inference",
- "type": "dependencies",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/40771c76626a34dcefcc0375-username-RepoName-9-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=QfIcBYxW%2Fz73Q09Q8%2BZsjoOHzAc%3D",
- "start_time": "2016-05-09T17:46:38.330Z",
- "exit_code": 0,
- "canceled": null,
- "step": 9,
- "run_time_millis": 1527,
- "has_output": true
- }
- ]
- },
- {
- "name": "Save cache",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": false,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Save cache",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:42.148Z",
- "source": "cache",
- "type": "database",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/50771c76626a34dcffcc0375-username-RepoName-10-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=domD%2FzJ3QcinZjNXYvqfEQuEIWg%3D",
- "start_time": "2016-05-09T17:46:39.864Z",
- "exit_code": null,
- "canceled": null,
- "step": 10,
- "run_time_millis": 2284,
- "has_output": true
- }
- ]
- },
- {
- "name": "Django Test",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": false,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Django Test",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:44.609Z",
- "source": "inference",
- "type": "test",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/70771c76626a34dc20dc0375-username-RepoName-11-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=kZhXMO7XgJ95e3WoLYg3CSAr2Og%3D",
- "start_time": "2016-05-09T17:46:42.156Z",
- "exit_code": 0,
- "canceled": null,
- "step": 11,
- "run_time_millis": 2453,
- "has_output": true
- }
- ]
- },
- {
- "name": "Collect test metadata",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Collect test metadata",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:47.500Z",
- "type": "teardown",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/b0771c76626a34dc40dc0375-username-RepoName-12-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=jSZgba9ChMgK5QA5tec62CKWvno%3D",
- "start_time": "2016-05-09T17:46:44.618Z",
- "exit_code": null,
- "canceled": null,
- "step": 12,
- "run_time_millis": 2882,
- "has_output": true
- }
- ]
- },
- {
- "name": "Collect artifacts",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Collect artifacts",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:54.636Z",
- "type": "teardown",
- "output_url": "https://circle-production-action-output.s3.amazonaws.com/f0771c76626a34dc70dc0375-username-RepoName-13-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620582546&Signature=S7xM9ekaaHdWBG1woewGaZ%2FyeAU%3D",
- "start_time": "2016-05-09T17:46:47.507Z",
- "exit_code": null,
- "canceled": null,
- "step": 13,
- "run_time_millis": 7129,
- "has_output": true
- }
- ]
- },
- {
- "name": "Disable SSH",
- "actions": [
- {
- "truncated": false,
- "index": 0,
- "parallel": true,
- "failed": null,
- "infrastructure_fail": null,
- "name": "Disable SSH",
- "bash_command": null,
- "status": "success",
- "timedout": null,
- "continue": null,
- "end_time": "2016-05-09T17:46:54.646Z",
- "type": "teardown",
- "start_time": "2016-05-09T17:46:54.643Z",
- "exit_code": null,
- "canceled": null,
- "step": 16,
- "run_time_millis": 3,
- "has_output": false
- }
- ]
- }
- ],
- "body": "",
- "usage_queued_at": "2016-05-09T17:47:40.500Z",
- "retry_of": null,
- "reponame": "RepoName",
- "ssh_users": [],
- "build_url": "https://circleci.com/gh/username/project/build_number",
- "parallel": 1,
- "failed": null,
- "branch": "master",
- "username": "username",
- "author_date": "2016-05-09T19:43:03+02:00",
- "why": "github",
- "user": {
- "vcs_type": "github",
- "id": "5993758",
- "name": "User name",
- "login": "username",
- "avatar_url": "https://avatars.githubusercontent.com/u/5993758?v=3",
- "is_user": true
- },
- "vcs_revision": "73d745dc5cca92ebbb326304426536df50cc6a94",
- "owners": [
- "username"
- ],
- "vcs_tag": null,
- "build_num": 9,
- "infrastructure_fail": false,
- "committer_email": "[email protected]",
- "previous": {
- "build_num": 8,
- "status": "success",
- "build_time_millis": 49544
- },
- "status": "success",
- "committer_name": "User name",
- "pull_request_urls": [],
- "retries": null,
- "subject": "f",
- "vcs_type": "github",
- "timedout": false,
- "dont_build": null,
- "lifecycle": "finished",
- "no_dependency_cache": false,
- "stop_time": "2016-05-09T17:46:55.355Z",
- "ssh_disabled": false,
- "build_time_millis": 50717,
- "circle_yml": {
- "string": "general:\n build_dir: circlecitest\n\nnotify:\n webhooks:\n # A list of hook hashes, containing the URL field\n - url: http://requestb.in/vrfwumvr\n"
- },
- "messages": [],
- "is_first_green_build": false,
- "job_name": null,
- "start_time": "2016-05-09T17:46:04.638Z",
- "canceler": null,
- "all_commit_details": [
- {
- "committer_date": "2016-05-09T19:43:03+02:00",
- "body": "",
- "branch": "master",
- "author_date": "2016-05-09T19:43:03+02:00",
- "committer_email": "[email protected]",
- "commit": "73d745dc5cca92ebbb326304426536df50cc6a94",
- "committer_login": null,
- "committer_name": "User name",
- "subject": "f",
- "commit_url": "https://github.com/username/RepoName/commit/73d745dc5cca92ebbb326304426536df50cc6a94",
- "author_login": null,
- "author_name": "User name",
- "author_email": "[email protected]"
- }
- ],
- "outcome": "success",
- "vcs_url": "https://github.com/username/RepoName",
- "author_name": "User name",
- "node": [
- {
- "public_ip_addr": "54.242.71.11",
- "port": 64558,
- "username": "ubuntu",
- "image_id": "s3://lxc-images/circletar-1741-cc586-20160424T232626Z",
- "ssh_enabled": null
- }
- ],
- "queued_at": "2016-05-09T17:46:04.611Z",
- "canceled": false,
- "author_email": "[email protected]"
- }
-}
diff --git a/zerver/webhooks/circleci/fixtures/build_passed_when_previous_build_failed.json b/zerver/webhooks/circleci/fixtures/build_passed_when_previous_build_failed.json
deleted file mode 100644
index 5051a0cf1a6..00000000000
--- a/zerver/webhooks/circleci/fixtures/build_passed_when_previous_build_failed.json
+++ /dev/null
@@ -1,444 +0,0 @@
-{
- "payload" : {
- "compare" : "https://github.com/username/RepoName/compare/121749a519b4...c0f76dfc012f",
- "previous_successful_build" : null,
- "build_parameters" : null,
- "oss" : true,
- "all_commit_details_truncated" : false,
- "committer_date" : "2016-05-09T18:25:34+02:00",
- "steps" : [ {
- "name" : "Starting the build",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Starting the build",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:25:45.993Z",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/5eade62b422d8e0460ab0375-username-RepoName-0-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=cxKqfIZ8Yr0ygt%2B5sAm%2FVDQgHN0%3D",
- "start_time" : "2016-05-09T16:25:42.204Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 0,
- "run_time_millis" : 3789,
- "has_output" : true
- } ]
- }, {
- "name" : "Start container",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Start container",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:25:53.597Z",
- "source" : "config",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/beade62b422d8e04a0ab0375-username-RepoName-1-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=y%2BOoCkevqg%2BifrgIee5Q3h71kGc%3D",
- "start_time" : "2016-05-09T16:25:46.004Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 1,
- "run_time_millis" : 7593,
- "has_output" : true
- } ]
- }, {
- "name" : "Enable SSH",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Enable SSH",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:25:55.459Z",
- "type" : "infrastructure",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/2fade62b422d8e0411ab0375-username-RepoName-2-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=omLU6%2BvqubBKsDAEVVv9tvCCB7k%3D",
- "start_time" : "2016-05-09T16:25:53.607Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 2,
- "run_time_millis" : 1852,
- "has_output" : true
- } ]
- }, {
- "name" : "Restore source cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Restore source cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:25:57.332Z",
- "source" : "cache",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/5fade62b422d8e0431ab0375-username-RepoName-3-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=4JT4wuSF2vJ370y%2FjixbO%2Bgkc0E%3D",
- "start_time" : "2016-05-09T16:25:55.474Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 3,
- "run_time_millis" : 1858,
- "has_output" : true
- } ]
- }, {
- "name" : "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Checkout using deploy key: 60:9e:22:1b:ea:bf:15:c5:27:89:ce:c1:b7:38:a5:f9",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:00.326Z",
- "source" : "config",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/afade62b422d8e0451ab0375-username-RepoName-4-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=k%2F0VjERtGTfhLbqTAM8xSV5bBkI%3D",
- "start_time" : "2016-05-09T16:25:57.343Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 4,
- "run_time_millis" : 2983,
- "has_output" : true
- } ]
- }, {
- "name" : "Configure the build",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Configure the build",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:03.759Z",
- "source" : "cache",
- "type" : "machine",
- "start_time" : "2016-05-09T16:26:00.339Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 5,
- "run_time_millis" : 3420,
- "has_output" : false
- } ]
- }, {
- "name" : "Restore cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Restore cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:08.042Z",
- "source" : "cache",
- "type" : "machine",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/60bde62b422d8e04b1ab0375-username-RepoName-6-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=DQzXJI6lgYcDJgejP5C0H6DV%2FbI%3D",
- "start_time" : "2016-05-09T16:26:03.767Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 6,
- "run_time_millis" : 4275,
- "has_output" : true
- } ]
- }, {
- "name" : "virtualenv",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "virtualenv",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:09.189Z",
- "source" : "inference",
- "type" : "checkout",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/21bde62b422d8e0402ab0375-username-RepoName-7-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=7whfw8yk60wpGva%2F71EGiWXsOg8%3D",
- "start_time" : "2016-05-09T16:26:08.057Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 7,
- "run_time_millis" : 1132,
- "has_output" : true
- } ]
- }, {
- "name" : "pip install",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "pip install",
- "bash_command" : "if [ -e requirements.txt ]; then pip install -r requirements.txt;else pip install -r requirements.pip;fi",
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:14.945Z",
- "source" : "inference",
- "type" : "dependencies",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/51bde62b422d8e0412ab0375-username-RepoName-8-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=PYE5r2uXxC%2FLBWlZWEbMSZ1C7GU%3D",
- "start_time" : "2016-05-09T16:26:09.200Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 8,
- "run_time_millis" : 5745,
- "has_output" : true
- } ]
- }, {
- "name" : "pip install unittest-xml-reporting",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "pip install unittest-xml-reporting",
- "bash_command" : "pip install unittest-xml-reporting",
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:16.384Z",
- "source" : "inference",
- "type" : "dependencies",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/d1bde62b422d8e0462ab0375-username-RepoName-9-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=EgtGZjFUiDWYxIPfTWjg94EyQTc%3D",
- "start_time" : "2016-05-09T16:26:14.955Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 9,
- "run_time_millis" : 1429,
- "has_output" : true
- } ]
- }, {
- "name" : "Save cache",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Save cache",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:18.771Z",
- "source" : "cache",
- "type" : "database",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/e1bde62b422d8e0482ab0375-username-RepoName-10-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=FhkEAniF7JIrOHGfmsS1XtKevMI%3D",
- "start_time" : "2016-05-09T16:26:16.396Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 10,
- "run_time_millis" : 2375,
- "has_output" : true
- } ]
- }, {
- "name" : "Django Test",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : false,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Django Test",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:21.439Z",
- "source" : "inference",
- "type" : "test",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/52bde62b422d8e04a2ab0375-username-RepoName-11-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=FJaniKNlY0ykw0qzrVdIaTC2kuc%3D",
- "start_time" : "2016-05-09T16:26:18.781Z",
- "exit_code" : 0,
- "canceled" : null,
- "step" : 11,
- "run_time_millis" : 2658,
- "has_output" : true
- } ]
- }, {
- "name" : "Collect test metadata",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Collect test metadata",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:24.460Z",
- "type" : "teardown",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/03bde62b422d8e04d2ab0375-username-RepoName-12-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=ExznOhAUWhpxY4WRvoypgddKQY4%3D",
- "start_time" : "2016-05-09T16:26:21.455Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 12,
- "run_time_millis" : 3005,
- "has_output" : true
- } ]
- }, {
- "name" : "Collect artifacts",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Collect artifacts",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:31.685Z",
- "type" : "teardown",
- "output_url" : "https://circle-production-action-output.s3.amazonaws.com/43bde62b422d8e0403ab0375-username-RepoName-13-0?AWSAccessKeyId=AKIAIJNI6FA5RIAFFQ7Q&Expires=1620578384&Signature=voj0Zme8e9LJCCNcZZKKk5gvCgM%3D",
- "start_time" : "2016-05-09T16:26:24.468Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 13,
- "run_time_millis" : 7217,
- "has_output" : true
- } ]
- }, {
- "name" : "Disable SSH",
- "actions" : [ {
- "truncated" : false,
- "index" : 0,
- "parallel" : true,
- "failed" : null,
- "infrastructure_fail" : null,
- "name" : "Disable SSH",
- "bash_command" : null,
- "status" : "success",
- "timedout" : null,
- "continue" : null,
- "end_time" : "2016-05-09T16:26:31.698Z",
- "type" : "teardown",
- "start_time" : "2016-05-09T16:26:31.694Z",
- "exit_code" : null,
- "canceled" : null,
- "step" : 16,
- "run_time_millis" : 4,
- "has_output" : false
- } ]
- } ],
- "body" : "",
- "usage_queued_at" : "2016-05-09T16:26:57.407Z",
- "retry_of" : null,
- "reponame" : "RepoName",
- "ssh_users" : [ ],
- "build_url" : "https://circleci.com/gh/username/project/build_number",
- "parallel" : 1,
- "failed" : null,
- "branch" : "master",
- "username" : "username",
- "author_date" : "2016-05-09T18:25:34+02:00",
- "why" : "github",
- "user" : {
- "vcs_type" : "github",
- "id" : "5993758",
- "name" : "User name",
- "login" : "username",
- "avatar_url" : "https://avatars.githubusercontent.com/u/5993758?v=3",
- "is_user" : true
- },
- "vcs_revision" : "c0f76dfc012f1fcf083e3fb1127708889e041325",
- "owners" : [ "username" ],
- "vcs_tag" : null,
- "build_num" : 6,
- "infrastructure_fail" : false,
- "committer_email" : "[email protected]",
- "previous" : {
- "build_num" : 5,
- "status" : "failed",
- "build_time_millis" : 48814
- },
- "status" : "fixed",
- "committer_name" : "User name",
- "pull_request_urls" : [ ],
- "retries" : null,
- "subject" : "d",
- "vcs_type" : "github",
- "timedout" : false,
- "dont_build" : null,
- "lifecycle" : "finished",
- "no_dependency_cache" : false,
- "stop_time" : "2016-05-09T16:26:32.373Z",
- "ssh_disabled" : false,
- "build_time_millis" : 51483,
- "circle_yml" : {
- "string" : "general:\n build_dir: circlecitest\n\nnotify:\n webhooks:\n # A list of hook hashes, containing the URL field\n - url: http://requestb.in/vrfwumvr\n"
- },
- "messages" : [ ],
- "is_first_green_build" : true,
- "job_name" : null,
- "start_time" : "2016-05-09T16:25:40.890Z",
- "canceler" : null,
- "all_commit_details" : [ {
- "committer_date" : "2016-05-09T18:25:34+02:00",
- "body" : "",
- "branch" : "master",
- "author_date" : "2016-05-09T18:25:34+02:00",
- "committer_email" : "[email protected]",
- "commit" : "c0f76dfc012f1fcf083e3fb1127708889e041325",
- "committer_login" : null,
- "committer_name" : "User name",
- "subject" : "d",
- "commit_url" : "https://github.com/username/RepoName/commit/c0f76dfc012f1fcf083e3fb1127708889e041325",
- "author_login" : null,
- "author_name" : "User name",
- "author_email" : "[email protected]"
- } ],
- "outcome" : "success",
- "vcs_url" : "https://github.com/username/RepoName",
- "author_name" : "User name",
- "node" : [ {
- "public_ip_addr" : "54.91.89.142",
- "port" : 64766,
- "username" : "ubuntu",
- "image_id" : "s3://lxc-images/circletar-1741-cc586-20160424T232626Z",
- "ssh_enabled" : null
- } ],
- "queued_at" : "2016-05-09T16:25:40.876Z",
- "canceled" : false,
- "author_email" : "[email protected]"
- }
-}
diff --git a/zerver/webhooks/circleci/fixtures/github_bionic_backend_frontend_failure.json b/zerver/webhooks/circleci/fixtures/github_bionic_backend_frontend_failure.json
new file mode 100755
index 00000000000..705eeef699a
--- /dev/null
+++ b/zerver/webhooks/circleci/fixtures/github_bionic_backend_frontend_failure.json
@@ -0,0 +1,656 @@
+{
+ "payload": {
+ "compare": null,
+ "previous_successful_build": {
+ "build_num": 1422,
+ "status": "success",
+ "build_time_millis": 40755
+ },
+ "build_parameters": {
+ "CIRCLE_JOB": "bionic-backend-frontend"
+ },
+ "oss": true,
+ "all_commit_details_truncated": false,
+ "committer_date": "2020-06-12T13:33:46.000Z",
+ "steps": [
+ {
+ "name": "Spin Up Environment",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Spin Up Environment",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:38:14.862Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:37:48.940Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 0,
+ "run_time_millis": 25922,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Preparing Environment Variables",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Preparing Environment Variables",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:38:15.163Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:38:15.143Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 99,
+ "run_time_millis": 20,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Checkout code",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Checkout code",
+ "bash_command": "#!/bin/sh\nset -e\n\n# Workaround old docker images with incorrect $HOME\n# check https://github.com/docker/docker/issues/2968 for details\nif [ \"${HOME}\" = \"/\" ]\nthen\n export HOME=$(getent passwd $(id -un) | cut -d: -f6)\nfi\n\necho Using SSH Config Dir $SSH_CONFIG_DIR\n\nmkdir -p $SSH_CONFIG_DIR\n\necho 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\nbitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==\n' >> $SSH_CONFIG_DIR/known_hosts\n\n(umask 077; touch $SSH_CONFIG_DIR/id_rsa)\nchmod 0600 $SSH_CONFIG_DIR/id_rsa\n(cat <<EOF > $SSH_CONFIG_DIR/id_rsa\n$CHECKOUT_KEY\nEOF\n)\n\nexport GIT_SSH_COMMAND='ssh -i $SSH_CONFIG_DIR/id_rsa -o UserKnownHostsFile=$SSH_CONFIG_DIR/known_hosts'\n\n# use git+ssh instead of https\ngit config --global url.\"ssh://[email protected]\".insteadOf \"https://github.com\" || true\ngit config --global gc.auto 0 || true\n\nif [ -e /home/circleci/zulip/.git ]\nthen\n cd /home/circleci/zulip\n git remote set-url origin \"$CIRCLE_REPOSITORY_URL\" || true\nelse\n mkdir -p /home/circleci/zulip\n cd /home/circleci/zulip\n git clone \"$CIRCLE_REPOSITORY_URL\" .\nfi\n\nif [ -n \"$CIRCLE_TAG\" ]\nthen\n git fetch --force origin \"refs/tags/${CIRCLE_TAG}\"\nelse\n git fetch --force origin \"circleci:remotes/origin/circleci\"\nfi\n\n\nif [ -n \"$CIRCLE_TAG\" ]\nthen\n git reset --hard \"$CIRCLE_SHA1\"\n git checkout -q \"$CIRCLE_TAG\"\nelif [ -n \"$CIRCLE_BRANCH\" ]\nthen\n git reset --hard \"$CIRCLE_SHA1\"\n git checkout -q -B \"$CIRCLE_BRANCH\"\nfi\n\ngit reset --hard \"$CIRCLE_SHA1\"",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:38:28.848Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:38:15.176Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 101,
+ "run_time_millis": 13672,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "create cache directories",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "create cache directories",
+ "bash_command": "#!/bin/bash -eo pipefail\ndirs=(/srv/zulip-{npm,venv,emoji}-cache)\nsudo mkdir -p \"${dirs[@]}\"\nsudo chown -R circleci \"${dirs[@]}\"\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:38:28.889Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:38:28.854Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 102,
+ "run_time_millis": 35,
+ "has_output": false
+ }
+ ]
+ },
+ {
+ "name": "do Bionic hack",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "do Bionic hack",
+ "bash_command": "#!/bin/bash -eo pipefail\n# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See\n# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI\nsudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:38:28.914Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:38:28.895Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 103,
+ "run_time_millis": 19,
+ "has_output": false
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:39:01.223Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:38:28.920Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 104,
+ "run_time_millis": 32303,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:39:14.156Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:39:01.229Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 105,
+ "run_time_millis": 12927,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:39:16.894Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:39:14.162Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 106,
+ "run_time_millis": 2732,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "install dependencies",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "install dependencies",
+ "bash_command": "#!/bin/bash -eo pipefail\nsudo apt-get update\n# Install moreutils so we can use `ts` and `mispipe` in the following.\nsudo apt-get install -y moreutils\n\n# CircleCI sets the following in Git config at clone time:\n# url.ssh://[email protected] https://github.com\n# This breaks the Git clones in the NVM `install.sh` we run\n# in `install-node`.\n# TODO: figure out why that breaks, and whether we want it.\n# (Is it an optimization?)\nrm -f /home/circleci/.gitconfig\n\n# This is the main setup job for the test suite\nmispipe \"tools/ci/setup-backend\" ts\n\n# Cleaning caches is mostly unnecessary in Circle, because\n# most builds don't get to write to the cache.\n# mispipe \"scripts/lib/clean-unused-caches --verbose --threshold 0\" ts\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:41:22.387Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:39:16.900Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 107,
+ "run_time_millis": 125487,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Saving Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Saving Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:41:22.431Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:41:22.393Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 108,
+ "run_time_millis": 38,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Saving Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Saving Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:41:22.470Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:41:22.438Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 109,
+ "run_time_millis": 32,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Saving Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Saving Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:41:22.494Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:41:22.478Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 110,
+ "run_time_millis": 16,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "run backend tests",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": true,
+ "infrastructure_fail": null,
+ "name": "run backend tests",
+ "bash_command": "#!/bin/bash -eo pipefail\n. /srv/zulip-py3-venv/bin/activate\nmispipe ./tools/ci/backend ts\n",
+ "status": "failed",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:42:55.898Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:41:22.501Z",
+ "background": false,
+ "exit_code": 1,
+ "insignificant": false,
+ "canceled": null,
+ "step": 111,
+ "run_time_millis": 93397,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Uploading artifacts",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Uploading artifacts",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:42:55.918Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:42:55.903Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 112,
+ "run_time_millis": 15,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Uploading artifacts",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Uploading artifacts",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:42:55.940Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:42:55.925Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 113,
+ "run_time_millis": 15,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Uploading artifacts",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Uploading artifacts",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:42:56.031Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:42:55.945Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 114,
+ "run_time_millis": 86,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Uploading test results",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Uploading test results",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:42:56.051Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:42:56.036Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 115,
+ "run_time_millis": 15,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "On fail",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "On fail",
+ "bash_command": "#!/bin/bash -eo pipefail\nif [[ \"$CIRCLE_REPOSITORY_URL\" == \"[email protected]:zulip/zulip.git\" ]]; then\n curl -H \"Content-Type: application/json\" \\\n -X POST -i 'https://chat.zulip.org/api/v1/external/circleci?api_key='\"$ZULIP_BOT_KEY\"'&stream=automated%20testing&topic=master%20failing' \\\n -d '{\"payload\": { \"branch\": \"'\"$CIRCLE_BRANCH\"'\", \"reponame\": \"'\"$CIRCLE_PROJECT_REPONAME\"'\", \"status\": \"failed\", \"build_url\": \"'\"$CIRCLE_BUILD_URL\"'\", \"username\": \"'\"$CIRCLE_USERNAME\"'\"}}'\nfi\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:42:56.071Z",
+ "type": "test",
+ "allocation_id": "5ee3844efd7aa57cd91af13a-0-build/5478EF76",
+ "start_time": "2020-06-12T13:42:56.058Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 116,
+ "run_time_millis": 13,
+ "has_output": false
+ }
+ ]
+ }
+ ],
+ "body": "",
+ "usage_queued_at": "2020-06-12T13:34:07.005Z",
+ "context_ids": [],
+ "fail_reason": null,
+ "retry_of": null,
+ "reponame": "zulip",
+ "ssh_users": [],
+ "build_url": "https://circleci.com/gh/Hypro999/zulip/1429",
+ "parallel": 1,
+ "failed": true,
+ "branch": "circleci",
+ "username": "Hypro999",
+ "author_date": "2020-06-12T13:33:46.000Z",
+ "why": "github",
+ "user": {
+ "is_user": true,
+ "login": "Hypro999",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/29123352?v=4",
+ "name": "Hemanth V. Alluri",
+ "vcs_type": "github",
+ "id": 29123352
+ },
+ "vcs_revision": "5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14",
+ "workflows": {
+ "job_name": "bionic-backend-frontend",
+ "job_id": "67650e47-d240-4db6-b2ed-304ca6dfde26",
+ "workflow_id": "a2522997-5337-41a7-b9fe-07fc03724b12",
+ "workspace_id": "a2522997-5337-41a7-b9fe-07fc03724b12",
+ "upstream_job_ids": [],
+ "upstream_concurrency_map": {},
+ "workflow_name": "Ubuntu 18.04 Bionic (Python 3.6, backend+frontend)"
+ },
+ "owners": [
+ "Hypro999"
+ ],
+ "vcs_tag": null,
+ "pull_requests": [],
+ "build_num": 1429,
+ "infrastructure_fail": false,
+ "committer_email": "[email protected]",
+ "has_artifacts": true,
+ "previous": {
+ "build_num": 1428,
+ "status": "success",
+ "build_time_millis": 29397
+ },
+ "status": "failed",
+ "committer_name": "Hemanth V. Alluri",
+ "retries": null,
+ "subject": "circleci: Add temp untested progress to get fixtures for failure.",
+ "vcs_type": "github",
+ "timedout": false,
+ "dont_build": null,
+ "lifecycle": "finished",
+ "no_dependency_cache": false,
+ "stop_time": "2020-06-12T13:42:56.123Z",
+ "ssh_disabled": true,
+ "build_time_millis": 307240,
+ "picard": {
+ "build_agent": {
+ "image": "circleci/picard@sha256:847ae88f32aaf7cfc04321b3eb25a7519630a949cf35df0d0b77ea1d7e886bd3",
+ "properties": {
+ "instance_ip": "172.16.89.195",
+ "build_agent": "1.0.34234-27aa9735",
+ "executor": "docker",
+ "nomad_ami": "ami-07194a5d4dd689502",
+ "availability_zone": "us-east-1c",
+ "instance_id": "i-0fddc2be4c7ebe0b7"
+ }
+ },
+ "resource_class": {
+ "cpu": 2,
+ "ram": 4096,
+ "class": "medium",
+ "name": "Docker Medium"
+ },
+ "executor": "docker"
+ },
+ "circle_yml": {},
+ "messages": [],
+ "is_first_green_build": false,
+ "job_name": null,
+ "start_time": "2020-06-12T13:37:48.883Z",
+ "canceler": null,
+ "all_commit_details": [
+ {
+ "committer_date": "2020-06-12T13:33:35.000Z",
+ "body": "",
+ "branch": "circleci",
+ "author_date": "2020-06-12T13:33:35.000Z",
+ "committer_email": "[email protected]",
+ "commit": "73900eeb69adbf0b83dc487e8eda90661b524eff",
+ "committer_login": "Hypro999",
+ "committer_name": "Hemanth V. Alluri",
+ "subject": "Modify CircleCI config for live-ish testing.",
+ "commit_url": "https://github.com/Hypro999/zulip/commit/73900eeb69adbf0b83dc487e8eda90661b524eff",
+ "author_login": "Hypro999",
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ },
+ {
+ "committer_date": "2020-06-12T13:33:46.000Z",
+ "body": "",
+ "branch": "circleci",
+ "author_date": "2020-06-12T13:33:46.000Z",
+ "committer_email": "[email protected]",
+ "commit": "5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14",
+ "committer_login": "Hypro999",
+ "committer_name": "Hemanth V. Alluri",
+ "subject": "circleci: Add temp untested progress to get fixtures for failure.",
+ "commit_url": "https://github.com/Hypro999/zulip/commit/5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14",
+ "author_login": "Hypro999",
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ }
+ ],
+ "platform": "2.0",
+ "outcome": "failed",
+ "vcs_url": "https://github.com/Hypro999/zulip",
+ "author_name": "Hemanth V. Alluri",
+ "node": null,
+ "queued_at": "2020-06-12T13:37:44.274Z",
+ "canceled": false,
+ "author_email": "[email protected]"
+ }
+}
diff --git a/zerver/webhooks/circleci/fixtures/github_bionic_production_build_success_multiple_parties.json b/zerver/webhooks/circleci/fixtures/github_bionic_production_build_success_multiple_parties.json
new file mode 100755
index 00000000000..d1e812615c4
--- /dev/null
+++ b/zerver/webhooks/circleci/fixtures/github_bionic_production_build_success_multiple_parties.json
@@ -0,0 +1,516 @@
+{
+ "payload": {
+ "compare": null,
+ "previous_successful_build": {
+ "build_num": 1422,
+ "status": "success",
+ "build_time_millis": 40755
+ },
+ "build_parameters": {
+ "CIRCLE_JOB": "bionic-production-build"
+ },
+ "oss": true,
+ "all_commit_details_truncated": false,
+ "committer_date": "2020-06-12T13:33:46.000Z",
+ "steps": [
+ {
+ "name": "Spin Up Environment",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Spin Up Environment",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:43:15.728Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:42:58.439Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 0,
+ "run_time_millis": 17289,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Preparing Environment Variables",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Preparing Environment Variables",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:43:16.016Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:43:15.999Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 99,
+ "run_time_millis": 17,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Checkout code",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Checkout code",
+ "bash_command": "#!/bin/sh\nset -e\n\n# Workaround old docker images with incorrect $HOME\n# check https://github.com/docker/docker/issues/2968 for details\nif [ \"${HOME}\" = \"/\" ]\nthen\n export HOME=$(getent passwd $(id -un) | cut -d: -f6)\nfi\n\necho Using SSH Config Dir $SSH_CONFIG_DIR\n\nmkdir -p $SSH_CONFIG_DIR\n\necho 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\nbitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==\n' >> $SSH_CONFIG_DIR/known_hosts\n\n(umask 077; touch $SSH_CONFIG_DIR/id_rsa)\nchmod 0600 $SSH_CONFIG_DIR/id_rsa\n(cat <<EOF > $SSH_CONFIG_DIR/id_rsa\n$CHECKOUT_KEY\nEOF\n)\n\nexport GIT_SSH_COMMAND='ssh -i $SSH_CONFIG_DIR/id_rsa -o UserKnownHostsFile=$SSH_CONFIG_DIR/known_hosts'\n\n# use git+ssh instead of https\ngit config --global url.\"ssh://[email protected]\".insteadOf \"https://github.com\" || true\ngit config --global gc.auto 0 || true\n\nif [ -e /home/circleci/zulip/.git ]\nthen\n cd /home/circleci/zulip\n git remote set-url origin \"$CIRCLE_REPOSITORY_URL\" || true\nelse\n mkdir -p /home/circleci/zulip\n cd /home/circleci/zulip\n git clone \"$CIRCLE_REPOSITORY_URL\" .\nfi\n\nif [ -n \"$CIRCLE_TAG\" ]\nthen\n git fetch --force origin \"refs/tags/${CIRCLE_TAG}\"\nelse\n git fetch --force origin \"circleci:remotes/origin/circleci\"\nfi\n\n\nif [ -n \"$CIRCLE_TAG\" ]\nthen\n git reset --hard \"$CIRCLE_SHA1\"\n git checkout -q \"$CIRCLE_TAG\"\nelif [ -n \"$CIRCLE_BRANCH\" ]\nthen\n git reset --hard \"$CIRCLE_SHA1\"\n git checkout -q -B \"$CIRCLE_BRANCH\"\nfi\n\ngit reset --hard \"$CIRCLE_SHA1\"",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:43:29.100Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:43:16.027Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 101,
+ "run_time_millis": 13073,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "create cache directories",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "create cache directories",
+ "bash_command": "#!/bin/bash -eo pipefail\ndirs=(/srv/zulip-{npm,venv,emoji}-cache)\nsudo mkdir -p \"${dirs[@]}\"\nsudo chown -R circleci \"${dirs[@]}\"\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:43:29.131Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "start_time": "2020-06-12T13:43:29.109Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 102,
+ "run_time_millis": 22,
+ "has_output": false
+ }
+ ]
+ },
+ {
+ "name": "do Bionic hack",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "do Bionic hack",
+ "bash_command": "#!/bin/bash -eo pipefail\n# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See\n# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI\nsudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:43:29.152Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "start_time": "2020-06-12T13:43:29.139Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 103,
+ "run_time_millis": 13,
+ "has_output": false
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:43:55.446Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:43:29.161Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 104,
+ "run_time_millis": 26285,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:44:16.256Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:43:55.450Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 105,
+ "run_time_millis": 20806,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:44:17.502Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:44:16.261Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 106,
+ "run_time_millis": 1241,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "build production",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "build production",
+ "bash_command": "#!/bin/bash -eo pipefail\nsudo apt-get update\n# Install moreutils so we can use `ts` and `mispipe` in the following.\nsudo apt-get install -y moreutils\n\nmispipe ./tools/ci/production-build ts\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:46:02.606Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:44:17.507Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 107,
+ "run_time_millis": 105099,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Saving Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Saving Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:46:02.648Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:46:02.611Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 108,
+ "run_time_millis": 37,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Saving Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Saving Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:46:02.700Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:46:02.654Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 109,
+ "run_time_millis": 46,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Saving Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Saving Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:46:02.728Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:46:02.706Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 110,
+ "run_time_millis": 22,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Persisting to Workspace",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Persisting to Workspace",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:46:06.549Z",
+ "type": "test",
+ "allocation_id": "5ee3844fa5252234d1078954-0-build/2370AFED",
+ "start_time": "2020-06-12T13:46:02.733Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 111,
+ "run_time_millis": 3816,
+ "has_output": true
+ }
+ ]
+ }
+ ],
+ "body": "",
+ "usage_queued_at": "2020-06-12T13:34:07.373Z",
+ "context_ids": [],
+ "fail_reason": null,
+ "retry_of": null,
+ "reponame": "zulip",
+ "ssh_users": [],
+ "build_url": "https://circleci.com/gh/Hypro999/zulip/1431",
+ "parallel": 1,
+ "failed": false,
+ "branch": "circleci",
+ "username": "Hypro999",
+ "author_date": "2020-06-12T13:33:46.000Z",
+ "why": "github",
+ "user": {
+ "is_user": true,
+ "login": "Hypro999",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/29123352?v=4",
+ "name": "Hemanth V. Alluri",
+ "vcs_type": "github",
+ "id": 29123352
+ },
+ "vcs_revision": "5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14",
+ "workflows": {
+ "job_name": "bionic-production-build",
+ "job_id": "6a97df3e-51eb-4113-bd80-27f8f4f57ee0",
+ "workflow_id": "056072ea-9615-44fc-b574-7b4c06aa2c8e",
+ "workspace_id": "056072ea-9615-44fc-b574-7b4c06aa2c8e",
+ "upstream_job_ids": [],
+ "upstream_concurrency_map": {},
+ "workflow_name": "Production"
+ },
+ "owners": [
+ "Hypro999"
+ ],
+ "vcs_tag": null,
+ "pull_requests": [],
+ "build_num": 1431,
+ "infrastructure_fail": false,
+ "committer_email": "[email protected]",
+ "has_artifacts": true,
+ "previous": {
+ "build_num": 1430,
+ "status": "running",
+ "build_time_millis": 215274
+ },
+ "status": "success",
+ "committer_name": "Hemanth V. Alluri",
+ "retries": null,
+ "subject": "circleci: Add temp untested progress to get fixtures for failure.",
+ "vcs_type": "github",
+ "timedout": false,
+ "dont_build": null,
+ "lifecycle": "finished",
+ "no_dependency_cache": false,
+ "stop_time": "2020-06-12T13:46:06.600Z",
+ "ssh_disabled": true,
+ "build_time_millis": 188217,
+ "picard": {
+ "build_agent": {
+ "image": "circleci/picard@sha256:847ae88f32aaf7cfc04321b3eb25a7519630a949cf35df0d0b77ea1d7e886bd3",
+ "properties": {
+ "build_agent": "1.0.34234-27aa9735",
+ "executor": "docker",
+ "nomad_ami": "ami-07194a5d4dd689502",
+ "availability_zone": "us-east-1c",
+ "instance_id": "i-0cbbcd49e6d003611",
+ "instance_ip": "172.16.88.17"
+ }
+ },
+ "resource_class": {
+ "cpu": 2,
+ "ram": 4096,
+ "class": "medium",
+ "name": "Docker Medium"
+ },
+ "executor": "docker"
+ },
+ "circle_yml": {},
+ "messages": [],
+ "is_first_green_build": false,
+ "job_name": null,
+ "start_time": "2020-06-12T13:42:58.383Z",
+ "canceler": null,
+ "all_commit_details": [
+ {
+ "committer_date": "2020-06-12T13:33:35.000Z",
+ "body": "",
+ "branch": "circleci",
+ "author_date": "2020-06-12T13:33:35.000Z",
+ "committer_email": "[email protected]",
+ "commit": "73900eeb69adbf0b83dc487e8eda90661b524eff",
+ "committer_login": null,
+ "committer_name": "Sadaharu",
+ "subject": "Modify CircleCI config for live-ish testing.",
+ "commit_url": "https://github.com/Hypro999/zulip/commit/73900eeb69adbf0b83dc487e8eda90661b524eff",
+ "author_login": "Hypro999",
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ },
+ {
+ "committer_date": "2020-06-12T13:33:46.000Z",
+ "body": "",
+ "branch": "circleci",
+ "author_date": "2020-06-12T13:33:46.000Z",
+ "committer_email": "[email protected]",
+ "commit": "5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14",
+ "committer_login": "Hypro999",
+ "committer_name": "Hemanth V. Alluri",
+ "subject": "circleci: Add temp untested progress to get fixtures for failure.",
+ "commit_url": "https://github.com/ShiroYasha999/zulip/commit/5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14",
+ "author_login": "ShiroYasha999",
+ "author_name": "Gintoki Sakata",
+ "author_email": "[email protected]"
+ }
+ ],
+ "platform": "2.0",
+ "outcome": "success",
+ "vcs_url": "https://github.com/Hypro999/zulip",
+ "author_name": "Hemanth V. Alluri",
+ "node": null,
+ "queued_at": "2020-06-12T13:42:56.155Z",
+ "canceled": false,
+ "author_email": "[email protected]"
+ }
+}
diff --git a/zerver/webhooks/circleci/fixtures/github_bionic_production_install_cancelled.json b/zerver/webhooks/circleci/fixtures/github_bionic_production_install_cancelled.json
new file mode 100755
index 00000000000..262c5f97287
--- /dev/null
+++ b/zerver/webhooks/circleci/fixtures/github_bionic_production_install_cancelled.json
@@ -0,0 +1,397 @@
+{
+ "payload": {
+ "compare": null,
+ "previous_successful_build": {
+ "build_num": 1415,
+ "status": "success",
+ "build_time_millis": 153514
+ },
+ "build_parameters": {
+ "CIRCLE_JOB": "bionic-production-install"
+ },
+ "oss": true,
+ "all_commit_details_truncated": false,
+ "committer_date": "2020-06-12T13:21:07.000Z",
+ "steps": [
+ {
+ "name": "Spin Up Environment",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Spin Up Environment",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:47.260Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:26:25.632Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 0,
+ "run_time_millis": 21628,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Preparing Environment Variables",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Preparing Environment Variables",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:47.634Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:26:47.612Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 99,
+ "run_time_millis": 22,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Attaching Workspace",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Attaching Workspace",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:48.772Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:26:47.642Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 101,
+ "run_time_millis": 1130,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "create cache directories",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "create cache directories",
+ "bash_command": "#!/bin/bash -eo pipefail\ndirs=(/srv/zulip-{npm,venv,emoji}-cache)\nsudo mkdir -p \"${dirs[@]}\"\nsudo chown -R circleci \"${dirs[@]}\"\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:48.809Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "start_time": "2020-06-12T13:26:48.777Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 102,
+ "run_time_millis": 32,
+ "has_output": false
+ }
+ ]
+ },
+ {
+ "name": "do Bionic hack",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "do Bionic hack",
+ "bash_command": "#!/bin/bash -eo pipefail\n# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See\n# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI\nsudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:48.833Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "start_time": "2020-06-12T13:26:48.816Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 103,
+ "run_time_millis": 17,
+ "has_output": false
+ }
+ ]
+ },
+ {
+ "name": "production extract tarball",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "production extract tarball",
+ "bash_command": "#!/bin/bash -eo pipefail\nsudo apt-get update\n# Install moreutils so we can use `ts` and `mispipe` in the following.\nsudo apt-get install -y moreutils\n\nmispipe /tmp/production-extract-tarball ts\n",
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:55.803Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:26:48.841Z",
+ "background": false,
+ "exit_code": 0,
+ "insignificant": false,
+ "canceled": null,
+ "step": 104,
+ "run_time_millis": 6962,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Restoring Cache",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Restoring Cache",
+ "bash_command": null,
+ "status": "success",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:55.950Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "output_url": "https://circle-production-action-output.s3.amazonaws.com/redacted",
+ "start_time": "2020-06-12T13:26:55.809Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 105,
+ "run_time_millis": 141,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "install production",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "install production",
+ "bash_command": "#!/bin/bash -eo pipefail\nsudo service rabbitmq-server restart\nsudo mispipe /tmp/production-install ts\n",
+ "status": "running",
+ "timedout": null,
+ "continue": null,
+ "end_time": null,
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "start_time": "2020-06-12T13:26:55.955Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": null,
+ "step": 106,
+ "run_time_millis": null,
+ "has_output": true
+ }
+ ]
+ },
+ {
+ "name": "Error executing build steps",
+ "actions": [
+ {
+ "truncated": false,
+ "index": 0,
+ "parallel": true,
+ "failed": null,
+ "infrastructure_fail": null,
+ "name": "Error executing build steps",
+ "bash_command": null,
+ "status": "canceled",
+ "timedout": null,
+ "continue": null,
+ "end_time": "2020-06-12T13:26:56.384Z",
+ "type": "test",
+ "allocation_id": "5ee3822d4751e46626b827a3-0-build/9D59D73",
+ "start_time": "2020-06-12T13:26:56.374Z",
+ "background": false,
+ "exit_code": null,
+ "insignificant": false,
+ "canceled": true,
+ "step": 1023,
+ "run_time_millis": 10,
+ "has_output": true
+ }
+ ]
+ }
+ ],
+ "body": "",
+ "usage_queued_at": "2020-06-12T13:25:02.040Z",
+ "context_ids": [],
+ "fail_reason": null,
+ "retry_of": null,
+ "reponame": "zulip",
+ "ssh_users": [],
+ "build_url": "https://circleci.com/gh/Hypro999/zulip/1420",
+ "parallel": 1,
+ "failed": false,
+ "branch": "circleci",
+ "username": "Hypro999",
+ "author_date": "2020-06-12T13:21:07.000Z",
+ "why": "github",
+ "user": {
+ "is_user": true,
+ "login": "Hypro999",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/29123352?v=4",
+ "name": "Hemanth V. Alluri",
+ "vcs_type": "github",
+ "id": 29123352
+ },
+ "vcs_revision": "b0d6197fb4cacaf917adca77f77354882ee80621",
+ "workflows": {
+ "job_name": "bionic-production-install",
+ "job_id": "9cecf80d-fe76-422f-a8c0-5e1fd69bbf0f",
+ "workflow_id": "ab148cd0-5f8a-4b91-a8b5-26da1cbfdf5d",
+ "workspace_id": "ab148cd0-5f8a-4b91-a8b5-26da1cbfdf5d",
+ "upstream_job_ids": [
+ "56ee3397-bfca-4921-b520-d5d4e1201245"
+ ],
+ "upstream_concurrency_map": {},
+ "workflow_name": "Production"
+ },
+ "owners": [
+ "Hypro999"
+ ],
+ "vcs_tag": null,
+ "pull_requests": [],
+ "build_num": 1420,
+ "infrastructure_fail": false,
+ "committer_email": "[email protected]",
+ "has_artifacts": true,
+ "previous": {
+ "build_num": 1415,
+ "status": "success",
+ "build_time_millis": 153514
+ },
+ "status": "canceled",
+ "committer_name": "Hemanth V. Alluri",
+ "retries": null,
+ "subject": "circleci: Add temp untested progress to fixtures for failure.",
+ "vcs_type": "github",
+ "timedout": false,
+ "dont_build": null,
+ "lifecycle": "finished",
+ "no_dependency_cache": false,
+ "stop_time": "2020-06-12T13:26:56.390Z",
+ "ssh_disabled": true,
+ "build_time_millis": 30807,
+ "picard": {
+ "build_agent": {
+ "image": "circleci/picard@sha256:847ae88f32aaf7cfc04321b3eb25a7519630a949cf35df0d0b77ea1d7e886bd3",
+ "properties": {
+ "nomad_ami": "ami-07194a5d4dd689502",
+ "availability_zone": "us-east-1c",
+ "instance_id": "i-063da79367c8689f2",
+ "instance_ip": "172.16.91.151",
+ "build_agent": "1.0.34234-27aa9735",
+ "executor": "docker"
+ }
+ },
+ "resource_class": {
+ "cpu": 2,
+ "ram": 4096,
+ "class": "medium",
+ "name": "Docker Medium"
+ },
+ "executor": "docker"
+ },
+ "circle_yml": {},
+ "messages": [],
+ "is_first_green_build": false,
+ "job_name": null,
+ "start_time": "2020-06-12T13:26:25.583Z",
+ "canceler": {
+ "avatar_url": "https://avatars3.githubusercontent.com/u/29123352?v=4",
+ "external_id": 29123352,
+ "id": 29123352,
+ "name": "Hemanth V. Alluri",
+ "user?": true,
+ "domain": "github.com",
+ "type": "github",
+ "authorized?": true,
+ "provider_id": "bcc68be8-ef10-4dd6-9b76-34f19e0db930",
+ "login": "Hypro999"
+ },
+ "all_commit_details": [
+ {
+ "committer_date": "2020-06-12T13:21:07.000Z",
+ "body": "",
+ "branch": "circleci",
+ "author_date": "2020-06-12T13:21:07.000Z",
+ "committer_email": "[email protected]",
+ "commit": "b0d6197fb4cacaf917adca77f77354882ee80621",
+ "committer_login": "Hypro999",
+ "committer_name": "Hemanth V. Alluri",
+ "subject": "circleci: Add temp untested progress to fixtures for failure.",
+ "commit_url": "https://github.com/Hypro999/zulip/commit/b0d6197fb4cacaf917adca77f77354882ee80621",
+ "author_login": "Hypro999",
+ "author_name": "Hemanth V. Alluri",
+ "author_email": "[email protected]"
+ }
+ ],
+ "platform": "2.0",
+ "outcome": "canceled",
+ "vcs_url": "https://github.com/Hypro999/zulip",
+ "author_name": "Hemanth V. Alluri",
+ "node": null,
+ "queued_at": "2020-06-12T13:26:22.775Z",
+ "canceled": true,
+ "author_email": "[email protected]"
+ }
+}
diff --git a/zerver/webhooks/circleci/tests.py b/zerver/webhooks/circleci/tests.py
index fb142cda816..48c2a3a117c 100644
--- a/zerver/webhooks/circleci/tests.py
+++ b/zerver/webhooks/circleci/tests.py
@@ -2,26 +2,49 @@ from zerver.lib.test_classes import WebhookTestCase
class CircleCiHookTests(WebhookTestCase):
- STREAM_NAME = 'circleci'
+ STREAM_NAME = "circleci"
URL_TEMPLATE = "/api/v1/external/circleci?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = 'circleci'
-
- def test_circleci_build_in_success_status(self) -> None:
- expected_topic = "RepoName"
- expected_message = "[Build](https://circleci.com/gh/username/project/build_number) triggered by username on master branch succeeded."
- self.send_and_test_stream_message('build_passed', expected_topic, expected_message)
-
- def test_circleci_build_in_failed_status(self) -> None:
- expected_topic = "RepoName"
- expected_message = "[Build](https://circleci.com/gh/username/project/build_number) triggered by username on master branch failed."
- self.send_and_test_stream_message('build_failed', expected_topic, expected_message)
-
- def test_circleci_build_in_failed_status_when_previous_build_failed_too(self) -> None:
- expected_topic = "RepoName"
- expected_message = "[Build](https://circleci.com/gh/username/project/build_number) triggered by username on master branch is still failing."
- self.send_and_test_stream_message('build_failed_when_previous_build_failed', expected_topic, expected_message)
-
- def test_circleci_build_in_success_status_when_previous_build_failed_too(self) -> None:
- expected_topic = "RepoName"
- expected_message = "[Build](https://circleci.com/gh/username/project/build_number) triggered by username on master branch fixed."
- self.send_and_test_stream_message('build_passed_when_previous_build_failed', expected_topic, expected_message)
+ FIXTURE_DIR_NAME = "circleci"
+
+ def test_private_repo_with_pull_request_off_bitbucket(self) -> None:
+ expected_topic = "circleci-test"
+ expected_message = """
+Build [#5](https://circleci.com/bb/Hypro999/circleci-test/5) of `build`/`workflow` on branch `unstable` has failed.
+- **Commits (3):** [6b5361c166](https://bitbucket.org/Hypro999/circleci-test/commits/6b5361c1661581d975e84b68904ae9bfba75d5e5) ... [eaa88f9eac](https://bitbucket.org/Hypro999/circleci-test/commits/eaa88f9eac0fad86c46a8fe35462fe2c904d84b1)
+- **Pull Request:** https://bitbucket.org/Hypro999/circleci-test/pull-requests/1
+- **Author:** Hemanth V. Alluri
+""".strip()
+ self.send_and_test_stream_message("bitbucket_private_repo_pull_request_failure", expected_topic, expected_message)
+
+ def test_for_failed_build_off_github(self) -> None:
+ expected_topic = "zulip"
+ expected_message = """
+Build [#1429](https://circleci.com/gh/Hypro999/zulip/1429) of `bionic-backend-frontend`/`Ubuntu 18.04 Bionic (Python 3.6, backend+frontend)` on branch `circleci` has failed.
+- **Commits (2):** [73900eeb69 ... 5326f9ea40](https://github.com/Hypro999/zulip/compare/73900eeb69adbf0b83dc487e8eda90661b524eff...5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14)
+
+- **Author:** Hemanth V. Alluri (Hypro999)
+- **Committer:** Hemanth V. Alluri (Hypro999)
+""".strip()
+ self.send_and_test_stream_message("github_bionic_backend_frontend_failure", expected_topic, expected_message)
+
+ def test_for_success_build_off_github_with_multiple_parties(self) -> None:
+ expected_topic = "zulip"
+ expected_message = """
+Build [#1431](https://circleci.com/gh/Hypro999/zulip/1431) of `bionic-production-build`/`Production` on branch `circleci` has succeeded.
+- **Commits (2):** [73900eeb69 ... 5326f9ea40](https://github.com/Hypro999/zulip/compare/73900eeb69adbf0b83dc487e8eda90661b524eff...5326f9ea4084a01cc2bf1a461b9ad819b4ffdd14)
+
+- **Authors:** Gintoki Sakata (ShiroYasha999), Hemanth V. Alluri (Hypro999)
+- **Committers:** Hemanth V. Alluri (Hypro999), Sadaharu
+""".strip()
+ self.send_and_test_stream_message("github_bionic_production_build_success_multiple_parties", expected_topic, expected_message)
+
+ def test_for_cancelled_build_off_github(self) -> None:
+ expected_topic = "zulip"
+ expected_message = """
+Build [#1420](https://circleci.com/gh/Hypro999/zulip/1420) of `bionic-production-install`/`Production` on branch `circleci` was canceled.
+- **Commit:** [b0d6197fb4](https://github.com/Hypro999/zulip/commit/b0d6197fb4cacaf917adca77f77354882ee80621)
+
+- **Author:** Hemanth V. Alluri (Hypro999)
+- **Committer:** Hemanth V. Alluri (Hypro999)
+""".strip()
+ self.send_and_test_stream_message("github_bionic_production_install_cancelled", expected_topic, expected_message)
diff --git a/zerver/webhooks/circleci/view.py b/zerver/webhooks/circleci/view.py
index 0a3d83d42d3..855d2833224 100644
--- a/zerver/webhooks/circleci/view.py
+++ b/zerver/webhooks/circleci/view.py
@@ -1,4 +1,3 @@
-# Webhooks for external integrations.
from typing import Any, Dict
from django.http import HttpRequest, HttpResponse
@@ -9,15 +8,16 @@ from zerver.lib.response import json_success
from zerver.lib.webhooks.common import check_send_webhook_message
from zerver.models import UserProfile
-CIRCLECI_TOPIC_TEMPLATE = '{repository_name}'
-CIRCLECI_MESSAGE_TEMPLATE = '[Build]({build_url}) triggered by {username} on {branch} branch {status}.'
-
-FAILED_STATUS = 'failed'
+outcome_to_formatted_status_map = {
+ "success": "has succeeded",
+ "failed": "has failed",
+ "canceled": "was canceled",
+}
@api_key_only_webhook_view('CircleCI')
@has_request_variables
def api_circleci_webhook(request: HttpRequest, user_profile: UserProfile,
- payload: Dict[str, Any]=REQ(argument_type='body')) -> HttpResponse:
+ payload: Dict[str, Any]=REQ(argument_type="body")) -> HttpResponse:
payload = payload['payload']
subject = get_subject(payload)
body = get_body(payload)
@@ -26,22 +26,103 @@ def api_circleci_webhook(request: HttpRequest, user_profile: UserProfile,
return json_success()
def get_subject(payload: Dict[str, Any]) -> str:
- return CIRCLECI_TOPIC_TEMPLATE.format(repository_name=payload['reponame'])
+ repository_name = payload["reponame"]
+ return f"{repository_name}"
+
+def get_commit_range_info(payload: Dict[str, Any]) -> str:
+ commits = payload["all_commit_details"]
+ num_commits = len(commits)
+
+ if num_commits == 1:
+ commit_id = commits[0]["commit"][:10]
+ commit_url = commits[0]["commit_url"]
+ return f"- **Commit:** [{commit_id}]({commit_url})"
+
+ vcs_provider = payload["user"]["vcs_type"] # Same as payload["why"]?
+ first_commit_id = commits[0]["commit"]
+ shortened_first_commit_id = first_commit_id[:10]
+ last_commit_id = commits[-1]["commit"]
+ shortened_last_commit_id = last_commit_id[:10]
+ if vcs_provider == "github":
+ # Then use GitHub's commit range feature to form the appropriate url.
+ vcs_url = payload["vcs_url"]
+ commit_range_url = f"{vcs_url}/compare/{first_commit_id}...{last_commit_id}"
+ return f"- **Commits ({num_commits}):** [{shortened_first_commit_id} ... {shortened_last_commit_id}]({commit_range_url})"
+ else:
+ # BitBucket doesn't have a good commit range url feature like GitHub does.
+ # So let's just show the two separately.
+ # https://community.atlassian.com/t5/Bitbucket-questions/BitBucket-4-14-diff-between-any-two-commits/qaq-p/632974
+ first_commit_url = commits[0]["commit_url"]
+ last_commit_url = commits[-1]["commit_url"]
+ return f"- **Commits ({num_commits}):** [{shortened_first_commit_id}]({first_commit_url}) ... [{shortened_last_commit_id}]({last_commit_url})"
+
+def get_authors_and_committer_info(payload: Dict[str, Any]) -> str:
+ body = ""
+
+ author_names = set()
+ committer_names = set()
+ for commit in payload["all_commit_details"]:
+ author_name = commit["author_name"]
+ author_username = commit["author_login"]
+ if author_username:
+ author_names.add(f"{author_name} ({author_username})")
+ else:
+ author_names.add(commit["author_name"])
+
+ if commit.get("committer_email", None):
+ committer_name = commit["committer_name"]
+ committer_username = commit["committer_login"]
+ if committer_username:
+ committer_names.add(f"{committer_name} ({committer_username})")
+ else:
+ committer_names.add(commit["committer_name"])
+
+ author_names_list = list(author_names)
+ author_names_list.sort()
+ committer_names_list = list(committer_names)
+ committer_names_list.sort()
+ authors = ", ".join(author_names_list)
+ committers = ", ".join(committer_names_list)
+
+ # Add the authors' information to the body.
+ if len(author_names_list) > 1:
+ body += f"- **Authors:** {authors}"
+ else:
+ body += f"- **Author:** {authors}"
+
+ # Add information about the committers if it was provided.
+ if len(committer_names) > 0:
+ if len(committer_names) > 1:
+ body += f"\n- **Committers:** {committers}"
+ else:
+ body += f"\n- **Committer:** {committers}"
+
+ return body
+
def get_body(payload: Dict[str, Any]) -> str:
- data = {
- 'build_url': payload['build_url'],
- 'username': payload['username'],
- 'branch': payload['branch'],
- 'status': get_status(payload),
- }
- return CIRCLECI_MESSAGE_TEMPLATE.format(**data)
-
-def get_status(payload: Dict[str, Any]) -> str:
- status = payload['status']
- previous = payload.get('previous', None)
- if previous and previous['status'] == FAILED_STATUS and status == FAILED_STATUS:
- return 'is still failing'
- if status == 'success':
- return 'succeeded'
- return status
+ build_num = payload["build_num"]
+ build_url = payload["build_url"]
+
+ outcome = payload["outcome"]
+ formatted_status = outcome_to_formatted_status_map.get(outcome, outcome)
+
+ branch_name = payload["branch"]
+ workflow_name = payload["workflows"]["workflow_name"]
+ job_name = payload["workflows"]["job_name"]
+
+ commit_range_info = get_commit_range_info(payload)
+ pull_request_info = ""
+ if len(payload["pull_requests"]) > 0:
+ pull_request_url = payload["pull_requests"][0]["url"]
+ pull_request_info = f"- **Pull Request:** {pull_request_url}"
+ authors_and_committers_info = get_authors_and_committer_info(payload)
+
+ body = f"""
+Build [#{build_num}]({build_url}) of `{job_name}`/`{workflow_name}` on branch `{branch_name}` {formatted_status}.
+{commit_range_info}
+{pull_request_info}
+{authors_and_committers_info}
+""".strip()
+
+ return body