@@ -77,7 +77,7 @@ is to configure the authentication data. It is a simple task, but Maven requires
...
@@ -77,7 +77,7 @@ is to configure the authentication data. It is a simple task, but Maven requires
it to stay in a file called `settings.xml` that has to be in the `.m2` subdirectory
it to stay in a file called `settings.xml` that has to be in the `.m2` subdirectory
in the user's homedir.
in the user's homedir.
Since you want to use GitLab Runner to automatically deploy the application, you
Since you want to use a runner to automatically deploy the application, you
should create the file in the project's home directory and set a command line
should create the file in the project's home directory and set a command line
parameter in `.gitlab-ci.yml` to use the custom location instead of the default one:
parameter in `.gitlab-ci.yml` to use the custom location instead of the default one:
...
@@ -105,7 +105,7 @@ parameter in `.gitlab-ci.yml` to use the custom location instead of the default
...
@@ -105,7 +105,7 @@ parameter in `.gitlab-ci.yml` to use the custom location instead of the default
Now it's time we set up [GitLab CI/CD](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) to automatically build, test and deploy the dependency!
Now it's time we set up [GitLab CI/CD](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) to automatically build, test and deploy the dependency!
GitLab CI/CD uses a file in the root of the repository, named `.gitlab-ci.yml`, to read the definitions for jobs
GitLab CI/CD uses a file in the root of the repository, named `.gitlab-ci.yml`, to read the definitions for jobs
that will be executed by the configured GitLab Runners. You can read more about this file in the [GitLab Documentation](../../yaml/README.md).
that will be executed by the configured runners. You can read more about this file in the [GitLab Documentation](../../yaml/README.md).
First of all, remember to set up variables for your deployment. Navigate to your project's **Settings > CI/CD > Environment variables** page
First of all, remember to set up variables for your deployment. Navigate to your project's **Settings > CI/CD > Environment variables** page
and add the following ones (replace them with your current values, of course):
and add the following ones (replace them with your current values, of course):
...
@@ -146,7 +146,7 @@ deploy:
...
@@ -146,7 +146,7 @@ deploy:
-master
-master
```
```
GitLab Runner will use the latest [Maven Docker image](https://hub.docker.com/_/maven/), which already contains all the tools and the dependencies you need to manage the project,
The runner will use the latest [Maven Docker image](https://hub.docker.com/_/maven/), which already contains all the tools and the dependencies you need to manage the project,
in order to run the jobs.
in order to run the jobs.
Environment variables are set to instruct Maven to use the `homedir` of the repository instead of the user's home when searching for configuration and dependencies.
Environment variables are set to instruct Maven to use the `homedir` of the repository instead of the user's home when searching for configuration and dependencies.
@@ -62,7 +62,7 @@ Find your Heroku API key in [Manage Account](https://dashboard.heroku.com/accoun
...
@@ -62,7 +62,7 @@ Find your Heroku API key in [Manage Account](https://dashboard.heroku.com/accoun
For each of your environments, you'll need to create a new Heroku application.
For each of your environments, you'll need to create a new Heroku application.
You can do this through the [Heroku Dashboard](https://dashboard.heroku.com/).
You can do this through the [Heroku Dashboard](https://dashboard.heroku.com/).
## Create Runner
## Create a runner
First install [Docker Engine](https://docs.docker.com/installation/).
First install [Docker Engine](https://docs.docker.com/installation/).
...
@@ -92,6 +92,6 @@ gitlab-runner register \
...
@@ -92,6 +92,6 @@ gitlab-runner register \
--docker-image ruby:2.6
--docker-image ruby:2.6
```
```
With the command above, you create a Runner that uses the [`ruby:2.6`](https://hub.docker.com/_/ruby) image and uses a [PostgreSQL](https://hub.docker.com/_/postgres) database.
With the command above, you create a runner that uses the [`ruby:2.6`](https://hub.docker.com/_/ruby) image and uses a [PostgreSQL](https://hub.docker.com/_/postgres) database.
To access the PostgreSQL database, connect to `host: postgres` as user `postgres` with no password.
To access the PostgreSQL database, connect to `host: postgres` as user `postgres` with no password.