ha-integration-tests-debug Dump build script in integration script output
When the example fails, it will be *included* in the diff.
language: ruby
dist: xenial
rvm: 2.5.3
cache:
bundler: true
env:
global:
- COVERAGE=1
matrix:
- INTEGRATION_SPECS=0
- INTEGRATION_SPECS=1
stages:
- test
- ':ship: it to Quay.io'
jobs:
allow_failures:
- script: ./script/docker-build-and-push
include:
- stage: test
env:
script: ./script/validate-example-payloads-with-docker
- stage: ':ship: it to Quay.io'
env:
script: ./script/docker-build-and-push
if: NOT type IN (pull_request) AND branch = master
before_script:
- eval "$(script/handle-docker-config)"
- bundle exec rake clean assets:precompile
script:
- bundle exec rspec spec
- bundle exec rake shfmt
- bundle exec rake assert_clean
- bundle exec rake shellcheck
- bundle exec rake assert_examples
after_success: bundle exec codeclimate-test-reporter
after_failure: bundle exec rake dump_examples_logs
before_deploy:
- sudo pip install -U -I Pygments
- ./script/build-s3-index-html
deploy:
provider: s3
access_key_id:
secure: fXt5NG5UGDvpnRFvUUk9J//iSo+Vh28oEUJvjZqiUZ9GRHp5TrIS5vL4bPlD/1RrJRp7BVVj1+4ThXZRzrMhF5xazK8k4ANaUhMdjmRa6arXtqBcXIyUvu//5e80nlXekqMKaW7f5wrLNiKZB+ck7ayGlI1NYLNQ5nCWC6Xxe6s=
secret_access_key:
secure: Jn9clQh78C2c1zoueTkn0r5kSCHrbb7bMojb8/Ne+6zg0pD/3w25mrhEC4y9b3M/lHoKArOPj4dn03ZErJleM8aOMNMIa6ck8GKP+7EoFlZ/1/C5733HazlldTWDd2+wTOYfSIGOM+mHDP5tmK0S7pr1zEm+/++UExuGZXiCSSI=
bucket: travis-build-examples
local_dir: examples
skip_cleanup: true
region: us-east-1
on:
branch: master
condition: $INTEGRATION_SPECS == 1
repo: travis-ci/travis-build
lyne-design-system/lyne-components:.travis.yml@d51e4d5
# Add release version as message to Netlify deployment
# 1. .releaserc -> write version to .version
# 2. add --message in format: ::VERSION:: in netlify deploy
# Initially, we used Travis's stages and workspaces
# https://docs.travis-ci.com/user/using-workspaces/
# In stage1: Build and deploy to npm
# In stage2: Build Storybook and deploy to Netlify
# Where stage2 takes up to 2 minutes.
# The problem: If no new version is released, it is not possible to define
# a condition so that stage2 is not run. Therefore the build would last 2 min
# longer than necessary.
# Solution: For simplicity, we omit stages and do everything in the script
# block of one job.
os: linux
language: node_js
# There is an issue with chromatic cli if install phase is handled by travis.
# So we skip install and install npm dependencies manually in each stage.
install: skip
notifications:
slack:
template:
# This template config somehow breaks yaml syntax
# in the editor although it is valid yaml syntax
- "Project: lyne-components"
- "Build: <%{build_url}|%{build_number}>"
- "Commit: <%{compare_url}|%{commit}>"
- "Author: %{author}"
- "Result: %{result} in %{duration}"
secure: vB5wQL+sq2HlZ3qY5bt1PL2nf309aUm2TPlEj1phjtZ+qoW5XwMUM6XebMoycmWaesHirK0v0AKWluQwJ6fTu9rDKDDASVc2v3u2vg8fxeYLnMoCSoEalpmS6kBcxmXwqlIJUfIG8ow1pkcaTeiKYK/2ZHCdn3ArQ6ouAKh1P//VtpR3Dc/aai+TInJBhprYrk31scVTw81rOQU3F3GPJuVS1lelvyOhjy+12gqYRWPzU6voBmaG7eYhyqEjGfJJS7p1DM3QpnDar18seOK8tKjSiThWPS9VHYcaBBh1mBslkshqU0jiPRMQNWPtw7lf/7ueRe1drQsMSABPeQlbTdGYSh+w48P24vl4xPoGdhI0LTLpzzjmTROBRJPtQ7krZTswjSNKnVgbU8gVZLDSI77BI1o9flQNF1PBYxzru10WlznlDdeZwRotdV3wVDdHtYLBUq6qs6NuLbYnVPDgIgclMdeYVHf9l0aTSFq2SSVV0Y8SpvAOweuQoZD6bf+5jnUvAKDdg4EVN7yR1mWANwOg3ahOZDVykpRFPYIAe4lN8QwT2CjqHrkF9zKpNmcrdR+P1WpFufFaZO1qFDat6phzw2DcSMZw1DdvRKFgu+1WCvOHAYJJfpS0SuOr5cm3U+noDFUoukSa37qqOEzXsNikb7oxNyCR0RNb+a9rrpY=
jobs:
include:
- stage: build, test and deploy packages and storybook for production
if: ((branch = master AND type != pull_request) AND fork = false)
script:
# install dependencies
- npm install
# it may be that we get an api request from design-tokens build. in that
# case, we need to install lyne-design-tokens and lyne-icons
# an make an according commit
- node ./ci/designTokensUpdate.js --eventType=$TRAVIS_EVENT_TYPE --buildId=$TRAVIS_BUILD_ID
# lint
# travis_terminate 1: make sure build immediately stops if the
# Command exits with non-zero code
- npm run lint || travis_terminate 1
# Make Stencil production build
- npm run build:stencil || travis_terminate 1
# Run tests
- npm run test:prod || travis_terminate 1
# upload coverage report
- bash <(curl -s https://codecov.io/bash)
after_success:
# run semantic release
- npm run semantic-release
# Make Storybook build
- STORYBOOK_COMPONENTS_VERSION=$(cat .version) npm run build:storybook
# Send storybook to chromatic. These snapshots should be accepted as new
# baseline in storybook.
- npm run chromatic:master
# install netlify-cli. We send stdout/stderr to /dev/null since we're not
# interested in the output from netlify-cli
- npm install netlify-cli -g > "/dev/null" 2>&1
# Build Storybook and run Netlify deploy
- ./ci/netlify_deploy.sh
# Build and deploy the deployments json
- ./ci/deployments.sh
# trigger a build on lyne-documentation
- node ./ci/trigger_lyne_documentation.js -t $TRAVIS_TOKEN
- stage: build, test and deploy storybook for branches other than master
if: ((branch != master OR type = pull_request) AND fork = false)
script:
# install dependencies
- npm install
# Lint
- npm run lint || travis_terminate 1
# Make Stencil production build
- npm run build:stencil || travis_terminate 1
# Run tests
- npm run test:prod || travis_terminate 1
# upload coverage report
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash <(curl -s https://codecov.io/bash); fi'
after_success:
# install netlify-cli. We send stdout/stderr to /dev/null since we're not
# Interested in the output from netlify-cli
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm install netlify-cli -g > "/dev/null" 2>&1; fi'
# Make Storybook build
- npm run build:storybook
# Send storybook to chromatic
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm run chromatic; fi'
# Build Storybook and run Netlify deploy
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./ci/netlify_deploy_branch.sh $TRAVIS_BRANCH; fi'
# Build and deploy the deployments page
- ./ci/deployments.sh
# trigger a build on lyne-documentation
- node ./ci/trigger_lyne_documentation.js -t $TRAVIS_TOKEN
Build Config
{
"os": [
"linux"
],
"env": {
"global": [
{
"COVERAGE": "1"
}
],
"matrix": [
{
"INTEGRATION_SPECS": "0"
},
{
"INTEGRATION_SPECS": "1"
}
]
},
"rvm": [
"2.5.3"
],
"dist": "xenial",
"cache": {
"bundler": true
},
"deploy": [
{
"on": {
"repo": "travis-ci/travis-build",
"branch": [
"master"
],
"condition": [
"$INTEGRATION_SPECS == 1"
]
},
"bucket": "travis-build-examples",
"region": "us-east-1",
"provider": "s3",
"local_dir": "examples",
"skip_cleanup": true,
"access_key_id": {
"secure": "fXt5NG5UGDvpnRFvUUk9J//iSo+Vh28oEUJvjZqiUZ9GRHp5TrIS5vL4bPlD/1RrJRp7BVVj1+4ThXZRzrMhF5xazK8k4ANaUhMdjmRa6arXtqBcXIyUvu//5e80nlXekqMKaW7f5wrLNiKZB+ck7ayGlI1NYLNQ5nCWC6Xxe6s="
},
"secret_access_key": {
"secure": "Jn9clQh78C2c1zoueTkn0r5kSCHrbb7bMojb8/Ne+6zg0pD/3w25mrhEC4y9b3M/lHoKArOPj4dn03ZErJleM8aOMNMIa6ck8GKP+7EoFlZ/1/C5733HazlldTWDd2+wTOYfSIGOM+mHDP5tmK0S7pr1zEm+/++UExuGZXiCSSI="
}
}
],
"matrix": {
"include": [
{
"env": [
{}
],
"stage": "test",
"script": [
"./script/validate-example-payloads-with-docker"
]
},
{
"if": "NOT type IN (pull_request) AND branch = master",
"env": [
{}
],
"stage": ":ship: it to Quay.io",
"script": [
"./script/docker-build-and-push"
]
}
],
"allow_failures": [
{
"script": [
"./script/docker-build-and-push"
]
}
]
},
"script": [
"bundle exec rspec spec",
"bundle exec rake shfmt",
"bundle exec rake assert_clean",
"bundle exec rake shellcheck",
"bundle exec rake assert_examples"
],
"stages": [
{
"name": "test"
},
{
"name": ":ship: it to Quay.io"
}
],
"language": "ruby",
"after_failure": [
"bundle exec rake dump_examples_logs"
],
"after_success": [
"bundle exec codeclimate-test-reporter"
],
"before_deploy": [
"sudo pip install -U -I Pygments",
"./script/build-s3-index-html"
],
"before_script": [
"eval \"$(script/handle-docker-config)\"",
"bundle exec rake clean assets:precompile"
]
}