Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions docs/gitlab-ci/debugging/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Mute Notifications While Debugging

Frequent commits or scheduled pipeline runs during troubleshooting can result in notification spam within the team Slack channel. To address this, we utilize a branch-based filtering strategy.

The UAB RC Slack integration is configured to send notifications **only for pipelines running on the default branch**. By running your pipeline on a non-default branch, you can execute as many test runs as needed without triggering Slack alerts.

### How to Mute Notifications

Check failure on line 7 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Heading levels should only increment by one level at a time

docs/gitlab-ci/debugging/index.md:7 MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h2; Actual: h3] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md

1. **Create and Push a Temporary Branch** Create a branch from your current development head using a descriptive name (e.g., `temp-debug-pipeline`).

Check failure on line 9 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Spaces after list markers

docs/gitlab-ci/debugging/index.md:9:1 MD030/list-marker-space Spaces after list markers [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md
2. **Run and Monitor the Pipeline** After pushing the branch, you may need to trigger the pipeline manually depending on the project's CI configuration. Since this is a non-default branch, Slack notifications will remain muted.

Check failure on line 10 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Spaces after list markers

docs/gitlab-ci/debugging/index.md:10:1 MD030/list-marker-space Spaces after list markers [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md

Check failure on line 10 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Ordered list item prefix

docs/gitlab-ci/debugging/index.md:10:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/1/1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md
3. **Cleanup After Success** After you have confirmed your fix and the pipeline is successful, merge your changes into your primary development branch and remove the temporary branch to keep the repository clean.

Check failure on line 11 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Spaces after list markers

docs/gitlab-ci/debugging/index.md:11:1 MD030/list-marker-space Spaces after list markers [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md

Check failure on line 11 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Ordered list item prefix

docs/gitlab-ci/debugging/index.md:11:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 3; Style: 1/1/1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md


Check failure on line 13 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Multiple consecutive blank lines

docs/gitlab-ci/debugging/index.md:13 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
# Enable CI_DEBUG_TRACE

Check failure on line 14 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Multiple top-level headings in the same document

docs/gitlab-ci/debugging/index.md:14 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Enable CI_DEBUG_TRACE"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md

Check failure on line 14 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Trailing spaces

docs/gitlab-ci/debugging/index.md:14:24 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md

## Enabling debug mode for GitLab CI pipelines

GitLab provides a predefined CI/CD variable, CI_DEBUG_TRACE, that enables verbose debug output for job execution. This is useful when you need to see the variable interpolation in the job

When set to "true", the job log shows every command as it executes and prints the environment variables available to the job, which helps with troubleshooting variable expansion and script behavior.

## Enabling debug for a single job in .gitlab-ci.yml

Check failure on line 22 in docs/gitlab-ci/debugging/index.md

View workflow job for this annotation

GitHub Actions / check_markdown / check_markdown

Headings should be surrounded by blank lines

docs/gitlab-ci/debugging/index.md:22 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Enabling debug for a single job in .gitlab-ci.yml"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
To turn on debug mode for a specific job, define CI_DEBUG_TRACE under that job’s variables section:

```
debug_example_job:
stage: test
variables:
CI_DEBUG_TRACE: "true"
script:
- echo "Debug trace is enabled for this job"
- ./run-tests.sh
```
!!! note
* Debug trace applies only to `debug_example_job`; other jobs in the pipeline run with normal logging.
* To turn debug off for this job, either remove `CI_DEBUG_TRACE` or set it to `"false"` and re-run the pipeline.

### Enable debug for the whole pipeline

Enable debug mode for the entire pipeline by manually setting the `CI_DEBUG_TRACE` variable:

1. In your project, navigate to **Build > Pipelines**.
2. Click the **Run pipeline** button.
3. In the **Variables** section of the form, add a new variable:
* **Key:** `CI_DEBUG_TRACE`
* **Value:** `true`
4. Click **Run pipeline**.

All jobs within that specific pipeline run will detect `CI_DEBUG_TRACE` and emit verbose debug trace information in their respective logs.
6 changes: 4 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ nav:
- Cheaha:
- Archiving Modules: cheaha/archiving_modules.md
- Shell Commands: cheaha/shell_commands.md
- GitLab Runner:
- Personal GitLab Runner Setup: gitlab_runner/personal_gitlab_runner_setup.md
- GitLab CI:
- GitLab Runner:
- Personal Runner: gitlab-ci/runner/personal/index.md
- Debugging CI Pipelines: gitlab-ci/debugging/index.md
- Openstack:
- VM Migration: openstack/vm_migration.md
- VM Service Setup: service/service_setup.md
Expand Down
Loading