forked from Teradata/presto-checks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (78 loc) · 4.13 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
language: java
dist: trusty
# Use previous images because the current ones cause timeouts
# https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch
group: deprecated-2017Q2
addons:
apt:
packages:
- oracle-java8-installer
services:
- docker
env:
matrix:
- PRODUCT_TESTS='bulk'
- PRODUCT_TESTS='hive_coercion'
- PRODUCT_TESTS='big_query'
- PRODUCT_TESTS='auth_mechanisms'
# The whole section is reserved for overriding by cron-ed API calls.
# Partial overrides are impossible. See https://docs.travis-ci.com/user/triggering-builds.
before_install:
- export ARTIFACTS_S3_BUCKET='ARTIFACTS_S3_BUCKET_WILL_BE_OVERRIDEN'
- export ARTIFACTS_S3_PATH='ARTIFACTS_S3_PATH_WILL_BE_OVERRIDEN'
- export PRESTO_BRANCH='BRANCH_WILL_BE_OVERRIDEN'
- export PRESTO_BUILD='BUILD_WILL_BE_OVERRIDEN'
install:
- sudo pip install awscli
- |
aws s3 sync s3://${ARTIFACTS_S3_BUCKET}/${ARTIFACTS_S3_PATH}/${PRESTO_BRANCH}/${PRESTO_BUILD} /tmp/artifacts \
--exclude '*' \
--include 'git-revision.txt' \
--include 'presto-server-*.tar.gz' \
--include 'presto-cli-*-executable.jar' \
--include 'presto-product-tests-*-executable.jar' \
--no-sign-request
- git clone --depth=1000 --branch=${PRESTO_BRANCH} https://github.com/Teradata/presto.git
- cd presto
- git checkout `cat /tmp/artifacts/git-revision.txt`
- git show HEAD --shortstat
- tar -xf /tmp/artifacts/presto-server-*.tar.gz -C /tmp/
script:
- export PRESTO_SERVER_DIR=/tmp/presto-server-*
- export PRESTO_CLI_JAR=/tmp/artifacts/presto-cli-*-executable.jar
- export PRODUCT_TESTS_JAR=/tmp/artifacts/presto-product-tests-*-executable.jar
- |
[ ! $PRODUCT_TESTS == 'bulk' ] || \
../ensure_command_output.sh ./presto-product-tests/bin/run_on_docker.sh singlenode -x quarantine,big_query,profile_specific_tests,tpcds,hive_coercion,storage_formats
- |
[ ! $PRODUCT_TESTS == 'hive_coercion' ] || \
../ensure_command_output.sh ./presto-product-tests/bin/run_on_docker.sh singlenode -g hive_coercion,storage_formats -x quarantine,big_query,tpcds,profile_specific_tests
- |
[ ! $PRODUCT_TESTS == 'big_query' ] || \
../ensure_command_output.sh ./presto-product-tests/bin/run_on_docker.sh singlenode -g big_query,hdfs_no_impersonation
- |
[ ! $PRODUCT_TESTS == 'auth_mechanisms' ] || \
../ensure_command_output.sh ./presto-product-tests/bin/run_on_docker.sh singlenode-hdfs-impersonation -g hdfs_impersonation
- |
[ ! $PRODUCT_TESTS == 'auth_mechanisms' ] || \
../ensure_command_output.sh ./presto-product-tests/bin/run_on_docker.sh singlenode-kerberos-hdfs-impersonation -g hdfs_impersonation,authorization
after_script:
- |
if [[ -v S3_ACCESS_KEY ]]; then
export AWS_ACCESS_KEY_ID=${S3_ACCESS_KEY}
export AWS_SECRET_ACCESS_KEY=${S3_SECRET_KEY}
mkdir -p /tmp/links/${TRAVIS_BRANCH}
JOB_STATUS=`[ "$TRAVIS_TEST_RESULT" == "0" ] && echo SUCCESS || echo FAILURE`
echo "<script>location='https://travis-ci.org/${TRAVIS_REPO_SLUG}/builds/${TRAVIS_BUILD_ID}'</script>" \
> /tmp/links/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}.html
echo "<script>location='https://travis-ci.org/${TRAVIS_REPO_SLUG}/jobs/${TRAVIS_JOB_ID}'</script>" \
> /tmp/links/${TRAVIS_BRANCH}/${TRAVIS_JOB_NUMBER}_${JOB_STATUS}.html
aws s3 sync /tmp/links \
s3://${ARTIFACTS_S3_BUCKET}/${ARTIFACTS_S3_PATH}/${PRESTO_BRANCH}/${PRESTO_BUILD}/travis_checks
fi
notifications:
slack:
rooms:
- secure: nySGKmnKD3PyKeKC7G6bHqnPgPeBdlrQsBqWGYrPtvXqdF8X9JLUFHgHrRfeRuMfmqkEjRIibBvnjc6dZNcBZ+fJ8XuF7uAeJofsUZbUpfu8a1P3cglCYVKbmC3ilM1oraIqWxagwxhhBAtnMy5wucrAOQTEBCLkQCtPUyFVCG88VbHXz/5ICtGaKlNUh+HVYXPsx//gyMGT+XdhChtKPSiNlAlmLyqdJAbHAl0TiAaleV+KC8f6LR8vZnew8cuUyv/bXgM0/ImULA8Fsc9uAAvGFwQJ/aDdcsgr9Y0PBLnxnYcbVVudlG5mhjOuKmR2IqOLIf4yf+WhJU3uEwfYUJ52zW0uBRrxj1NszwB4mrFa6qBv+1BuCEiS1fQ54/FInriJE+j2yg/UHN5KAwG0Dt2bOeSH8PZFCdALu9mONHVlqMHPnrMT2PvIUmkvhtAFvOKC8VsIAazTtV1DireV/Zhz8CjV2zBYtWJHNwA2OzK//78jl1X/633c40Hqx54Ya/gTtEvPb91wvbGL2KWK3uH/LUJhn9apjNSWT7tk2Fqcmq7HCGeaHkUMjAbZL45FffChBS1r0SO8/0vteVECbUbTOYkprm9Fb4vXS16GCeLwqfcFEZa13lTRTGaK8FALOm/aHsCzABh2ojdOI1XU32R97bVYd4jaW527Dd0SjyY=
on_success: change
on_failure: always