Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from matrix-org/babolivier/ci
Browse files Browse the repository at this point in the history
Add SyTest to the BuildKite CI
  • Loading branch information
babolivier authored Oct 31, 2019
2 parents 6b59493 + e6f0536 commit 3e4527d
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 59 deletions.
34 changes: 34 additions & 0 deletions .buildkite/merge_base_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

set -ex

if [[ "$BUILDKITE_BRANCH" == "dinsic" ]]; then
echo "Not merging forward, as this is a release branch"
exit 0
fi

if [[ -z $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; then
echo "Can't figure out what the PR number is! Assuming merge target is dinsic."

# It probably hasn't had a PR opened yet. Since all PRs for dinsic land on
# dinsic, we can probably assume it's based on it and will be merged into
# it.
GITBASE="dinsic"
else
# Get the reference, using the GitHub API
GITBASE=$BUILDKITE_PULL_REQUEST_BASE_BRANCH
fi

# Show what we are before
git --no-pager show -s

# Set up username so it can do a merge
git config --global user.email bot@matrix.org
git config --global user.name "A robot"

# Fetch and merge. If it doesn't work, it will raise due to set -e.
git fetch -u origin $GITBASE
git merge --no-edit --no-commit origin/$GITBASE

# Show what we are after.
git --no-pager show -s
103 changes: 103 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,106 @@ steps:
limit: 2
- exit_status: 2
limit: 2

- label: "SyTest - :python: 2.7 / :postgres: 9.6 / Monolith"
agents:
queue: "medium"
env:
POSTGRES: "1"
command:
- "bash .buildkite/merge_base_branch.sh"
- "bash /synapse_sytest.sh"
plugins:
- docker#v3.0.1:
image: "matrixdotorg/sytest-synapse:dinsic"
propagate-environment: true
always-pull: true
workdir: "/src"
entrypoint: "/bin/sh"
init: false
shell: ["-x", "-c"]
mount-buildkite-agent: false
volumes: ["./logs:/logs"]
- artifacts#v1.2.0:
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/results.tap" ]
- matrix-org/annotate:
path: "logs/annotate.md"
style: "error"

- label: "SyTest - :python: 2.7 / :postgres: 9.6 / Workers"
agents:
queue: "xlarge"
env:
POSTGRES: "1"
WORKERS: "1"
command:
- "bash .buildkite/merge_base_branch.sh"
- "bash /synapse_sytest.sh"
plugins:
- docker#v3.0.1:
image: "matrixdotorg/sytest-synapse:dinsic"
propagate-environment: true
always-pull: true
workdir: "/src"
entrypoint: "/bin/sh"
init: false
shell: ["-x", "-c"]
mount-buildkite-agent: false
volumes: ["./logs:/logs"]
- artifacts#v1.2.0:
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/results.tap" ]
- matrix-org/annotate:
path: "logs/annotate.md"
style: "error"

- label: "SyTest - :python: 3 / :postgres: 9.6 / Monolith"
agents:
queue: "medium"
env:
POSTGRES: "1"
command:
- "bash .buildkite/merge_base_branch.sh"
- "bash /synapse_sytest.sh"
plugins:
- docker#v3.0.1:
image: "matrixdotorg/sytest-synapse:dinsic-py3"
propagate-environment: true
always-pull: true
workdir: "/src"
entrypoint: "/bin/sh"
init: false
shell: ["-x", "-c"]
mount-buildkite-agent: false
volumes: ["./logs:/logs"]
- artifacts#v1.2.0:
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/results.tap" ]
- matrix-org/annotate:
path: "logs/annotate.md"
style: "error"

- label: "SyTest - :python: 3 / :postgres: 9.6 / Workers"
agents:
queue: "xlarge"
env:
POSTGRES: "1"
WORKERS: "1"
command:
- "bash .buildkite/merge_base_branch.sh"
- "bash /synapse_sytest.sh"
plugins:
- docker#v3.0.1:
image: "matrixdotorg/sytest-synapse:dinsic-py3"
propagate-environment: true
always-pull: true
workdir: "/src"
entrypoint: "/bin/sh"
init: false
shell: ["-x", "-c"]
mount-buildkite-agent: false
volumes: ["./logs:/logs"]
- artifacts#v1.2.0:
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/results.tap" ]
- matrix-org/annotate:
path: "logs/annotate.md"
style: "error"

24 changes: 0 additions & 24 deletions .circleci/config.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .circleci/merge_base_branch.sh

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add SyTest to the BuildKite CI.

0 comments on commit 3e4527d

Please sign in to comment.