summaryrefslogtreecommitdiff
path: root/doc/ci/examples
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/examples')
-rw-r--r--doc/ci/examples/devops_and_game_dev_with_gitlab_ci_cd/index.md4
-rw-r--r--doc/ci/examples/laravel_with_gitlab_and_envoy/index.md28
-rw-r--r--doc/ci/examples/php.md8
-rw-r--r--doc/ci/examples/test-and-deploy-python-application-to-heroku.md2
-rw-r--r--doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md2
-rw-r--r--doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md14
6 files changed, 29 insertions, 29 deletions
diff --git a/doc/ci/examples/devops_and_game_dev_with_gitlab_ci_cd/index.md b/doc/ci/examples/devops_and_game_dev_with_gitlab_ci_cd/index.md
index 788d57b81f8..946deb6a5ff 100644
--- a/doc/ci/examples/devops_and_game_dev_with_gitlab_ci_cd/index.md
+++ b/doc/ci/examples/devops_and_game_dev_with_gitlab_ci_cd/index.md
@@ -54,7 +54,7 @@ CI/CD from every new push to master. The `master` branch for this game's [reposi
contains a completed version with all configurations. If you would like to follow along
with this article, you can clone and work from the `devops-article` branch:
-```sh
+```shell
git clone git@gitlab.com:blitzgren/gitlab-game-demo.git
git checkout devops-article
```
@@ -363,7 +363,7 @@ our repository. If all goes well you'll end up with a green check mark on each j
You can confirm that the tests passed by clicking on the `test` job to enter the full build logs.
Scroll to the bottom and observe, in all its passing glory:
-```sh
+```shell
$ gulp run-test
[18:37:24] Using gulpfile /builds/blitzgren/gitlab-game-demo/gulpfile.js
[18:37:24] Starting 'run-test'...
diff --git a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
index 5acdd273548..b8f191570bc 100644
--- a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
+++ b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
@@ -57,7 +57,7 @@ This test is as simple as asserting that the given value is true.
Laravel uses `PHPUnit` for tests by default.
If we run `vendor/bin/phpunit` we should see the green output:
-```bash
+```shell
vendor/bin/phpunit
OK (1 test, 1 assertions)
```
@@ -70,7 +70,7 @@ Since we have our app up and running locally, it's time to push the codebase to
Let's create [a new project](../../../gitlab-basics/create-project.md) in GitLab named `laravel-sample`.
After that, follow the command line instructions displayed on the project's homepage to initiate the repository on our machine and push the first commit.
-```bash
+```shell
cd laravel-sample
git init
git remote add origin git@gitlab.example.com:<USERNAME>/laravel-sample.git
@@ -89,7 +89,7 @@ We have installed LEMP stack which stands for Linux, NGINX, MySQL and PHP on our
Let's now create a new user that will be used to deploy our website and give it
the needed permissions using [Linux ACL](https://serversforhackers.com/c/linux-acls):
-```bash
+```shell
# Create user deployer
sudo adduser deployer
# Give the read-write-execute permissions to deployer user for directory /var/www
@@ -98,7 +98,7 @@ sudo setfacl -R -m u:deployer:rwx /var/www
If you don't have ACL installed on your Ubuntu server, use this command to install it:
-```bash
+```shell
sudo apt install acl
```
@@ -108,7 +108,7 @@ Let's suppose we want to deploy our app to the production server from a private
After that, we need to copy the private key, which will be used to connect to our server as the deployer user with SSH, to be able to automate our deployment process:
-```bash
+```shell
# As the deployer user on server
#
# Copy the content of public key to authorized_keys
@@ -128,7 +128,7 @@ We'll use this variable in the `.gitlab-ci.yml` later, to easily connect to our
We also need to add the public key to **Project** > **Settings** > **Repository** as a [Deploy Key](../../../ssh/README.md#deploy-keys), which gives us the ability to access our repository from the server through [SSH protocol](../../../gitlab-basics/command-line-commands.md#start-working-on-your-project).
-```bash
+```shell
# As the deployer user on the server
#
# Copy the public key
@@ -141,7 +141,7 @@ To the field **Title**, add any name you want, and paste the public key into the
Now, let's clone our repository on the server just to make sure the `deployer` user has access to the repository.
-```bash
+```shell
# As the deployer user on server
#
git clone git@gitlab.example.com:<USERNAME>/laravel-sample.git
@@ -157,7 +157,7 @@ Now, let's make sure our web server configuration points to the `current/public`
Open the default NGINX server block configuration file by typing:
-```bash
+```shell
sudo nano /etc/nginx/sites-available/default
```
@@ -199,7 +199,7 @@ Then within our `@task` directive we define the bash commands that should be run
On the local machine use the `run` command to run Envoy tasks.
-```bash
+```shell
envoy run list
```
@@ -382,7 +382,7 @@ Now it's time to commit [Envoy.blade.php](https://gitlab.com/mehranrasulian/lara
To keep things simple, we commit directly to `master`, without using [feature-branches](../../../topics/gitlab_flow.md#github-flow-as-a-simpler-alternative) since collaboration is beyond the scope of this tutorial.
In a real world project, teams may use [Issue Tracker](../../../user/project/issues/index.md) and [Merge Requests](../../../user/project/merge_requests/index.md) to move their code across branches:
-```bash
+```shell
git add Envoy.blade.php
git commit -m 'Add Envoy'
git push origin master
@@ -407,7 +407,7 @@ With Docker images our builds run incredibly faster!
Let's create a [Dockerfile](https://gitlab.com/mehranrasulian/laravel-sample/blob/master/Dockerfile) in the root directory of our app with the following content:
-```bash
+```shell
# Set the base image for subsequent instructions
FROM php:7.1
@@ -449,13 +449,13 @@ You may need to [enable Container Registry](../../../user/packages/container_reg
To start using Container Registry on our machine, we first need to login to the GitLab registry using our GitLab username and password:
-```bash
+```shell
docker login registry.gitlab.com
```
Then we can build and push our image to GitLab:
-```bash
+```shell
docker build -t registry.gitlab.com/<USERNAME>/laravel-sample .
docker push registry.gitlab.com/<USERNAME>/laravel-sample
@@ -475,7 +475,7 @@ We'll use this image further down in the `.gitlab-ci.yml` configuration file to
Let's commit the `Dockerfile` file.
-```bash
+```shell
git add Dockerfile
git commit -m 'Add Dockerfile'
git push origin master
diff --git a/doc/ci/examples/php.md b/doc/ci/examples/php.md
index 1dd3049d53d..db039b746e3 100644
--- a/doc/ci/examples/php.md
+++ b/doc/ci/examples/php.md
@@ -40,7 +40,7 @@ done.
Let's create a `ci/docker_install.sh` file in the root directory of our
repository with the following content:
-```bash
+```shell
#!/bin/bash
# We need to install dependencies only for Docker
@@ -153,7 +153,7 @@ dependencies are installed.
For example, in a VM running Debian 8 we first update the cache, then we
install `phpunit` and `php5-mysql`:
-```bash
+```shell
sudo apt-get update -y
sudo apt-get install -y phpunit php5-mysql
```
@@ -198,7 +198,7 @@ some extensions that are not currently present on the build machine.
To install additional extensions simply execute:
-```bash
+```shell
pecl install <extension>
```
@@ -269,7 +269,7 @@ documentation.
With GitLab Runner 1.0 you can also test any changes locally. From your
terminal execute:
-```bash
+```shell
# Check using docker executor
gitlab-runner exec docker test:app
diff --git a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
index 03381dc16ff..6d05c37390a 100644
--- a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
+++ b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
@@ -75,7 +75,7 @@ First install [Docker Engine](https://docs.docker.com/installation/).
To build this project you also need to have [GitLab Runner](https://docs.gitlab.com/runner/index.html).
You can use public runners available on `gitlab.com` or you can register your own:
-```sh
+```shell
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
diff --git a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md
index 66246a0fda2..3de8f3c675c 100644
--- a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md
+++ b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md
@@ -66,7 +66,7 @@ First install [Docker Engine](https://docs.docker.com/installation/).
To build this project you also need to have [GitLab Runner](https://docs.gitlab.com/runner/).
You can use public runners available on `gitlab.com` or register your own:
-```sh
+```shell
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
diff --git a/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md b/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md
index f91e89d3c4c..557ebad72ba 100644
--- a/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md
+++ b/doc/ci/examples/test_phoenix_app_with_gitlab_ci_cd/index.md
@@ -79,7 +79,7 @@ When we call `mix` command, we'll pass two arguments:
- And the parameter `phoenix.new` requires, which is the name of the new project. In this case,
we're calling it `hello_gitlab_ci`, but you're free to set your own name:
-```bash
+```shell
mix phoenix.new hello_gitlab_ci
```
@@ -108,14 +108,14 @@ changes.
Run the commands below to create our empty database:
-```bash
+```shell
cd hello_gitlab_ci
mix ecto.create
```
We expect to see this output at the end of the command:
-```bash
+```shell
Generated hello_gitlab_ci app
The database for HelloGitlabCi.Repo has been created
```
@@ -130,13 +130,13 @@ permissions and a password of `postgres`. If it's not your case, check
Now, it's time to see if everything we did until now went well. We'll call `mix` again, this time
with `phoenix.server` parameter, which will start Phoenix's HTTP Server.
-```bash
+```shell
mix phoenix.server
```
This will be the output to this command:
-```bash
+```shell
[info] Running HelloGitlabCi.Endpoint with Cowboy using http://localhost:4000
23 May 11:44:35 - info: compiling
23 May 11:44:37 - info: compiled 6 files into 2 files, copied 3 in 9.8 sec
@@ -223,13 +223,13 @@ Let's run a new task with `mix` to run those tests for us. This time, the parame
In your terminal, navigate to the directory `hello_gitlab_ci` and run:
-```bash
+```shell
mix test
```
Our expected result is this:
-```bash
+```shell
....
Finished in 0.7 seconds