Skip to content

Commit

Permalink
Update environment variable to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
twometresteve committed Apr 28, 2021
1 parent 1799f90 commit 066497b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
# Publish/package notifier
#
- label: ':docker: Prepare package.json'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
key: 'package-js'
timeout_in_minutes: 3
plugins:
Expand All @@ -43,14 +43,14 @@ steps:
build: publisher
image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js
env:
RN_INTEGRATION: ${RN_INTEGRATION}
BUILD_RN_WITH_LATEST_NATIVES: ${BUILD_RN_WITH_LATEST_NATIVES}


#
# Trigger individual pipelines
#
- label: 'Trigger Browser pipeline'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on: 'package-js'
trigger: 'bugsnag-js-browser'
build:
Expand All @@ -60,7 +60,7 @@ steps:
async: true

- label: 'Trigger Node pipeline'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on: 'package-js'
trigger: 'bugsnag-js-node'
build:
Expand All @@ -70,7 +70,7 @@ steps:
async: true

- label: 'Trigger Expo pipeline'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on: 'publish-js'
trigger: 'bugsnag-js-expo'
build:
Expand All @@ -91,7 +91,7 @@ steps:
async: true

- label: 'Trigger React Native CLI pipeline'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on:
- 'publish-js'
- 'android-builder-base'
Expand All @@ -103,7 +103,7 @@ steps:
async: true

- label: ':aws-lambda: AWS Lambda tests'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
timeout_in_minutes: 35
agents:
queue: 'opensource-mac-aws-sam'
Expand All @@ -119,7 +119,7 @@ steps:
# Core tests and checks
#
- label: ':docker: Build CI image'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
key: 'ci-image'
depends_on: 'package-js'
timeout_in_minutes: 20
Expand All @@ -139,7 +139,7 @@ steps:
- ci:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-base

- label: 'Lint'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on: 'ci-image'
timeout_in_minutes: 10
plugins:
Expand All @@ -148,7 +148,7 @@ steps:
command: 'npm run test:lint'

- label: 'Unit tests'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on: 'ci-image'
timeout_in_minutes: 10
plugins:
Expand All @@ -157,7 +157,7 @@ steps:
command: 'npm run test:unit'

- label: 'Type checks/tests'
if: build.env("RN_INTEGRATION") != "true"
if: build.env("BUILD_RN_WITH_LATEST_NATIVES") != "true"
depends_on: 'ci-image'
timeout_in_minutes: 10
plugins:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- REG_NPM_EMAIL
- PUBLISH_URL
- BRANCH_NAME
- RN_INTEGRATION
- BUILD_RN_WITH_LATEST_NATIVES
ci:
build:
context: .
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/Dockerfile.publisher
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ COPY scripts/ scripts/
ARG PUBLISH_URL
ARG BUILDKITE
ARG BRANCH_NAME
ARG RN_INTEGRATION
RUN BUILDKITE=${BUILDKITE} BRANCH_NAME=${BRANCH_NAME} RN_INTEGRATION=${RN_INTEGRATION} node scripts/publish.js $PUBLISH_URL
ARG BUILD_RN_WITH_LATEST_NATIVES
RUN BUILDKITE=${BUILDKITE} BRANCH_NAME=${BRANCH_NAME} BUILD_RN_WITH_LATEST_NATIVES=${BUILD_RN_WITH_LATEST_NATIVES} node scripts/publish.js $PUBLISH_URL
2 changes: 1 addition & 1 deletion scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
const lernaVersion = lerna.version.match(/^[1-9][0-9]*\.[0-9]+\.[0-9]+/)[0]

// Base version for RN integration builds on the current time
if (process.env.RN_INTEGRATION) {
if (process.env.BUILD_RN_WITH_LATEST_NATIVES) {
const timestamp = Math.round(Date.now() / 1000)

return `${lernaVersion}-rn-integration.${timestamp}`
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function publish (publishUrl) {
}

if (myVersions.length === 0) {
if (process.env.RN_INTEGRATION) {
if (process.env.BUILD_RN_WITH_LATEST_NATIVES) {
// For RN integration builds, dynamically update the native notifiers
common.changeDir('packages/react-native')
common.run('./update-android.sh --sha next', true)
Expand Down

0 comments on commit 066497b

Please sign in to comment.