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: content/documentation/guides/automation/gitlab.md
+70-95Lines changed: 70 additions & 95 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ draft: false
3
3
title: "Using GitLab CI"
4
4
date: 2019-11-11
5
5
publishdate: 2019-11-11
6
-
lastmod: 2025-09-08
6
+
lastmod: 2025-10-03
7
7
weight: 7
8
8
---
9
9
@@ -14,7 +14,13 @@ This guide shows how to integrate Microcks within your GitLab CI pipelines. You
14
14
-**Import** API [Artifacts](/documentation/references/artifacts/) (OpenAPI, Postman, AsyncAPI, etc.) into a Microcks instance
15
15
-**Launch tests** against a deployed API endpoint to verify contract conformance
16
16
17
-
We rely on the [Microcks CLI](/documentation/guides/automation/cli) executed via its container image inside GitLab CI jobs. Authentication uses a Microcks [Service Account](/documentation/explanations/service-account).
17
+
To Integrate Microcks within your GitLab CI pipelines you can rely on [GitLab CI/CD Components](https://gitlab.com/explore/catalog/microcks-cncf/microcks-community/microcks-gitlab-components).
18
+
19
+
Authentication uses a Microcks [Service Account](/documentation/explanations/service-account).
20
+
21
+
## Finding the Component
22
+
The Microcks GitLab Components are available in the GitLab CI/CD Catalog at:
@@ -30,118 +36,87 @@ We recommend storing credentials as masked GitLab CI variables:
30
36
31
37
In your project, navigate to Settings → CI/CD → Variables and add the variables above. Mark credentials as masked and protected according to your workflow.
32
38
33
-
## 2. Import job (push artifacts into Microcks)
39
+
## 2. Importing API Artifacts (push artifacts into Microcks)
34
40
35
-
Use the `microcks-cli` container to import one or multiple specification files. Optionally mark artifacts as `primary` to drive multi-artifact behavior (see [Multi-artifacts](/documentation/explanations/multi-artifacts)).
41
+
Use the `microcks-import` component to import one or multiple specification files.
| `stage` | CI/CD stage for the import job | string | `import` |
68
+
| `image` | Docker image to use for the import job | string | `quay.io/microcks/microcks-cli:latest` |
62
69
63
-
## 3. Test job (run contract tests)
70
+
Note:
71
+
By default, the component `gitlab.com/microcks-cncf/microcks-community/microcks-gitlab-components/microcks-import@~latest` uses the latest released component version. You can use a specific version by specifying it in the component reference. For example to use the component version 0.0.1 use the following component reference:
Run a contract test against your deployed API endpoint with one of the supported runners (`HTTP`, `SOAP`, `SOAP_UI`, `POSTMAN`, `OPEN_API_SCHEMA`, `ASYNC_API_SCHEMA`).
77
+
## 3. Running Conformance Tests
78
+
79
+
Run a contract test against your deployed API endpoint with one of the supported runners (`HTTP`, `SOAP`, `SOAP_UI`, `POSTMAN`, `OPEN_API_SCHEMA`, `ASYNC_API_SCHEMA`) by using `microcks-test` component
| `api_name_version` | API name and version to test (format: 'API Name:version') | string | `API Pastry - 2.0:2.0.0` |
107
+
| `test_endpoint` | Endpoint URL to test against | string | `https://my-api-pastry.apps.example.com` |
108
+
| `test_runner` | Test runner to use | string | `OPEN_API_SCHEMA` |
109
+
| `wait_for` | Time to wait for test completion | string | `10sec` |
110
+
| `stage` | CI/CD stage for the test job | string | `test` |
111
+
| `image` | Docker image to use for the test job | string | `quay.io/microcks/microcks-cli:latest` |
112
+
113
+
Note:
114
+
By default, the component `gitlab.com/microcks-cncf/microcks-community/microcks-gitlab-components/microcks-test@~latest` uses the latest released component version. You can use a specific version by specifying it in the component reference. For example to use the component version 0.0.1 use the following component reference:
You have learned how to use the `microcks-cli` inside GitLab CI to import API artifacts and run contract tests. The CLI reuses the same authentication foundation described in the [Automation API guide](/documentation/guides/automation/api) and relies on a [Service Account](/documentation/explanations/service-account). For CLI flags and options, check the [Microcks CLI](/documentation/guides/automation/cli) guide and the tool's README.
146
-
147
-
If you prefer a native CI integration, see also the guides for [GitHub Actions](/documentation/guides/automation/github-actions) and [Jenkins](/documentation/guides/automation/jenkins).
122
+
You have learned how to use the Microcks GitLab Components to import API artifacts and run conformance tests directly from the GitLab CI/CD Catalog. The components provide a reusable and versioned integration that simplifies your pipeline configuration. Behind the scenes, they leverage the `microcks-cli` and use the same authentication foundation described in the [Automation API guide](/documentation/guides/automation/api), relying on a [Service Account](/documentation/explanations/service-account). For the most up-to-date information and available versions, check the [GitLab CI/CD Catalog](https://gitlab.com/explore/catalog/microcks-cncf/microcks-community/microcks-gitlab-components).
0 commit comments