-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
60 lines (52 loc) · 2.35 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
env:
- ENV=expc
- ENV=ese-10.5
- ENV=ese-11.1
sudo: required
services:
- docker
before_install:
# Builds Express-C image
- if [ ${ENV} = 'expc' ] ; then
docker build -t angoca/db2-install:expc db2-install/expc/ ; docker images ;
fi
- if [ ${ENV} = 'expc' ] ; then
docker build -t angoca/db2-db2inst1:expc db2-db2inst1/expc/ ; docker images ;
fi
# Builds Enterprise Server Edition image for V10.5
- if [ ${ENV} = 'ese-10.5' ] ; then
docker build -t angoca/db2-install:ese-10.5 db2-install/10.5/server_t/ ; docker images ;
fi
- if [ ${ENV} = 'ese-10.5' ] ; then
docker build -t angoca/db2-db2inst1:ese-10.5 db2-db2inst1/10.5/server_t/ ; docker images ;
fi
# Builds Enterprise Server Edition image for V11.1
- if [ ${ENV} = 'ese-11.1' ] ; then
docker build -t angoca/db2-install:ese-11.1 db2-install/11.1/server_t/ ; docker images ;
fi
- if [ ${ENV} = 'ese-11.1' ] ; then
docker build -t angoca/db2-db2inst1:ese-11.1 db2-db2inst1/11.1/server_t/ ; docker images ;
fi
script:
- docker images
# Name of the instance
- DB2USER=db2inst1
# Starts Express-C image
- if [ ${ENV} = 'expc' ] ; then
echo ". /home/${DB2USER}/sqllib/db2profile ; db2start ; db2sampl ; db2 connect to sample ; cat /home/${DB2USER}/sqllib/db2dump/db2diag.log " | docker run -i --ipc="host" --privileged=true --name="${DB2USER}" -p 50000:50000 angoca/db2-db2inst1:expc ;
fi
# Starts Enterprise Server Edition image
- if [ ${ENV} = 'ese-10.5' ] || [ ${ENV} = 'ese-11.1' ] ; then
echo ". /home/${DB2USER}/sqllib/db2profile ; db2start ; db2 create db test ; db2 connect to test ; cat /home/${DB2USER}/sqllib/db2dump/db2diag.log " | docker run -i --ipc="host" --privileged=true --name="${DB2USER}" -p 50000:50000 angoca/db2-db2inst1:${ENV} ;
fi
# Starts the instance and creates a database.
#- docker ps -a
#- docker start $(docker ps -a -q)
#- docker exec -u ${DB2USER} $(docker ps -a -q) ". ~${DB2USER}/sqllib/db2profile ; db2start"
#- docker exec -u ${DB2USER} $(docker ps -a -q) ". ~${DB2USER}/sqllib/db2profile ; db2 create db test"
#- docker exec -u ${DB2USER} $(docker ps -a -q) ". ~${DB2USER}/sqllib/db2profile ; db2 connect to test"
after_success:
# Logs into Docker
- if [ "$TRAVIS_BRANCH" == "master" ] ; then
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" ;
fi