Book Image

GitLab Cookbook

By : Jeroen van Baarsen
Book Image

GitLab Cookbook

By: Jeroen van Baarsen

Overview of this book

Table of Contents (16 chapters)
GitLab Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a build script


In order to have GitLab CI build your projects, you need to tell it how to build the project. In this example, we will take a look at how you can easily set up a build script. I'll use a web app build on Ruby on Rails. If you use another programming language, you have to create a different build script.

Getting ready

For this recipe, I'll be using the passty project made by Dmitriy Zaporozhets, the creator of GitLab. The passty project is a web-based password management tool. You can find the project on https://github.com/randx/passty. You need to import this project on your own GitLab server. The passty project is just an arbitrary example.

How to do it…

  1. First, we need to make sure that all the dependencies for this project are installed.

  2. Log in via SSH to your GitLab CI server.

  3. Let's install SQLite:

    $ wget http://www.sqlite.org/2014/sqlite-autoconf-3080600.tar.gz
    $ sudo tar xvfz sqlite-autoconf-3080600.tar.gz
    $ cd sqlite-autoconf-3080600
    $ sudo ./configure --prefix=/usr...