forked from stolostron/search-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (58 loc) · 2.37 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) 2021 Red Hat, Inc.
# Copyright Contributors to the Open Cluster Management project
language: minimal
services: docker
branches:
only:
- main
- /^release-[0-9]+\..*$/
env:
global:
- OS=linux
- COMPONENT_TAG_EXTENSION="-${TRAVIS_COMMIT}"
before_script:
- travis_retry timeout 2m make init
jobs:
include:
- stage: Build and test
name: 'Run tests, lint, and prettier check'
if: type != cron
language: node_js
node_js: '14'
install: npm ci
script:
- set -e
- npm run lint
- npm run check
- npm test
- name: 'Build docker image and push it to quay'
if: type != cron
script:
- set -e
- travis_retry timeout 2m docker pull registry.access.redhat.com/ubi8/nodejs-14
- travis_retry timeout 2m docker pull registry.access.redhat.com/ubi8/ubi-minimal
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export COMPONENT_TAG_EXTENSION="-PR${TRAVIS_PULL_REQUEST}-${TRAVIS_COMMIT}"; fi;
- make component/build
- if [ "$DOCKER_PASS" != "" ]; then make component/push ; else echo "No DOCKER_PASS. Skipping image push."; fi
- stage: update release manifest
if: type = push AND branch =~ /^release-[0-9]+\..*$/
script: make pipeline-manifest/update PIPELINE_MANIFEST_COMPONENT_SHA256=${TRAVIS_COMMIT} PIPELINE_MANIFEST_COMPONENT_REPO=${TRAVIS_REPO_SLUG} PIPELINE_MANIFEST_BRANCH=${TRAVIS_BRANCH}
- stage: Automated Dependency Upgrade
if: type = cron AND branch = main
language: node_js
node_js: '14'
install: echo skip install
script:
- set -e
- git remote remove origin
- git remote add origin https://${GITHUB_TOKEN}@github.com/@open-cluster-management/search-ui.git > /dev/null 2>&1
- git checkout main
- npm ci
- npm run update
- npm run build
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- git add -u :/
- set +e
- git commit -m "fix(deps) - upgrade dependencies"
- if [ $? -eq 0 ]; then git push origin main; fi