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
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
-
###Create a new release using GitLab CI
1
+
## Create a new release using GitLab CI
2
2
3
3
For this example, we have a `python/django` application and `Docker` as a containerization tool.
4
4
5
-
*Goal*: Bump a new version every time that a change occurs on the `master` branch. The bump should be executed automatically by the `CI` process.
5
+
_Goal_: Bump a new version every time that a change occurs on the `master` branch. The bump should be executed automatically by the `CI` process.
6
6
7
-
####Development Workflow:
7
+
### Development Workflow
8
8
9
9
1. A developer creates a new commit on any branch (except `master`)
10
10
2. A developer creates a merge request (MR) against `master` branch
11
11
3. When the `MR` is merged into master, the 2 stages of the CI are executed
12
12
4. For simplification, we store the software version in a file called `VERSION`. You can use any file that you want as `commitizen` supports it.
13
13
5. The commit message executed automatically by the `CI` must include `[skip-ci]` in the message; otherwise, the process will generate a loop. You can define the message structure in [commitizen](https://commitizen-tools.github.io/commitizen/bump/) as well.
14
14
15
-
####Gitlab Configuration:
15
+
### Gitlab Configuration
16
16
17
17
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
@@ -40,15 +40,15 @@ If you have more projects under the same organization, you can reuse the deploy
40
40
41
41
tip: If the CI raise some errors, try to unprotected the private key.
42
42
43
-
####Defining GitLab CI Pipeline
43
+
### Defining GitLab CI Pipeline
44
44
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. This means changing the file/s that reflects the version, creating a new commit and git tag.
48
+
- Test the application.
49
+
- Auto bump the version. This means changing the file/s that reflects the version, creating a new commit and git tag.
So, every time that a developer push to any branch, the `test` job is executed. If the branch is `master` and the test jobs success, the `auto-bump` takes place.
0 commit comments