-
Notifications
You must be signed in to change notification settings - Fork 0
How to setup on debian
This page describes how to set up a deploy bot on debian based operating systems. Most steps will be identical over various operating systems, but some (e.g. software installation) you'll have to replace the commands here by the OS' corresponding counterpart
Btw.: feel free to add other HOWTOs for your OS or distribution
First, we need to ensure that all the software we need gets installed:
apt-get install git-core maven2
Also make sure to have a java compiler installed, (e.g. by installing the package sun-java6-jdk)
Next, we'll create a new user to run our deployscripts (it would be an unnecessary risk to run them as root):
adduser --disabled-password --gecos "tagaprice buildbot" tagaprice
All the other commands need to be run as the newly created user, therefore we'll switch to that user now (and change to it's home directory):
su tagaprice
cd
After that, we'll clone the git repository (and it's submodules):
git clone git://github.com/tagaprice/deployscripts.git
cd deployscripts
git submodule init
git submodule update
If that succeeded, it's time to create the necessary .properties files (the deploy scripts will tell you which ones are still missing).
Each of these .properties-files has a corresponding .properties.example file you can use as template.
To find out which properties files are missing, execute the following command:
$ ./daily_deploy.sh check_properties
From [email protected]:tagaprice/tagaprice
* branch master -> FETCH_HEAD
Already up-to-date.
Error: Property file 'src/test/resources/WEB-INF/conf/jdbc.properties' not found!
Error: Property file 'src/main/webapp/WEB-INF/classes/jdbc.properties' not found!
Error: Property file 'src/main/webapp/WEB-INF/classes/mail.properties' not found!
Script 'check_properties' failed
Create them according to your environment
After the .properties-files are created, it's time for a test run:
./daily_deploy
if the script ran successfully, you can automate the build-process:
crontab -e
add the following line to the file:
23 3 * * * /home/tagaprice/deployscripts/daily_deploy.sh
this will run the script daily at 03:23. Adapt the times to fit your needs.
For more info on the crontab format, you could read the manpage of crontab
man 5 crontab