-
Notifications
You must be signed in to change notification settings - Fork 9
docs: consolidate and simplify GitLab CI docs #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
krishmoodbidri
wants to merge
5
commits into
uabrc:main
Choose a base branch
from
krishmoodbidri:feature/restructure-gitlab-ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4103ac8
docs: consolidate and simplify GitLab CI docs
krishmoodbidri 7c8b281
docs: fix markdown linting errors in gitlab-ci debugging guide
krishmoodbidri 13e40ab
fix: resolve markdown linting issues in GitLab CI debugging docs
krishmoodbidri 6c84654
fix: remove indentation from note block to resolve MD046 linting error
krishmoodbidri c5cc6a6
Merge branch 'main' into feature/restructure-gitlab-ci
wwarriner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # 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 | ||
|
|
||
| 1. **Create and Push a Temporary Branch** | ||
| Create a branch from your current development head using a descriptive name (e.g., `temp-debug-pipeline`). | ||
| 1. **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. | ||
| 1. **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. | ||
|
|
||
| ## Enable CI_DEBUG_TRACE | ||
|
|
||
| ### 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 | ||
|
|
||
| To turn on debug mode for a specific job, define CI_DEBUG_TRACE under that job's variables section: | ||
|
|
||
| ```yaml | ||
| 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**. | ||
| 1. Click the **Run pipeline** button. | ||
| 1. In the **Variables** section of the form, add a new variable: | ||
| - **Key:** `CI_DEBUG_TRACE` | ||
| - **Value:** `true` | ||
| 1. 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. |
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra space in the indentation. I recommend using
yamllintfor verification, it's what we use in pre-commit, and in the CI checks.