8000 Adding travis build for docker images · utPLSQL/docker-scripts@f569a20 · GitHub
[go: up one dir, main page]

Skip to content

Commit f569a20

Browse files
committed
Adding travis build for docker images
1 parent 60a9508 commit f569a20

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.travis.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
language: java
2+
os: linux
3+
services:
4+
- docker
5+
6+
env:
7+
global:
8+
- UT3_RELEASE_VERSION_SCHEMA=UT3
9+
- UT3_TABLESPACE=users
10+
- UTPLSQL_REPO="utPLSQL/utPLSQL"
11+
- ORACLE_PWD="oracle"
12+
- DOCKHER_HUB_REPO="utplsqlv3/oracledb"
13+
- DOCKER_VOLUME="/home/oracle/host"
14+
- DOCKER_ENV="-e SQLCLI=sqlplus -e UT3_RELEASE_VERSION_SCHEMA -e UT3_TABLESPACE -e ORACLE_PWD -e CONNECTION_STR -e UTPLSQL_DIR"
15+
#utPLSQL released version directory
16+
- UTPLSQL_DIR="utPLSQL"
17+
18+
jobs:
19+
- ORACLE_VERSION="11g-r2-xe" DOCKER_DIR='11.2.0.2-xe-small' DOWNLOAD_NAME='xe11g' CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_VOLUME="/mnt/host" DOCKER_OPTIONS='--shm-size=1g'
20+
- ORACLE_VERSION="12c-r1-se2-small" DOCKER_DIR='12.1.0.2-small' DOWNLOAD_NAME='se12c' CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
21+
22+
before_install:
23+
24+
#Allow for sonar to blame issues
25+
- git fetch --unshallow
26+
# download latest utPLSQL release
27+
- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip\"" | sed 's/"//g')
28+
# download latest utPLSQL-cli release
29+
- curl -Lk -o utPLSQL-cli.zip $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL-cli/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip\"" | sed 's/"//g')
30+
31+
install:
32+
- unzip utPLSQL.zip
33+
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
34+
35+
# Chmod is needed to allow for write access within from docker container volume
36+
- chmod -R go+w ./${UTPLSQL_DIR}/source
37+
38+
script:
39+
- docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}"
40+
- cd ${DOCKER_DIR} && docker build --no-cache --force-rm --squash -t ${ORACLE_VERSION} .
41+
- docker image ls

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# docker-scripts
22
The docker scripts are based on the [Oracle docker-images](https://github.com/oracle/docker-images/) repository but modified so that resulting image is small enough to be used with Travis CI.
33

4-
To use the scripts you need to download the archive of the desired DB vesion from the Oracle website.
4+
To use the scripts you need to download the archive of the desired DB version from the Oracle website.
55

66
To build an image go to the folder of desired DB version and execute
77
```

0 commit comments

Comments
 (0)
0