You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/gitlab_ci.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,10 @@ For this example, we have a `python/django` application and `Docker` as containe
15
15
#### Gitlab Configuration:
16
16
17
17
In order to be able to change files and push new changes with `Gitlab CI` runners, we need to have a `ssh` key and configure a git user.
18
-
18
+
19
19
First, let's create a `ssh key`. The only requirement is to create it without a passphrase:
20
20
21
-
```
21
+
```bash
22
22
ssh-keygen -f deploy_key -N ""
23
23
```
24
24
@@ -32,7 +32,7 @@ Now, we need to create three environment variables that will be visible for the
32
32
33
33
Create `SSH_PRIVATE_KEY`, `CI_EMAIL`, `CI_USERNAME` variables and fill them with the `private_key`, `email` and `username` that we have created previously.
34
34
35
-
The latest step is to create a `deploy key.` To do this, we should create it under the section `settings/repository` and fill it with the `public key` generated before. Check `Write access allowed`, otherwise, the runner won't be able to write the changes to the repository.
35
+
The latest step is to create a `deploy key.` To do this, we should create it under the section `settings/repository` and fill it with the `public key` generated before. Check `Write access allowed`, otherwise, the runner won't be able to write the changes to the repository.
@@ -45,9 +45,8 @@ tip: If the CI raise some errors, try to unprotect the private key.
45
45
1. Create a `.gitlab-ci.yaml` file that contains `stages` and `jobs` configurations. You can find more info [here](https://docs.gitlab.com/ee/ci/quick_start/).
46
46
47
47
2. Define `stages` and `jobs`. For this example, we define two `stages` with one `job` each one.
48
-
* Test the application.
49
-
* Auto bump the version. Means changing the file/s that reflects the version, creating a new commit and git tag.
50
-
48
+
* Test the application.
49
+
* Auto bump the version. Means changing the file/s that reflects the version, creating a new commit and git tag.
51
50
52
51
#### Stages and Jobs
53
52
@@ -96,7 +95,7 @@ auto-bump:
96
95
- git push origin master:$CI_COMMIT_REF_NAME
97
96
- TAG=$(head -n 1 VERSION) # get the new software version and save into artifacts
0 commit comments