SAP Spartacus基于travis的持续集成

时间:2022-07-25
本文章向大家介绍SAP Spartacus基于travis的持续集成,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

.travis.yml文件的内容:

dist: bionic
language: node_js
node_js:
  - 12.16.1
cache: yarn
git:
  depth: false
branches:
  only:
    - develop
    - master
    - "/^feature\/.*$/"
    - "/^hotfix\/.*$/"
    - "/^release\/.*$/"
    - "/^doc\/.*$/"
    - "/^epic\/.*$/"
env:
  - TEST_SUITE="./build.sh sonar"
  - TEST_SUITE="./ci-scripts/e2e-cypress.sh"
script: $TEST_SUITE
deploy:
  provider: script
  skip_cleanup: true
  script: bash scripts/publish-builds.sh
  on:
    branch: develop
notifications:
  email:
    on_failure: always
    on_success: change
addons:
  chrome: stable
  sonarcloud:
    organization: sap

Then commit your changes and push them to your repository.

Last step: Sign up for Travis CI and add your project. You’ll need to push a new commit to trigger a build.