Skip to content

Commit

Permalink
Merge pull request #1048 from utPLSQL/release/v3.1.10
Browse files Browse the repository at this point in the history
Release/v3.1.10
  • Loading branch information
jgebal committed Feb 23, 2020
2 parents c8dae86 + 9034250 commit 624f244
Show file tree
Hide file tree
Showing 75 changed files with 2,324 additions and 1,254 deletions.
18 changes: 6 additions & 12 deletions .travis.yml
Expand Up @@ -30,7 +30,6 @@ env:
- 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'
Expand All @@ -51,10 +50,10 @@ env:
- 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-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
- 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"
- 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"
- 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"
- ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_18:-18c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_19:-19c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'

cache:
pip: true
Expand All @@ -81,11 +80,7 @@ before_install:
install:
#- unzip utPLSQL.zip
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
# Get ojdbc via maven
- bash .travis/maven_cfg.sh
- 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

before_script:
Expand Down Expand Up @@ -115,16 +110,15 @@ jobs:
- pip install mkdocs
before_script: skip
script:
- if [[ ($TRAVIS_BRANCH == develop) && ($TRAVIS_PULL_REQUEST == false) ]]; then bash .travis/trigger_travis.sh $TRAVIS_ACCESS_TOKEN; fi
- #The update_project_version.sh needs to be done before pushing changes to develop branch
- 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}
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/push_release_version.sh; fi
- bash .travis/push_docs_to_github_io.sh
- bash .travis/build_docs.sh
- bash .travis/push_docs_to_gh_pages.sh
- if [[ ($TRAVIS_BRANCH == develop) && ($TRAVIS_PULL_REQUEST == false) ]]; then bash .travis/trigger_travis.sh $TRAVIS_ACCESS_TOKEN; fi
before_deploy:
- bash .travis/build_release_archive.sh
deploy:
Expand Down
33 changes: 27 additions & 6 deletions .travis/install.sh
Expand Up @@ -74,10 +74,6 @@ PROMPT Creating $UT3_TESTER - Power-user for testing internal framework code
create user $UT3_TESTER identified by "$UT3_TESTER_PASSWORD" default tablespace $UT3_TABLESPACE quota unlimited on $UT3_TABLESPACE;
grant create session, create procedure, create type, create table to $UT3_TESTER;
PROMPT Additional grants for disabling DDL trigger and testing parser without trigger enabled/present
grant alter any trigger to $UT3_TESTER;
grant administer database trigger to $UT3_TESTER;
grant execute on dbms_lock to $UT3_TESTER;
PROMPT Granting $UT3_OWNER code to $UT3_TESTER
Expand All @@ -98,7 +94,7 @@ end;
PROMPT Granting $UT3_OWNER tables to $UT3_TESTER
begin
for i in ( select table_name from all_tables t where owner = 'UT3' and nested = 'NO' and IOT_NAME is NULL)
for i in ( select table_name from all_tables t where owner = 'UT3' and nested = 'NO' and iot_name is null)
loop
execute immediate 'grant select on UT3.'||i.table_name||' to UT3_TESTER';
end loop;
Expand All @@ -124,8 +120,33 @@ grant create public database link to $UT3_TESTER_HELPER;
grant drop public database link to $UT3_TESTER_HELPER;
PROMPT Grants for testing coverage outside of main UT3 schema.
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary, create any synonym, drop any synonym to $UT3_TESTER_HELPER;
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type,
select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table,
select any dictionary, create any synonym, drop any synonym,
grant any object privilege, grant any privilege
to $UT3_TESTER_HELPER;
grant create job to $UT3_TESTER_HELPER;
PROMPT Additional grants for disabling DDL trigger and testing parser without trigger enabled/present
grant alter any trigger to $UT3_TESTER_HELPER;
grant administer database trigger to $UT3_TESTER_HELPER;
grant execute on dbms_lock to $UT3_TESTER_HELPER;
create user ut3_cache_test_owner identified by ut3;
grant create session, create procedure to ut3_cache_test_owner;
create user ut3_no_extra_priv_user identified by ut3;
grant create session, create procedure to ut3_no_extra_priv_user;
create user ut3_select_catalog_user identified by ut3;
grant create session, create procedure, select_catalog_role to ut3_select_catalog_user;
create user ut3_select_any_table_user identified by ut3;
grant create session, create procedure, select any table to ut3_select_any_table_user;
create user ut3_execute_any_proc_user identified by ut3;
grant create session, create procedure, execute any procedure to ut3_execute_any_proc_user;
exit
SQL
18 changes: 0 additions & 18 deletions .travis/maven_cfg.sh

This file was deleted.

62 changes: 0 additions & 62 deletions .travis/pom.xml

This file was deleted.

62 changes: 29 additions & 33 deletions .travis/push_docs_to_gh_pages.sh → .travis/push_docs_to_github_io.sh
100755 → 100644
@@ -1,6 +1,6 @@
#!/bin/bash

# Many aspects of this came from https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
# Based on `push_docs_to_gh_pages.sh`
# Significant alterations
# - Support for multiple copies of documentation,
# - only clearing out develop
Expand All @@ -13,59 +13,55 @@
# - File: "docs/index.md" with that contains develop docs

# Required ENV Variables
PAGES_TARGET_BRANCH="gh-pages"
LATEST_DOCS_BRANCH="develop"
GITHUB_IO_REPO='utPLSQL/utPLSQL.github.io'
GITHUB_IO_BRANCH='master'

# TRAVIS_* variables are set by travis directly and only need to be if testing externally

# We don't want a pull request automatically updating the repository
# We deploy only when building on develop branch or on TAG (release)
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST_DOCS_BRANCH}" ] || [ -n "${TRAVIS_TAG}" ]; }; then

# ENV Variable checks are to help with configuration troubleshooting, they silently exit with unique message.
# Anyone one of them not set can be used to turn off this functionality.

# If a version of the project is not defined
[[ -n "${UTPLSQL_VERSION}" ]] || { echo "variable UTPLSQL_VERSION is not defines or missing value"; exit 0; }
[[ -n "${UTPLSQL_VERSION}" ]] || { echo "variable UTPLSQL_VERSION is not defines or missing value"; exit 1; }
# Fail if the markdown documentation is not present.
[[ -f ./docs/index.md ]] || { echo "file docs/index.md not found"; exit 1; }

# Save some useful information
# Store latest commit SHA to be used when committing and pushing to github.io repo
SHA=`git rev-parse --verify HEAD`

# clone the repository and switch to PAGES_TARGET_BRANCH branch
# clone the repository and switch to GITHUB_IO_BRANCH branch
mkdir pages
cd pages
git clone https://${github_api_token}@github.com/${UTPLSQL_REPO} .

PAGES_BRANCH_EXISTS=$(git ls-remote --heads origin ${PAGES_TARGET_BRANCH})
cd ./pages
git clone --depth 1 https://${github_api_token}@github.com/${GITHUB_IO_REPO} -b ${GITHUB_IO_BRANCH} .

if [ -n "$PAGES_BRANCH_EXISTS" ] ; then
echo "Pages Branch Found"
git checkout ${PAGES_TARGET_BRANCH}
else
echo "Creating Pages Branch"
git checkout --orphan ${PAGES_TARGET_BRANCH}
git rm -rf .
fi
mkdir -p utPLSQL
cd ./utPLSQL
#clear out develop documentation directory and copy docs contents to it.
echo "updating 'develop' directory"
mkdir -p develop
rm -rf develop/**./* || exit 0
cp -a ../docs/. ./develop
echo "updating 'develop' documentation directory"
mkdir -p ./develop
rm -rf ./develop/**./* || exit 0
cp -a ../../docs/. ./develop

# If a Tagged Build then copy to it's own directory as well and to the 'latest' release directory
if [ -n "$TRAVIS_TAG" ]; then
echo "Creating ${UTPLSQL_VERSION}"
mkdir -p ${UTPLSQL_VERSION}
rm -rf ${UTPLSQL_VERSION}/**./* || exit 0
cp -a ../docs/. ${UTPLSQL_VERSION}
echo "Populating 'latest' directory"
mkdir -p latest
rm -rf latest/**./* || exit 0
cp -a ../docs/. latest
echo "Creating directory ./${UTPLSQL_VERSION}"
mkdir -p ./${UTPLSQL_VERSION}
rm -rf ./${UTPLSQL_VERSION}/**./* || exit 0
cp -a ../../docs/. ./${UTPLSQL_VERSION}
echo "Populating 'latest' directory"
mkdir -p ./latest
rm -rf ./latest/**./* || exit 0
cp -a ../../docs/. ./latest
fi
# Stage changes for commit
git add .

#Check if there are doc changes, if none exit the script
if [[ -z `git diff HEAD --exit-code` ]] && [ -n "${PAGES_BRANCH_EXISTS}" ] ; then
if [[ -z `git diff HEAD --exit-code` ]]; then
echo "No changes to docs detected."
exit 0
fi
Expand All @@ -75,7 +71,7 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST
echo "---" >>index.md
echo "layout: default" >>index.md
echo "---" >>index.md
echo "<!-- Auto generated from .travis/push_docs_to_gh_pages.sh -->" >>index.md
echo "<!-- Auto generated from .travis/push_docs_to_github_io.sh -->" >>index.md
echo "# Documentation versions" >>index.md
echo "" >>index.md
echo "" >>index.md #- 7th line - placeholder for latest release doc
Expand All @@ -96,6 +92,6 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST
git add .
git commit -m "Deploy to gh-pages branch: base commit ${SHA}"
# Now that we're all set up, we can push.
git push --quiet origin HEAD:${PAGES_TARGET_BRANCH}
git push --quiet origin HEAD:${GITHUB_IO_BRANCH}
fi

51 changes: 0 additions & 51 deletions .travis/settings.xml

This file was deleted.

2 changes: 2 additions & 0 deletions .travis/update_project_version.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

UTPLSQL_VERSION_PATTERN="v?([0-9]+\.){3}[0-9]+[^']*"

echo Current branch is "${CURRENT_BRANCH}"

echo Update version in project source files
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
v3.1.9
v3.1.10
5 changes: 5 additions & 0 deletions development/cleanup.sh
Expand Up @@ -23,6 +23,11 @@ drop user ${UT3_RELEASE_VERSION_SCHEMA} cascade;
drop user ${UT3_TESTER} cascade;
drop user ${UT3_TESTER_HELPER} cascade;
drop user ${UT3_USER} cascade;
drop user ut3_cache_test_owner cascade;
drop user ut3_no_extra_priv_user cascade;
drop user ut3_select_catalog_user cascade;
drop user ut3_select_any_table_user cascade;
drop user ut3_execute_any_proc_user cascade;
begin
for i in (
Expand Down
5 changes: 3 additions & 2 deletions development/releasing.md
@@ -1,9 +1,10 @@
The release process is semi-automated.
## Release process

With every build, the build process on Travis updates files with an appropriate version number before deployment into the database.
This step is performed, to confirm that the update of versions works properly.

To create a release:
## To create a release

- create release branch from development branch and make sure to name the release branch: `release/vX.Y.Z`
- update, commit and push at least one file change in the release branch, to kickoff a Travis build
- wait for th build to complete successfully
Expand Down
2 changes: 1 addition & 1 deletion docs/about/authors.md
@@ -1,4 +1,4 @@
![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg)
![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg)

### utPLSQL v3 Major Contributors

Expand Down

0 comments on commit 624f244

Please sign in to comment.