##GitLab + Jenkins + Auto Deployment.
###Install GitLab
Follow GitLab installation guide
Or via IAM EC2 but it's ver7.x so you would update it to get GitLab CI.
https://about.gitlab.com/upgrade-to-package-repository/
####Install gitlab-ci-runner
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md
####Gitlab Config file
vi /etc/gitlab/gitlab.rb
####Reconfigure Gitlab
sudo gitlab-ctl reconfigure
####Gitlab CI yml file.
- You can define image that you wish to use, this is the yml for nodejs
image: nodesource/wheezy:4.2.1
services:
- mongo
before_script:
- npm install mocha -g
- npm install co-mocha --save-dev
- npm install
test:
script:
- npm test
####MongoDB
- Use MongoDB as another container or service.
- You need to run it (recommend to run it in background) and expose the its port
- To connect mongodb in code, use something like this
mongodb://<name/of/docker/mongo/container>:<port/it/exposes>/test_database
###Rememter
- To run
sudo gitlab-ci-multi-runner run
to run CI runners - Note, run all with
sudo
or it won't work