Welcome to CIBox development workflow
Here you can see a quick how-to start current development workflow from scratch to first build for Pull Request.
Prepare GitHub project¶
- Clone repository to your local desktop.
git clone https://github.com/cibox/cibox.git
ciboxsubfolder and run
sh ./repository.shthere. You'll get
FRESH_REPOSITORYsubfolder where all the files prepared for your future project.
- Create new Git repository inside
FRESH_REPOSITORYproject and push it to your remote repository on GitHub.
- Create dedicated user at GitHub for not conflicting with your own personal account. The user's credentials ( how to get a token ) would be used as bot for posting comments from Jenkins to GitHub. This user should have access to a project repo.
- Install ansible 1.9.x at your local desktop.
- Create your own Ubuntu 14.04 powered virtual machine, vps or dedicated server and get its IP address. We recommend DigitalOcean VPS hosting, because we are using its droplets for spinning up CI instances for ~2 years without any issues. Allow root access without password to this virtual machine.
- Go into cloned
ciboxsubfolder and prefill IP address and previously created github bot repo's credentials of created machine to
config.ymlfile within a folder. It is simple yml file.
github_url: https://github.com/NAME/REPOSITORY github_username: BOT_NAME github_token: BOT_ACCESS_TOKEN github_password: BOT_PASSWORD
sh ./provisionfrom console of your desktop machine and wait untill all the software installed onto remote host. If there are errors during install or install been stalled for more than 10 minutes, try to stop
CTRL-Cand rerun the command untill it's done.
- After successful run of
sh ./provisionscript you should login into
How to work with project files?¶
vagrant upwithing the
FRESH_REPOSITORYdirectory and you'll get ready to use virtual machine.
Create first PR on GitHub¶
- Create New Pull request for your project repo and wait ~5 minutes. You should get changed status and build comment afterwards.
- For debugging Jenkins problems use
/var/log/jenkins/jenkins.logon your Jenkins server. Also take a look at Troubleshooting section in CIBox documentation for a possible issues.
For adding more security to spinned up CI server you need to close Jenkins port (8080 by default) via adding nginx/apache htpasswd protection or adding VPN connection only to the server. Keep in mind that Jenking is not good in terms of security even if you will disable everything to anonymous user.