-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
89 lines (79 loc) · 2.66 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
language: go
service:
- docker
go:
- "1.16.x"
os:
- linux
services:
- docker
branches:
only:
- master
- /^release-[0-9]+\..*$/
addons:
sonarcloud:
organization: "open-cluster-management"
token:
secure: "QlLPdt1qmCQHznVrrd8rD/IoDb1RjpC0tmNv4cNw2sdMDbbohIKwjaxQ4CbzZGxLn5DWnLwumwhZtFsikDBEsruR5/yUytI+4luTbm583QUEjswRGVG/Qbiol7R3qJdkDJSgc1dYflXneKh+jCYhnvrIb5No+8+AHZ90kCQ1TDEercbyKIBQgIwxvl3RZIFzhAFUj/hkZSUYcc+45K4BeMDhJL9FQX56vOQeLuraTTs8EzLv9NQZTqj8oePaG4AsfH09F0G+3cGAPKd0uZtlBB6b7QnGb9TB/3NlklhdRwNAd84t4RsYEvaIehA1TsdOfeKtJJRzidj+QZaKTHmKG+//W6RWhoUI73LzXDA1l+Z5x6uYPIx7azvtEVoDkMyBTKqHVVfVsdVCoEB8VUWcfnpSzszFz/m1brfph4X1Ghacr8iCA0uYbqqla+bDZJFuEhbPb22VxPXILQGnyJBuAP0Zj8vOn+x76c1JNFCt4TG36Z12ej3AAbPFRUD38ZzsF/NtJ6UDdPTum8ufSBC22MdHLbxkn+ZFBaolVoReMin8D7ho5rR9KjWsklh97bO7G4TRswIPOdzHHHxSeogO+YloZgR7XlXxDKIm74heOzp0uuOrtdxMklo+8Dm38v08jnagYonmAkh/J7AwAggTFn8KwRWv3bDISb5UsQYuL08="
env:
global:
# Required
- OS=linux
- COMPONENT_TAG_EXTENSION="-${TRAVIS_COMMIT}"
# Component Specific
- COMPONENT_TYPE="make"
- COMPONENT_INIT_COMMAND=${TRAVIS_BUILD_DIR}/build/install-dependencies.sh
- COMPONENT_BUILD_COMMAND=${TRAVIS_BUILD_DIR}/build/build.sh
- COMPONENT_UNIT_TEST_COMMAND=${TRAVIS_BUILD_DIR}/build/run-unit-tests.sh
- COMPONENT_E2E_TEST_COMMAND=${TRAVIS_BUILD_DIR}/build/run-e2e-tests.sh
before_install:
- ./build/install-dependencies.sh
- export ISHIELD_REPO_ROOT=$TRAVIS_BUILD_DIR
stages:
- lint
- build
- test-unit
- test-e2e
- publish
jobs:
include:
- stage: lint
name: "Run code lint"
script:
- |
make lint
- stage: build
name: "Build the image and push it"
script:
- |
make init
make component/build
make sec-scan
- stage: test-unit
name: "Run unit test"
script:
- set -e
- |
make init
make component/test/unit
make test-gpg-annotation
make sonar-go-test-ishield
make sonar-go-test-op
# make sonar/go enable it after resolving package references to upstream repo
- stage: test-e2e
name: "Deploy the image to a cluster and run e2e tests"
script:
- |
make init
make component/pull
make component/test/e2e
- stage: publish
name: "Publish the image to quay with an official version/sha tag and publish entry to integration pipeline stage"
if: env(ENABLE_PUBLISH) = true AND branch =~ /^release-[0-9]+\..*$/
script:
- |
make init
make component/build
make publish
#${TRAVIS_BUILD_DIR}/build/pipeline.sh