Key Information

Register
Submit
The challenge is finished.

Challenge Overview

A previous challenge has implemented a set of REST APIs for handling video assets, including storing them and managing them (create, retrieve, update, delete).  This challenge will document a continuous integration setup.

Existing API

The existing Node application and deployment details are in Gitlab, and the URL to the repository can be found in the forum.
 
Requirements

Currently, we use magnum-ci for our continuous integration of the TVWebApps codebase.  At every checkin, Magnum CI downloads the latest code, installs the dependencies, runs the tests, and then deploys to a configured Heroku server.  This challenge will investigate and document a setup using Gitlab CI instead:

https://docs.gitlab.com/ce/ci/

Your documentation and tested setup needs to cover configuring Gitlab CI to do these steps on every check-in:

* Get the code
* Install the dependencies
* Run the tests and lint
* Send a message to a Slack channel on success or failure
* Deploy to Heroku if tests pass

Current setup

The current setup in Magnum CI is as follows, for the master branch on git@gitlab.com:hercules-tv-web-apps/web.git

Environmental variables:
HEROKU_APPNAME=tvnews1-deploy-test
HEROKU_TOKEN={my Heroku deploy token}
YOUTUBE_KEY={my Youtube token}
NPM_TOKEN={npm token for internal npm - in forum}

Before installation steps:

nvm install v6
nvm use v6
sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install gcc-4.8 g++-4.8 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
gcc --version
Dependencies installation:
npm install
Test suite:
npm test
 
Slack and Heroku are both configured as additional addons / deployments in Magnum CI
README

Please make a new "CI_README.md" file that includes details and steps for setting up Gitlab CI.

Unit tests

Unit tests are not required for this challenge, but the existing unit tests need to run in the CI environment.
 
Submission format

Your submission should be provided as a Git patch file against the commit hash mentioned in the forum.  MAKE SURE TO TEST YOUR PATCH FILE!
 


Final Submission Guidelines

Please see above

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30056023