mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
146 lines
4.5 KiB
YAML
146 lines
4.5 KiB
YAML
git:
|
|
depth: 3
|
|
quiet: true
|
|
language: node_js
|
|
dist: trusty
|
|
sudo: required
|
|
node_js:
|
|
# Use the explicit NodeJS LTS version 8.9.4 to avoid any automatic upgrade of the version.
|
|
- '10.16.0'
|
|
|
|
install:
|
|
echo "no install"
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- development
|
|
- /.*old-env.*/
|
|
- /.*next-release.*/
|
|
- /.*beta.*/
|
|
- /.*greenkeeper.*/
|
|
|
|
# TRAVIS_PULL_REQUEST == false means is running on dev branch and is not a PR
|
|
stages:
|
|
- name: Lint & Build Dist
|
|
- name: Unit test
|
|
- name: Deploy docker
|
|
if: type = push
|
|
- name: Update Rancher
|
|
if: type = push
|
|
- name: Release on npm
|
|
if: type = push
|
|
- name: Check bundle
|
|
if: type = push
|
|
- name: e2e Test
|
|
- name: Deploy PR
|
|
if: type = pull_request
|
|
|
|
|
|
addons:
|
|
chrome: stable
|
|
before_script:
|
|
- "sudo chown root /opt/google/chrome/chrome-sandbox"
|
|
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
|
|
|
|
before_install:
|
|
- export CHROME_BIN=chromium-browser
|
|
- export DISPLAY=:99.0
|
|
- sh -e /etc/init.d/xvfb start
|
|
- sleep 3 # give xvfb some time to start
|
|
|
|
jobs:
|
|
include:
|
|
- stage: Lint & Build Dist
|
|
name: Build Dist
|
|
script:
|
|
- ./scripts/travis/build/build.sh || exit 1;
|
|
- stage: Lint & Build Dist
|
|
name: Lint
|
|
script: ./scripts/lint.sh || exit 1;
|
|
- stage: Unit test
|
|
name: Unit test content
|
|
script: ./scripts/travis/unit-test/content.sh
|
|
- stage: Unit test
|
|
name: Unit test core extension demo
|
|
script: ./scripts/travis/unit-test/core-extension-demo.sh
|
|
- stage: Unit test
|
|
name: Unit test process process-cloud insights
|
|
script: ./scripts/travis/unit-test/process.sh
|
|
- stage: Deploy PR
|
|
name: Deploy PR
|
|
script:
|
|
./scripts/travis/deploy/deploy.sh
|
|
- stage: Update children projects dependency #Update children projects dependency
|
|
name: Update Related Project
|
|
if: tag =~ .*beta.*
|
|
script: ./scripts/travis/update/update-children.sh
|
|
- stage: e2e Test
|
|
name: core
|
|
script: ./scripts/travis/e2e/core-e2e.sh
|
|
- stage: e2e Test
|
|
name: content
|
|
script:
|
|
./scripts/travis/e2e/content-services-e2e.sh
|
|
- stage: e2e Test
|
|
name: search
|
|
script:
|
|
./scripts/travis/e2e/search-e2e.sh
|
|
- stage: e2e Test
|
|
name: process
|
|
script:
|
|
./scripts/travis/e2e/process-services-e2e.sh
|
|
- stage: e2e Test
|
|
name: process Cloud
|
|
script:
|
|
./scripts/travis/e2e/process-services-cloud-e2e.sh
|
|
- stage: Release on npm
|
|
script:
|
|
- ./lib/dist/cli/bin/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
|
|
- stage: Check bundle
|
|
script:
|
|
- ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
|
|
- ./scripts/npm-check-bundles.sh -v ${ADF_VERSION}
|
|
- stage: Deploy docker
|
|
script:
|
|
- TAG_VERSION=$(./scripts/travis/deploy/tag-travis-branch.sh)
|
|
- echo "Running the docker with tag" $TAG_VERSION
|
|
- ./lib/dist/cli/bin/adf-cli docker-publish --loginCheck --loginUsername "$DOCKER_REPOSITORY_USER" --loginPassword "$DOCKER_REPOSITORY_PASSWORD" --loginRepo "$DOCKER_REPOSITORY_DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
|
|
- stage: Update Rancher
|
|
script:
|
|
- TAG_VERSION=$(./scripts/travis/deploy/tag-travis-branch.sh)
|
|
- ./scripts/rancher-update.sh \
|
|
--access_key $RANCHER_TOKEN \
|
|
--secret_key $RANCHER_SECRET \
|
|
--url $REPO_RANCHER \
|
|
--environment_name $REPO_RANCHER_ADF_NAME \
|
|
--image docker:alfresco/demo-shell:$TAG_VERSION
|
|
|
|
|
|
before_deploy:
|
|
# Set up git user name and tag this commit
|
|
- git config --local user.name "Alfresco"
|
|
- export TRAVIS_TAG=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
|
|
- echo "Create tag:" $TRAVIS_TAG
|
|
- git tag $TRAVIS_TAG
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key: $GITHUB_TOKEN
|
|
name: $TRAVIS_TAG
|
|
body: "Add the release note"
|
|
skip_cleanup: true
|
|
on:
|
|
branch: master
|
|
|
|
# Send coverage data to codecov
|
|
after_success:
|
|
bash <(curl -s https://codecov.io/bash) -X gcov
|
|
|
|
cache:
|
|
directories:
|
|
- node_modules
|
|
- demo-shell/dist
|
|
- tmp
|
|
- lib/dist
|