代码拉取完成,页面将自动刷新
# Note: This image can be found in build/pipelines/docker-image
image: atlassianlabs/atlaskit-mk-2:1.0.17
# This ensures we do a full clone on each build which prevents issues when cross referencing
# changesets and releases
clone:
depth: full
options:
size: 2x
pipelines:
branches:
master:
- step:
script:
# Note: in master, this script will rebase you onto latest origin/master.
- source ./build-setup.sh
- ([[ "$BITBUCKET_BRANCH" == "master" ]]) || (echo "This build should only be run on master" && exit 1)
- bolt install --frozen-lockfile
- (cd build/ci-scripts && yarn stop-if-older-build)
- yarn build
# Bump all packages and their dependents using saved changesets.
- yarn changeset version
# We push the bumped packages to master now as it's much better to fail whilst BB is
# ahead of npm, than the other way round.
- git push
# We run the copy.version script again, because the versions in our package.jsons may have changed
# after the bump. We've kept it running in both places, just to limit the scope of this change
# so that we don't break anything that was working previously.
- ./build/ci-scripts/copy.version.js
# Because we distribute precompiled code for mobile, for version accuracy, it needs to be built after the bump.
# Unfortunately, we can't rely on `run.if.package.changed.js` here because it runs against the last commit,
# which contains our changeset bump rather than the actual changes.
- yarn build:editor-mobile-bridge
# Release all unreleased packages.
- yarn changeset publish
- git push --tags # Push only the tags.
- (cd build/ci-scripts && yarn restart-stopped-build)
after-script:
- yarn send:buildEvents
caches:
- node
default:
- parallel:
- step:
name: Building dists
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
- node build/ci-scripts/run.if.package.changed.js @atlaskit/editor-mobile-bridge -- yarn build:editor-mobile-bridge
- export CHANGED_PACKAGES=$(node build/ci-scripts/get.changed.packages.since.master.js)
# Change into a glob pattern (removing brackets, spaces and quotes).
- export CHANGED_PACKAGES_GLOB=$(echo "$CHANGED_PACKAGES" | sed 's/[][" ]//g')
- node build/ci-scripts/branch-deploys/update.changed.packages.deps.to.cdn.js
# We add in the extra braces and a trailing comma in case we only have one package.
- bolt ws exec --only-fs="{$CHANGED_PACKAGES_GLOB,}" -- npm pack
- mkdir -p dists/
- node build/ci-scripts/branch-deploys/copy.built.tgzs.to.dists.dir.js
- for file in dists/*; do node build/ci-scripts/upload.build.artefact.for.commit.js $file dists/; done
# Need to check that we definitely have a changeset present, error with a message if not.
- yarn changeset status || (echo "Please run yarn changeset:empty to create an empty changeset" && false)
artifacts:
- dists/manifest.json
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Lint + Typecheck
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- node build/ci-scripts/run.tool.if.changed.js eslint -- yarn lint:eslint
- node build/ci-scripts/run.tool.if.changed.js stylelint -- yarn lint:stylelint
- node build/ci-scripts/run.tool.if.changed.js flow -- yarn typecheck:flow
- node build/ci-scripts/run.tool.if.changed.js typecheck -- yarn typecheck:typescript
# Get the commit that we diverged from master at.
- export DIVERGED_AT=$(git merge-base master HEAD)
# Get a comma separated list of changed files.
- export CHANGED_FILES=$(git diff --name-only $DIVERGED_AT -- 'packages' 'build' 'website' | grep -E 'js$|ts$|tsx$' | tr '\n' ',')
# The below runs prettier over all changed files and fails if anyone of them don't match prettier's rules.
# We add fileMock.js to the list of files so that we never pass an empty list to prettier.
- yarn prettier --no-editorconfig "{$CHANGED_FILES,fileMock.js}" --list-different
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Check bundle sizes
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- bolt measure:dependents:s3
- node build/ci-scripts/merge.json.in.folder.js .currentBundleSize
- if [ -e ".currentBundleSize/merged.json" ]; then node build/ci-scripts/upload.build.artefact.for.commit.js .currentBundleSize/merged.json; fi
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Unit Testing
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:changed --maxWorkers=50% --passWithNoTests
# Run platform-specific tests of the editor bridge
- yarn test:editor-mobile-bridge:ios
- yarn test:editor-mobile-bridge:android
# This script acts like a unit test to check changes to @atlaskit/adf-schema.
- node build/ci-scripts/run.if.package.changed.js @atlaskit/adf-schema -- yarn build:adf-schema:checkuptodate
after-script:
- yarn send:stepFailureEvents
caches:
- node
# https://product-fabric.atlassian.net/browse/ED-6927
# - step:
# name: Browser Unit Testing
# script:
# - source ./build-setup.sh
# - bolt install --frozen-lockfile
# - echo "Run browser unit tests using Karma + Browserstack"
# - node build/ci-scripts/run.tool.if.changed.js karma -- yarn test:browser:browserstack
# after-script:
# - yarn send:stepFailureEvents
# caches:
# - node
- step:
name: Browser Integration Testing
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- echo "Run browser integration tests using Webdriver + Browserstack"
# If we have changed any packages with webdriver tests, we wait until browserstack has free resources, then run our tests.
# BS_SESSIONS_ALLOWED represents the percentage of sessions allowed.
- LOCAL_IDENTIFIER=$(date +%s) BS_RETRY=5 BS_SESSIONS_ALLOWED=80 node build/ci-scripts/run.tool.if.changed.js webdriver -- node build/ci-scripts/wait.for.browserstack.resources.js && yarn test:webdriver:browserstack:changed
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Visual Regression Tests
image: atlassianlabs/atlaskit-mk-2-vr:1.0.17
script:
- source ./build-setup.sh
- git lfs pull
- bolt install --frozen-lockfile
- yarn run test:vr:changed
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:stepFailureEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
caches:
- node
- step:
name: Building website
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
# This next line just makes it so we can skip website builds by having a branch name that starts with "skip-website/".
- if [[ "$BITBUCKET_BRANCH" == skip-website/* ]]; then echo "Skipping website build" && mkdir dist && echo "Build skipped" > dist/index.html; else WEBSITE_ENV=staging yarn build:no-minimize; fi
- yarn build:copy
- set -o pipefail # Make sure we fail if the deployment fails.
# We pipe the output to stdout AND deploy-log.txt so that we can read the live url
- yarn deploy:staging | tee deploy-log.txt
- cat deploy-log.txt | grep "URL:" | sed "s/Live Draft Url..//gi" > netlify-link.txt
- echo "Uploading netlify build link to s3 so that we can fetch at the end..."
- node ../build/ci-scripts/upload.build.artefact.for.commit.js netlify-link.txt
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Sending Website Build Url
script:
- (cd build/utils && yarn install) # Needed for npm-run when updating status.
- cd build/ci-scripts
- yarn install
- node download.build.artefact.for.commit.js netlify-link.txt
- node update.build.status.with.netlify.link.js
after-script:
- yarn send:buildEvents
# Pipelines that can be scheduled or triggered manually.
custom:
# Currently this is being set up to be called manually for testing - schedule will change based on decisions in constellation
build-constellation-website:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd services/website-constellation
- yarn build
- yarn deploy:staging
after-script:
- yarn send:buildEvents
caches:
- node
# This should only be called by a scheduled build to deploy production website from latest master.
build-website-production:
- step:
script:
- source ./build-setup.sh
- ([[ "$BITBUCKET_BRANCH" == "master" ]]) || (echo "This build should only be run on master" && exit 1)
- bolt install --frozen-lockfile
- cd website
- WEBSITE_ENV=production yarn build
- yarn build:copy
- yarn deploy:production
after-script:
- yarn send:buildEvents
caches:
- node
# This can be called to deploy staging website from any branches.
build-website-staging:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
- WEBSITE_ENV=staging yarn build:no-minimize
- yarn build:copy
- set -o pipefail
- yarn deploy:staging | tee deploy-log.txt
- cat deploy-log.txt | grep "URL:" | sed "s/Live Draft Url..//gi" > netlify-link.txt
- echo "Uploading netlify build link to s3 so that we can fetch at the end..."
- node ../build/ci-scripts/upload.build.artefact.for.commit.js netlify-link.txt
after-script:
- yarn send:buildEvents
caches:
- node
# This should only be called by a scheduled or manual build from master.
# It builds the website and send the data to redash.
send-website-build-analytics:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
- yarn build:report
# We could optionally upload these to s3 if we wanted, leaving this here as an example:
# - node ../build/ci-scripts/upload.build.artefact.for.commit.js dist/report.html
# - node ../build/ci-scripts/upload.build.artefact.for.commit.js dist/stats.json
- node ./scripts/uploadBundleAnalyticsEvent.js
after-script:
- yarn send:buildEvents
caches:
- node
# This will run the security check using SourceClear acroos the repository.
security-check:
- step:
script:
- source ./build-setup.sh
# Install curl
- apt-get update; apt-get install -y curl
- curl -sSL https://download.sourceclear.com/ci.sh | bash
after-script:
- bolt install --frozen-lockfile
- yarn send:buildEvents
# This will run the full suite of the webdriver tests on Browserstack.
build-webdriver:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:webdriver:browserstack
after-script:
- yarn send:buildEvents
caches:
- node
# This will run the full suite of the visual regression tests using Docker.
build-visual-regression:
- step:
image: atlassianlabs/atlaskit-mk-2-vr:1.0.17
script:
- source ./build-setup.sh
- git lfs pull
- bolt install --frozen-lockfile
- yarn run test:vr
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:buildEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
caches:
- node
# This will run essentially the branch builds, but without any optimizations and should be manually.
# This build should be run in any potentially risky builds.
run-full-suite:
- parallel:
- step:
name: Building packages
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
after-script:
- yarn send:stepFailureEvents
- step:
name: Lint + Typecheck
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn lint
- yarn typecheck
after-script:
- yarn send:stepFailureEvents
- step:
name: Running All Unit tests
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test --maxWorkers=50%
# Run platform-specific tests of the editor bridge
- yarn test:editor-mobile-bridge:ios
- yarn test:editor-mobile-bridge:android
after-script:
- yarn send:stepFailureEvents
# - step:
# name: Running All Browser Unit tests
# script:
# - source ./build-setup.sh
# - bolt install --frozen-lockfile
# - yarn test:browser:browserstack
# after-script:
# - yarn send:stepFailureEvents
- step:
name: Running All Browser Integration tests
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:webdriver:browserstack
after-script:
- yarn send:stepFailureEvents
- step:
name: Running All Visual Regression tests
image: atlassianlabs/atlaskit-mk-2-vr:1.0.17
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:vr
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:stepFailureEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
- step:
name: Building the website
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
# don't worry about deploying, this build will always be run alongside a branch build
- yarn build
after-script:
- yarn send:stepFailureEvents
- step:
name: Sending Build Events
script:
- echo 'Sending Build Events...'
after-script:
- yarn send:buildEvents
# This build is used as our `merge` build when managing concurrent PR to master.
landkid:
- parallel:
- step:
name: Building
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- yarn build
after-script:
- yarn send:stepFailureEvents
- step:
name: Linting
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- yarn lint
after-script:
- yarn send:stepFailureEvents
- step:
name: Typechecking (and checking changesets)
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- yarn typecheck
- echo "We are now about to run the `version` command which will read changesets and bump packages"
- echo "We do this so that we know if the repo will be in an inconsistent state when this branch hits master"
- echo "If the step below fails, it's because a changeset may be bumping a package that is depended upon by a package that didn't exist when the changeset was created"
- echo "Read the very last error message, it will tell you exactly what is wrong (ignore all the first warnings you'll see)"
- yarn changeset version
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Unit tests - Jest 1 of 3 chunks
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export TMPFILE=$(mktemp /tmp/jest.XXXXXX) && yarn --silent jest --listTests --json > $TMPFILE
- STEPS="3" STEP_IDX="0" PARALLELIZE_TESTS_FILE="$TMPFILE" yarn jest --maxWorkers=50%
# This script acts like a unit test to check changes to @atlaskit/adf-schema.
- node build/ci-scripts/run.if.package.changed.js @atlaskit/adf-schema -- yarn build:adf-schema:checkuptodate
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Unit tests - Jest 2 of 3 chunks
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export TMPFILE=$(mktemp /tmp/jest.XXXXXX) && yarn --silent jest --listTests --json > $TMPFILE
- STEPS="3" STEP_IDX="1" PARALLELIZE_TESTS_FILE="$TMPFILE" yarn jest --maxWorkers=50%
- yarn test:editor-mobile-bridge:ios
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Unit tests - Jest 2 of 3 chunks
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export TMPFILE=$(mktemp /tmp/jest.XXXXXX) && yarn --silent jest --listTests --json > $TMPFILE
- STEPS="3" STEP_IDX="2" PARALLELIZE_TESTS_FILE="$TMPFILE" yarn jest --maxWorkers=50%
- yarn test:editor-mobile-bridge:android
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Browser Integration tests
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- LANDKID=true yarn test:webdriver:browserstack:changed
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Visual Regression tests
image: atlassianlabs/atlaskit-mk-2-vr:1.0.17
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- git lfs pull
- bolt install --frozen-lockfile
- yarn test:vr
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:stepFailureEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
- step:
name: Wait until no master is running - except if develop
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- if [[ "$TARGET_BRANCH" != "master" ]]; then echo "This build does not need to wait for master build."; exit 0; fi
- cd build/ci-scripts
- yarn --ignore-engines
- node ./wait.until.no.master.build.running.js
after-script:
- yarn send:buildEvents
# Only execute the below if successful
- test $BITBUCKET_EXIT_CODE -eq 0
- bolt install --frozen-lockfile
- cd build/scheduled-releases
- yarn update-pr "$BITBUCKET_COMMIT" "$BITBUCKET_REPO_FULL_NAME"
caches:
- node
# This build should only be run on the master branch, once per day.
# It manually clears the cache and runs a very quick install node_modules.
# We split into two steps so that one can clear the cache so that the second one starts with no cache.
# (Which causes it to upload when it's finished).
reseed-pipelines-cache:
- step:
name: Clearing old cache
script:
- ([ "$BITBUCKET_BRANCH" == "master" -o "$BITBUCKET_BRANCH" == "develop" ]) || (echo "This build should only be run on master or develop" && exit 1)
- cd build/ci-scripts
- bolt install --frozen-lockfile
- node clear.pipelines.node.cache.js
- step:
name: Creating new cache
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
# We re-clear the cache here in case any other builds have managed to start and finish in between us starting.
# (our build will only upload a cache if there is none when the build finishes).
- node build/ci-scripts/clear.pipelines.node.cache.js
caches:
- node
# This build allow to deploy branch dists to easily tests new version of components into consumers / products code base.
branch-deploy:
- variables:
- name: Packages
- step:
name: Branch deploy
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
- export CHANGED_PACKAGES=$([[ -z "${Packages}" ]] && node build/ci-scripts/get.changed.packages.since.master.js || echo "${Packages}")
# Change into a glob pattern (removing brackets, spaces and quotes).
- export CHANGED_PACKAGES_GLOB=$(echo "$CHANGED_PACKAGES" | sed 's/[][" ]//g')
- node build/ci-scripts/branch-deploys/update.changed.packages.deps.to.cdn.js
# We add in the extra braces and a trailing comma in case we only have one package
- bolt ws exec --only-fs="{$CHANGED_PACKAGES_GLOB,}" -- npm pack
- mkdir -p dists/
- node build/ci-scripts/branch-deploys/copy.built.tgzs.to.dists.dir.js
- for file in dists/*; do node build/ci-scripts/upload.build.artefact.for.commit.js $file dists/; done
artifacts:
- dists/manifest.json
caches:
- node
# This build allow to push the bundle size results as ratchet file to s3.
push-bundle-size-to-s3:
- parallel:
- step:
name: Bundle size update for editor-part-1 packages
script:
- source ./build-setup.sh
- git fetch origin $BITBUCKET_BRANCH && git checkout $BITBUCKET_BRANCH && git checkout - && git merge $BITBUCKET_BRANCH --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js editor-part-1| xargs -n1 -P2 yarn measure --updateSnapshot --s3
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for editor-part-2 packages
script:
- source ./build-setup.sh
- git fetch origin $BITBUCKET_BRANCH && git checkout $BITBUCKET_BRANCH && git checkout - && git merge $BITBUCKET_BRANCH --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js editor-part-2| xargs -n1 -P2 yarn measure --updateSnapshot --s3
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for core packages
script:
- source ./build-setup.sh
- git fetch origin $BITBUCKET_BRANCH && git checkout $BITBUCKET_BRANCH && git checkout - && git merge $BITBUCKET_BRANCH --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js core| xargs -n1 -P2 yarn measure --updateSnapshot --s3
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for media packages
script:
- source ./build-setup.sh
- git fetch origin $BITBUCKET_BRANCH && git checkout $BITBUCKET_BRANCH && git checkout - && git merge $BITBUCKET_BRANCH --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js media| xargs -n1 -P2 yarn measure --updateSnapshot --s3
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for all other packages
script:
- source ./build-setup.sh
- git fetch origin $BITBUCKET_BRANCH && git checkout $BITBUCKET_BRANCH && git checkout - && git merge $BITBUCKET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export input=elements,bitbucket,css-packs,growth,help,helpers,home,jira,navigation,people-and-teams,search,teamwork-ecosystem,engagement-platform,server,spa
- node build/ci-scripts/get.pkgs.in.team.js $input| xargs -n1 -P2 yarn measure --updateSnapshot --s3
after-script:
- yarn send:bundleSize
caches:
- node
# A pipeline to update a package's i18n translation messages.
# Per package, it will push i18n messages and pull translations. This is based on the package.json (i18n:push, i18n:pull)
# A pull request is created and assigned to defined reviewers.
# Each package can be configured within update.i18n.translations.js
update-i18n-translations:
- step:
name: Push and pull translations and create pull request
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- echo 'Pushing'; node build/ci-scripts/update.i18n.translations push
- echo 'Pulling'; node build/ci-scripts/update.i18n.translations pull
# Validates built dists and package contents against what is on npm
run-build-validator:
- step:
name: Run build validator
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
# - yarn build:editor-mobile-bridge
# Run validation in quiet mode as well to easily check file differences
# Validate packages will produce false positives and is for manual analysis so we always return true
- cd build/build-validator && (yarn validate-packages || yarn validate-packages --quiet) || true
# This replicates builds that would happen locally on a clean slate for a single package
run-build-validator-per-package:
- step:
name: Run build validator per package
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
# Exclude css-reset as it fails because of its postbuild ts not suppressing module not found errors
- bolt workspaces exec --no-bail --ignore "@atlaskit/{css-reset,email-renderer}" --only-fs "packages/*/*" --serial -- bash -c 'bolt p run build:clean $(grep name.*@atlaskit package.json | cut -d \" -f 4)'
# Validate packages will produce false positives and is for manual analysis so we always return true
- yarn validate-packages || true
# For branches like develop, we need to merge master daily.
merge-master:
- step:
name: Merges master into the target branch
script:
- source ./build-setup.sh
- if [[ "$TARGET_BRANCH" == "master" ]]; then echo "This build does not need to run on master build."; exit 0; fi
- git fetch origin master
- git merge origin/master
- git push origin HEAD
after-script:
- bolt install --frozen-lockfile
- yarn send:buildEvents
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。