Skip to content

Commit

Permalink
split react native and CLI pipeline into basic and full stages
Browse files Browse the repository at this point in the history
  • Loading branch information
yousif-bugsnag committed Aug 1, 2023
1 parent 95062ca commit d4a83bf
Show file tree
Hide file tree
Showing 8 changed files with 979 additions and 902 deletions.
7 changes: 7 additions & 0 deletions .buildkite/block.full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
steps:
- block: 'Trigger a full build'
key: 'trigger-full-build'

- label: 'Upload the full test pipeline'
depends_on: 'trigger-full-build'
command: buildkite-agent pipeline upload .buildkite/pipeline.full.yml
56 changes: 56 additions & 0 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
steps:

#
# Upload full React Native pipelines
#
- label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: FULL REACT NATIVE (ANDROID) STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:"
commands:
- buildkite-agent pipeline upload .buildkite/react-native-android-pipeline.full.yml

- label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: FULL REACT NATIVE (IOS) STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:"
commands:
- buildkite-agent pipeline upload .buildkite/react-native-ios-pipeline.full.yml

- label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: REACT NATIVE CLI STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:"
depends_on:
- "publish-js"
- "android-builder-base"
commands:
- buildkite-agent pipeline upload .buildkite/react-native-cli-pipeline.yml

#
# Trigger Expo pipelines
#
- label: "@bugsnag/expo latest"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
# don't specify 'branch' here so we build the default branch in the expo
# repo, which should be the most up-to-date @bugsnag/expo version
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"

- label: "@bugsnag/expo v48/next"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v48/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"

- label: "@bugsnag/expo v47/next"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v47/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"
46 changes: 6 additions & 40 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,43 +130,9 @@ steps:
commands:
- buildkite-agent pipeline upload .buildkite/react-native-ios-pipeline.yml

- label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: REACT NATIVE CLI STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:"
depends_on:
- "publish-js"
- "android-builder-base"
commands:
- buildkite-agent pipeline upload .buildkite/react-native-cli-pipeline.yml

- label: "@bugsnag/expo latest"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
# don't specify 'branch' here so we build the default branch in the expo
# repo, which should be the most up-to-date @bugsnag/expo version
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"

- label: "@bugsnag/expo v48/next"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v48/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"

- label: "@bugsnag/expo v47/next"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v47/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"
#
# Conditionally trigger full pipeline
#
- label: 'Conditionally trigger full set of tests'
timeout_in_minutes: 30
command: sh -c .buildkite/pipeline_trigger.sh
13 changes: 13 additions & 0 deletions .buildkite/pipeline_trigger.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env sh

if [[ "$BUILDKITE_MESSAGE" == *"[full ci]"* ||
"$BUILDKITE_BRANCH" == "next" ||
"$BUILDKITE_BRANCH" == "main" ||
"$BUILDKITE_PULL_REQUEST_BASE_BRANCH" == "main" ]]; then
echo "Running full build"
buildkite-agent pipeline upload .buildkite/pipeline.full.yml
else
# Basic build, but allow a full build to be triggered
echo "Running basic build"
buildkite-agent pipeline upload .buildkite/block.full.yml
fi
Loading

0 comments on commit d4a83bf

Please sign in to comment.