Finished initial automated building with docker

This commit is contained in:
seefo
2018-01-11 03:36:41 -05:00
parent 4bb8321982
commit d8a0293178
7 changed files with 45 additions and 8 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
src/*
dsrc/*
server/*
.setup

7
.gitmodules vendored
View File

@@ -1,7 +0,0 @@
[submodule "src"]
path = src
url = https://bitbucket.org/seefoe/src.git
[submodule "dsrc"]
path = dsrc
url = https://bitbucket.org/seefoe/dsrc.git

12
build_src.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
basedir=$PWD
if [ ! -f $basedir/.setup ]; then
cd $basedir/src/
$basedir/utils/get_redist.sh
$basedir/utils/build_docker.sh
touch $basedir/.setup
fi
# run the docker image and build the source
docker run --mount source=swg-src,destination=/swg/ swg-compiler

2
clone_repos.sh Executable file
View File

@@ -0,0 +1,2 @@
git clone https://bitbucket.org/seefoe/src.git
git clone https://bitbucket.org/seefoe/dsrc.git

2
src

Submodule src updated: 6fe7df696c...6320d8f6b6

10
utils/build_docker.sh Executable file
View File

@@ -0,0 +1,10 @@
# build the docker image from our dockerfile
docker build -t swg-compiler .
# delete old symlink incase it already exists
rm /var/lib/docker/volumes/swg-src/_data
# create docker volume and symlink to our src folder
docker volume create swg-src
rm -rf /var/lib/docker/volumes/swg-src/_data
ln -s $PWD/ /var/lib/docker/volumes/swg-src/_data

19
utils/get_redist.sh Executable file
View File

@@ -0,0 +1,19 @@
if [ ! -d "redist" ]; then
mkdir redist
fi
if [ ! -f ./redist/oracle-instantclient12.1-basic-12.1.0.2.0-1.i386.rpm ]; then
wget https://bitbucket.org/seefoe/src/downloads/oracle-instantclient12.1-basic-12.1.0.2.0-1.i386.rpm -P ./redist/
fi
if [ ! -f ./redist/oracle-instantclient12.1-devel-12.1.0.2.0-1.i386.rpm ]; then
wget ./redist/ https://bitbucket.org/seefoe/src/downloads/oracle-instantclient12.1-devel-12.1.0.2.0-1.i386.rpm -P ./redist/
fi
if [ ! -f ./redist/oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.i386.rpm ]; then
wget ./redist/ https://bitbucket.org/seefoe/src/downloads/oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.i386.rpm -P ./redist/
fi
if [ ! -f ./redist/IBMJava2-SDK-1.4.2-13.18.tgz ]; then
wget ./redist/ https://bitbucket.org/seefoe/src/downloads/IBMJava2-SDK-1.4.2-13.18.tgz -P ./redist/
fi