@@ -5,16 +5,13 @@ addons:
5
5
apt :
6
6
packages :
7
7
- unzip
8
- # Java8 Required for Sonar and SQLCL
9
- - oracle-java8 -installer
10
- - oracle-java8 -set-default
8
+ # Java9 Required for Sonar and SQLCL
9
+ - oracle-java9 -installer
10
+ - oracle-java9 -set-default
11
11
sonarcloud :
12
12
organization : utplsql
13
13
token :
14
14
secure : ${SONAR_TOKEN}
15
- branches :
16
- - develop
17
- - master
18
15
19
16
services :
20
17
- docker
28
25
- UT3_USER_PASSWORD=ut3
29
26
- UT3_TESTER=ut3_tester
30
27
- UT3_TESTER_PASSWORD=ut3
28
+ - UT3_TESTER_HELPER=ut3_tester_helper
29
+ - UT3_TESTER_HELPER_PASSWORD=ut3
31
30
- UT3_TABLESPACE=users
32
31
# Environment for building a release
33
32
- CURRENT_BRANCH=${TRAVIS_BRANCH}
41
40
- CACHE_DIR=$HOME/.cache
42
41
# Database Env
43
42
- SQLCLI="$HOME/sqlcl/bin/sql"
43
+ - OJDBC_HOME="$HOME/sqlcl/lib"
44
44
- ORACLE_PWD="oracle"
45
45
- UT3_DOCKER_REPO="utplsqlv3/oracledb"
46
46
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
47
47
# utPLSQL released version directory
48
48
- UTPLSQL_DIR="utPLSQL_latest_release"
49
- - SELFTESTING_BRANCH="develop"
50
- - UTPLSQL_CLI_VERSION="3.1.0 "
49
+ - SELFTESTING_BRANCH=${TRAVIS_BRANCH}
50
+ - UTPLSQL_CLI_VERSION="3.1.6 "
51
51
# Maven
52
52
- MAVEN_HOME=/usr/local/maven
53
53
- MAVEN_CFG=$HOME/.m2
54
54
matrix :
55
- - ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
56
- - 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"
57
- - 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"
55
+ - ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
56
+ - ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
57
+ - ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
58
+ - ORACLE_VERSION="${DOCKER_TAG_18:-18c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
59
+ - ORACLE_VERSION="${DOCKER_TAG_19:-19c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
58
60
59
61
cache :
60
62
pip : true
61
63
directories :
62
64
- $CACHE_DIR
65
+ - /home/travis/.sonar/cache
63
66
- node_modules
64
67
- $MAVEN_CFG
65
68
66
69
before_install :
67
- # The update_project_version is done before deployment to validate that the change of project files does not break installation
70
+ # cache to be used between stages. Based on https://github.com/travis-ci/docs-travis-ci-com/issues/1329
71
+ # delete all files in cache that are older than 5 days
72
+ - mkdir -p $CACHE_DIR/stages_cache; find $CACHE_DIR/stages_cache/ -mtime +5 -exec rm {} \;
73
+ # The update_project_version.sh is done before deployment to validate that the change of project files does not break installation
68
74
- bash .travis/update_project_version.sh
69
- - git config --global user.email "builds@travis-ci.com"
70
- - git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
71
- - git remote rm origin
72
- - git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
75
+ # Allow for sonar to blame issues
76
+ - git fetch --unshallow
73
77
# download latest utPLSQL release
74
78
# - curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
75
79
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
@@ -81,49 +85,59 @@ install:
81
85
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
82
86
# Get ojdbc via maven
83
87
- bash .travis/maven_cfg.sh
84
- - pip install mkdocs
85
88
- bash .travis/install_sqlcl.sh
86
89
- sudo mkdir -p /dev/pdbs
87
90
- sudo chmod -R 777 /dev/pdbs
88
91
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/start_db.sh; fi
89
- - df -h
90
92
91
93
before_script :
92
94
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install.sh; fi
93
95
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/install_utplsql_release.sh; fi
94
- - if [[ ! $TRAVIS_TAG ]]; then bash .travis/create_additional_grants_for_old_tests.sh; fi
95
96
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_examples.sh; fi
96
- - if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_old_tests.sh; fi
97
97
98
98
script :
99
99
- if [[ ! $TRAVIS_TAG ]]; then bash test/install_and_run_tests.sh; fi
100
- - if [[ ! $TRAVIS_TAG ]] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sonar-scanner; fi
100
+ - if [[ ! $TRAVIS_TAG ]]; then bash .travis/validate_report_files.sh; fi
101
+ - if [[ ! $TRAVIS_TAG ]] && [[ ("${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" && "${TRAVIS_PULL_REQUEST}" == false) || ("${TRAVIS_PULL_REQUEST_SLUG}" = "${UTPLSQL_REPO}") ]]; then bash .travis/run_sonar_scanner.sh; fi
101
102
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/coveralls_uploader.sh; fi
102
- - bash .travis/build_docs.sh
103
- - if [[ ! $TRAVIS_TAG ]]; then bash .travis/push_release_version.sh; fi
104
- - bash .travis/push_docs_to_gh_pages.sh
105
-
106
- before_deploy :
107
- - bash .travis/build_release_archive.sh
108
-
109
- deploy :
110
- provider : releases
111
- api_key : $github_api_token
112
- file :
113
- - utPLSQL.zip
114
- - utPLSQL.tar.gz
115
- - utPLSQL.zip.md5
116
- - utPLSQL.tar.gz.md5
117
- skip_cleanup : true
118
- on :
119
- repo : ${UTPLSQL_REPO}
120
- tags : true
121
- # when building from a release tag, use only first job "#xxx.1" to publish artifacts
122
- condition : " ${TRAVIS_JOB_NUMBER} =~ \\ .1$"
123
103
124
104
notifications :
125
105
slack :
126
106
rooms :
127
107
- secure : " nemt9n2y5sVCAKqa/s7JDQ8AcM59Xu/XbH/RkMOXvPgc+KtR8lBtVD1LkvJ5BaQhqgjuDT7DNt/uisQJ7k6a2OsrVFbnkypZ1hCvntOBpJyoSpD/YL1X8a9GbGojuJcph0BX76KN21LaOVdyOfY0TSlw53XiYWS8iL5HtjpWCbIwHL1SJ8JT8mhdT4hDoUWZjcZ4s4bLH6BQm4un/bMQOmB4sDoCeg4CllJwxgkswVF7OHpOFjgPetvUp7ps8b/Rj8en6zCj9drb0SVbXFgumo2Wd1bC3HHZB8MAZU0kuEV5VgUdum6EelUL5yfB72hssNQA0+CaT3HjBFkTlqWYJmjC4/xyGN3sseiW82T9FDY0g0GAGayNRW+QSiTQ1hbJEcAnNe0GrBUdRsgXdI6COd76YP5VxzRSF6H7niLfgCZdKbIivKUd1o+wBhuyJmqCFIkRWmT38tMGJqJAzbY1jq5gQXbb6E7gt+KdTjlSjcnJYf7XI7zqm+BRr+fbA0ixfXHvfqOBgZN6g08y9nPlDnIjtSF2NSdrj2zqYQAtKuWSOD1bnTyfDJyrtK7OLffZcMYD5Bcss4c8op8tP7MGTjt1S046SJocboh6H4c/nTokpoMRsWs6MKRdebl8C2RObGf5FebSOJg+oh2ZYS5Z/G9GshiY2BD/81+Hc4Miacc="
128
108
on_success : change
129
109
on_failure : always
110
+
111
+ jobs :
112
+ include :
113
+ - stage : deploy
114
+ env : ORACLE_VERSION="none"
115
+ before_install : skip
116
+ install :
117
+ - pip install mkdocs
118
+ before_script : skip
119
+ script :
120
+ - if [[ ($TRAVIS_BRANCH == develop) && ($TRAVIS_PULL_REQUEST == false) ]]; then bash .travis/trigger_travis.sh $TRAVIS_ACCESS_TOKEN; fi
121
+ - # The update_project_version.sh needs to be done before pushing changes to develop branch
122
+ - bash .travis/update_project_version.sh
123
+ - git config --global user.email "builds@travis-ci.com"
124
+ - git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
125
+ - git remote rm origin
126
+ - git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
127
+ - if [[ ! $TRAVIS_TAG ]]; then bash .travis/push_release_version.sh; fi
128
+ - bash .travis/build_docs.sh
129
+ - bash .travis/push_docs_to_gh_pages.sh
130
+ before_deploy :
131
+ - bash .travis/build_release_archive.sh
132
+ deploy :
133
+ provider : releases
134
+ api_key : $github_api_token
135
+ file :
136
+ - utPLSQL.zip
137
+ - utPLSQL.tar.gz
138
+ - utPLSQL.zip.md5
139
+ - utPLSQL.tar.gz.md5
140
+ skip_cleanup : true
141
+ on :
142
+ repo : ${UTPLSQL_REPO}
143
+ tags : true
0 commit comments