forked from utPLSQL/utPLSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
128 lines (117 loc) · 5.08 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
sudo: required
language: python
addons:
apt:
packages:
- unzip
# Java8 Required for Sonar and SQLCL
- oracle-java8-installer
- oracle-java8-set-default
sonarcloud:
organization: utplsql
token:
secure: ${SONAR_TOKEN}
branches:
- develop
- master
services:
- docker
env:
global:
- UT3_OWNER=ut3
- UT3_OWNER_PASSWORD=ut3
- UT3_RELEASE_VERSION_SCHEMA=UT3_LATEST_RELEASE
- UT3_USER="UT3\$USER#"
- UT3_USER_PASSWORD=ut3
- UT3_TESTER=ut3_tester
- UT3_TESTER_PASSWORD=ut3
- UT3_TABLESPACE=users
# Environment for building a release
- CURRENT_BRANCH=${TRAVIS_BRANCH}
- UTPLSQL_REPO="utPLSQL/utPLSQL"
- UTPLSQL_BUILD_NO="${TRAVIS_BUILD_NUMBER:-0}"
- UTPLSQL_VERSION_PATTERN="v?([0-9]+\.){3}[0-9]+[^']*"
- UTPLSQL_VERSION=$(. .travis/get_project_version.sh)
- UTPLSQL_BUILD_VERSION=$(. .travis/get_project_build_version.sh)
- UTPLSQL_SOURCES_DIR='source'
- UTPLSQL_BUILD_USER_NAME="Travis CI"
- CACHE_DIR=$HOME/.cache
# Database Env
- SQLCLI="$HOME/sqlcl/bin/sql"
- ORACLE_PWD="oracle"
- UT3_DOCKER_REPO="utplsqlv3/oracledb"
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
#utPLSQL released version directory
- UTPLSQL_DIR="utPLSQL_latest_release"
- UTPLSQL_CLI_VERSION="3.0.4"
# Maven
- MAVEN_HOME=/usr/local/maven
- MAVEN_CFG=$HOME/.m2
matrix:
- ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
- ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2}" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
- ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2}" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
cache:
pip: true
directories:
- $CACHE_DIR
- node_modules
- $MAVEN_CFG
before_install:
#The update_project_version is done before deployment to validate that the change of project files does not break installation
- bash .travis/update_project_version.sh
- git config --global user.email "[email protected]"
- git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
- git remote rm origin
- git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
# download latest utPLSQL release
#- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
# download latest utPLSQL-cli release
- curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/download/v${UTPLSQL_CLI_VERSION}/utPLSQL-cli.zip
install:
#- unzip utPLSQL.zip
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
# Get ojdbc via maven
- bash .travis/maven_cfg.sh
- pip install mkdocs
- bash .travis/install_sqlcl.sh
- sudo mkdir -p /dev/pdbs
- sudo chmod -R 777 /dev/pdbs
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/start_db.sh; fi
- df -h
before_script:
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install_utplsql_release.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/create_additional_grants_for_old_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_examples.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_old_tests.sh; fi
script:
- if [[ ! $TRAVIS_TAG ]]; then bash test/install_and_run_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sonar-scanner; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/coveralls_uploader.sh; fi
- bash .travis/build_docs.sh
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/push_release_version.sh; fi
- bash .travis/push_docs_to_gh_pages.sh
before_deploy:
- bash .travis/build_release_archive.sh
deploy:
provider: releases
api_key: $github_api_token
file:
- utPLSQL.zip
- utPLSQL.tar.gz
- utPLSQL.zip.md5
- utPLSQL.tar.gz.md5
skip_cleanup: true
on:
repo: ${UTPLSQL_REPO}
tags: true
# when building from a release tag, use only first job "#xxx.1" to publish artifacts
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"
notifications:
slack:
rooms:
- secure: "nemt9n2y5sVCAKqa/s7JDQ8AcM59Xu/XbH/RkMOXvPgc+KtR8lBtVD1LkvJ5BaQhqgjuDT7DNt/uisQJ7k6a2OsrVFbnkypZ1hCvntOBpJyoSpD/YL1X8a9GbGojuJcph0BX76KN21LaOVdyOfY0TSlw53XiYWS8iL5HtjpWCbIwHL1SJ8JT8mhdT4hDoUWZjcZ4s4bLH6BQm4un/bMQOmB4sDoCeg4CllJwxgkswVF7OHpOFjgPetvUp7ps8b/Rj8en6zCj9drb0SVbXFgumo2Wd1bC3HHZB8MAZU0kuEV5VgUdum6EelUL5yfB72hssNQA0+CaT3HjBFkTlqWYJmjC4/xyGN3sseiW82T9FDY0g0GAGayNRW+QSiTQ1hbJEcAnNe0GrBUdRsgXdI6COd76YP5VxzRSF6H7niLfgCZdKbIivKUd1o+wBhuyJmqCFIkRWmT38tMGJqJAzbY1jq5gQXbb6E7gt+KdTjlSjcnJYf7XI7zqm+BRr+fbA0ixfXHvfqOBgZN6g08y9nPlDnIjtSF2NSdrj2zqYQAtKuWSOD1bnTyfDJyrtK7OLffZcMYD5Bcss4c8op8tP7MGTjt1S046SJocboh6H4c/nTokpoMRsWs6MKRdebl8C2RObGf5FebSOJg+oh2ZYS5Z/G9GshiY2BD/81+Hc4Miacc="
on_success: change
on_failure: always