# GitLab Runners

To configure how different types of SCM actions trigger a scan in Gomboc see [CI Pipeline Configuration](/integrations/continuous-integration-ci-build-systems/ci-pipeline-configuration.md).

### Pull request pipeline

GitLab CI/CD can use the following code to use the following job on the Gomboc-AI project. This will trigger a `submit for review` action on the Gomboc CLI for every pull request. You can replace the `effect` input with `preview` if no pull request is wanted. Please note that with `preview`, the pipelines will pass, regardless of any remediations we find.

```
# Example of a pipeline that runs on ever Pull Request
include:
  - 'https://gitlab.com/gomboc-ai/actions/-/raw/main/action/.gitlab-ci.yml'

stages:
  - example

variables:
  EFFECT: submit-for-review

setup-job:
  stage: example
  extends: .run-scan
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'

```

### Scheduled pipeline

The Gomboc CLI command also recognizes scheduled execution to support detecting remediations in code that happen due to changes in IaC modules or improvements in Gomboc remediation coverage. You can view the [GitLab pipeline documentation](https://docs.gitlab.com/ee/ci/pipelines/schedules.html1) to setup scheduled pipelines.

If more flexibility is desired, the Docker image can be used by using `gombocai/cli:latest` for the `image` value in your .gitlab-ci.yml file. The implementation of the CI/CD can be viewed [here](https://gitlab.com/gomboc-ai/actions/-/blob/main/terraform/remediate/.gitlab-ci.yml?ref_type=heads). From the image, you may use the `gomboc` command directly.

```
# Example of a pipeline that can be run on a schedule
# The 'target_directories' array should be updated to include all directories
# that include your IaC that should be scanned

image:
  name: gombocai/cli:latest
  entrypoint: [""]

stages:
  - build

run-scan:
  id_tokens:
    GL_ID_TOKEN:
      aud: https://gomboc.ai
  stage: build
  variables:
    FORCE_COLOR: 3
  script:
  - |
      target_directories=("." "tf" "terraform")
      gomboc submit-for-review on-schedule --auth-token $GL_ID_TOKEN --target-directories "${target_directories[@]}" --iac cloudformation terraform

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gomboc.ai/integrations/continuous-integration-ci-build-systems/gitlab-runners.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
