### glab orbit setup Source: https://docs.gitlab.com/19.1/cli/orbit Run guided onboarding to verify access, install the skill, and install the local CLI. ```bash # Guided onboarding: verify access, install the skill, install the local CLI $ glab orbit setup ``` -------------------------------- ### Run guided onboarding for Orbit Local Source: https://docs.gitlab.com/19.1/orbit/local/access/glab Initiates a guided setup process that verifies Orbit accessibility, installs the Orbit skill for AI coding agents, and installs the local `orbit` binary. This command simplifies the initial configuration. ```shell glab orbit setup ``` -------------------------------- ### Start a Project Prompt Source: https://docs.gitlab.com/19.1/user/gitlab_duo_chat/best_practices Begin with a general question about starting a project to get initial guidance. ```text c# start project best practices ``` -------------------------------- ### Install and Start GitLab Runner (System Account) Source: https://docs.gitlab.com/19.1/runner/install/windows Installs GitLab Runner as a Windows service using the Built-in System Account and then starts the service. Assumes the current directory is C:\GitLab-Runner. ```powershell cd C:\GitLab-Runner .\gitlab-runner.exe install .\gitlab-runner.exe start ``` -------------------------------- ### Configure GitLab Installation Source: https://docs.gitlab.com/19.1/install/self_compiled Copies example configuration files, sets permissions, and prepares directories for GitLab. Ensure to edit `gitlab.yml` and `puma.rb` to match your setup. ```shell # Go to GitLab installation folder cd /home/git/gitlab # Copy the example GitLab config sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml # Update GitLab config file, follow the directions at top of the file sudo -u git -H editor config/gitlab.yml # Copy the example secrets file sudo -u git -H cp config/secrets.yml.example config/secrets.yml sudo -u git -H chmod 0600 config/secrets.yml # Make sure GitLab can write to the log/ and tmp/ directories sudo chown -R git log/ sudo chown -R git tmp/ sudo chmod -R u+rwX,go-w log/ sudo chmod -R u+rwX tmp/ # Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories sudo chmod -R u+rwX tmp/pids/ sudo chmod -R u+rwX tmp/sockets/ # Create the public/uploads/ directory sudo -u git -H mkdir -p public/uploads/ # Make sure only the GitLab user has access to the public/uploads/ directory # now that files in public/uploads are served by gitlab-workhorse sudo chmod 0700 public/uploads # Change the permissions of the directory where CI job logs are stored sudo chmod -R u+rwX builds/ # Change the permissions of the directory where CI artifacts are stored sudo chmod -R u+rwX shared/artifacts/ # Change the permissions of the directory where GitLab Pages are stored sudo chmod -R ug+rwX shared/pages/ # Copy the example Puma config sudo -u git -H cp config/puma.rb.example config/puma.rb # Refer to https://github.com/puma/puma#configuration for more information. # You should scale Puma workers and threads based on the number of CPU # cores you have available. You can get that number via the `nproc` command. sudo -u git -H editor config/puma.rb # Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml sudo -u git -H cp config/cable.yml.example config/cable.yml # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration sudo -u git -H editor config/resque.yml config/cable.yml ``` -------------------------------- ### Install and Start GitLab Runner (User Account) Source: https://docs.gitlab.com/19.1/runner/install/windows Installs GitLab Runner as a Windows service using a specified user account and then starts the service. Requires providing username and password. Assumes the current directory is C:\GitLab-Runner. ```powershell cd C:\GitLab-Runner .\gitlab-runner.exe install --user ENTER-YOUR-USERNAME --password ENTER-YOUR-PASSWORD .\gitlab-runner.exe start ``` -------------------------------- ### Install and Start GitLab Runner Service Source: https://docs.gitlab.com/19.1/runner/install/osx Installs the GitLab Runner service as a LaunchAgent and starts it. This command should be run from the user's home directory. ```shell cd ~ gitlab-runner install gitlab-runner start ``` -------------------------------- ### Example Request using curl Source: https://docs.gitlab.com/19.1/api/deploy_keys This example shows how to make a GET request to the project deploy keys endpoint using curl. Ensure you replace `` with a valid private token. ```shell curl --request GET \ --header "PRIVATE-TOKEN: " \ --url "https://gitlab.example.com/api/v4/users/20/project_deploy_keys" ``` -------------------------------- ### Initialize GitLab database and setup Source: https://docs.gitlab.com/19.1/install/self_compiled Runs the `gitlab:setup` Rake task to initialize the database tables and set up the administrator account. This is a crucial step after installation. ```shell cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production # Type 'yes' to create the database tables. # or you can skip the question by adding force=yes sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production force=yes # When done, you see 'Administrator account created:' ``` -------------------------------- ### Complete Agent Configuration Example Source: https://docs.gitlab.com/19.1/user/duo_agent_platform/flows/execution An example agent-config.yml demonstrating all available caching options along with image, setup script, and network policy configurations. ```yaml # Custom Docker image image: python:3.11 # Setup script to run before the flow setup_script: - apt-get update && apt-get install -y build-essential - pip install --upgrade pip - pip install -r requirements.txt # Cache configuration cache: key: files: - requirements.txt - Pipfile.lock prefix: python-deps paths: - .cache/pip - venv/ # Network configuration network_policy: include_recommended_allowed: true allow_all_unix_sockets: true allowed_domains: - my-own-site.com denied_domains: - malicious.com ``` -------------------------------- ### Install Docker and Docker Compose on Ubuntu/Debian Source: https://docs.gitlab.com/19.1/operations/observability/setup_self_managed Installs Docker and Docker Compose, enables and starts the Docker service, and adds the current user to the `docker` group. ```shell sudo apt update sudo apt install -y docker.io docker-compose sudo systemctl enable docker sudo systemctl start docker sudo usermod -aG docker $(whoami) ``` -------------------------------- ### Install NuGet Package using Chocolatey CLI (Example) Source: https://docs.gitlab.com/19.1/user/packages/nuget_repository Example of installing a package named 'MyPackage' version '1.0.2' from a GitLab source using Chocolatey. Authentication can be provided via username and personal access token. ```shell choco install MyPackage -Source gitlab -Version 1.0.2 # or choco install MyPackage -Source "https://gitlab.example.com/api/v4/projects//packages/nuget/v2" -u -p -Version 1.0.2 ``` -------------------------------- ### Quick Start: Setup External Dependencies Source: https://docs.gitlab.com/19.1/charts/development/external-dependencies Run this command from the root of the chart repository to set up external dependencies for local development. ```shell bash scripts/dev_dependencies.sh setup ``` -------------------------------- ### Example: Ruby Style Guide Instructions Source: https://docs.gitlab.com/19.1/user/duo_agent_platform/customize/review_instructions Provides specific review instructions for Ruby files, targeting files in the root and lib directories while excluding spec files. ```yaml instructions: - name: Ruby Style Guide fileFilters: - "*.rb" # Ruby files in the root directory - "lib/**/*.rb" # Ruby files in lib and its subdirectories - "!spec/**/*.rb" # Exclude test files instructions: | 1. Ensure all methods have proper documentation 2. Follow Ruby style guide conventions 3. Prefer symbols over strings for hash keys ``` -------------------------------- ### Install Dependencies and Prepare Environment Source: https://docs.gitlab.com/19.1/ci/examples/deployment/composer-npm-deploy Install necessary packages like zip and unzip, and set up Composer. This is typically done in the `before_script` section. ```yaml before_script: - apt-get update - apt-get install zip unzip - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - php composer-setup.php - php -r "unlink('composer-setup.php');" ``` -------------------------------- ### Install Dependencies for Overrides Script with FUZZAPI_PRE_SCRIPT Source: https://docs.gitlab.com/19.1/user/application_security/api_fuzzing/configuration/customizing_analyzer_settings Use `FUZZAPI_PRE_SCRIPT` to execute a setup script before the analyzer starts, allowing installation of necessary runtimes (like NodeJS) or dependencies for your overrides command. Ensure the script has execute permissions. ```yaml stages: - fuzz include: - template: API-Fuzzing.gitlab-ci.yml variables: FUZZAPI_PROFILE: Quick FUZZAPI_OPENAPI: test-api-specification.json FUZZAPI_TARGET_URL: http://test-deployment/ FUZZAPI_OVERRIDES_FILE: api-fuzzing-overrides.json FUZZAPI_OVERRIDES_CMD: renew_token.py FUZZAPI_OVERRIDES_INTERVAL: 300 FUZZAPI_PRE_SCRIPT: "sudo apk add nodejs && chmod a+x script.py" ``` -------------------------------- ### Quickstart: Index Repository and Inspect Schema Source: https://docs.gitlab.com/19.1/orbit/local/getting-started Indexes a local repository using the GitLab CLI and then inspects the generated schema. This builds a local DuckDB graph. ```shell glab orbit local index /path/to/your/repo glab orbit local schema ``` -------------------------------- ### Start APT Mirror Process Source: https://docs.gitlab.com/19.1/install/mirror Initiates the APT repository mirroring process using apt-mirror. This command downloads packages and metadata from the configured repositories. ```shell sudo apt-mirror ``` -------------------------------- ### Install and Start Jenkins with Homebrew Source: https://docs.gitlab.com/19.1/development/integrations/jenkins Use Homebrew to install Jenkins and start the service on your macOS machine. ```shell brew install jenkins brew services start jenkins ``` -------------------------------- ### Display Help for the 'run' Command Source: https://docs.gitlab.com/19.1/runner/commands This example shows how to get detailed help for the 'run' command, illustrating the use of --help to view command-specific options and environment variables. ```shell gitlab-runner run --help ``` -------------------------------- ### Docker Daemon Connection Error Source: https://docs.gitlab.com/19.1/ci/docker/docker_build_troubleshooting This error occurs with Docker-in-Docker v19.03+ when Docker starts with TLS automatically. Ensure you are using the correct setup for your version or refer to the upgrade guide if migrating from older versions. ```text docker: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running? ``` -------------------------------- ### Initialize New Gradle Package Source: https://docs.gitlab.com/19.1/user/packages/workflows/build_packages Execute this command in your project directory to start the Gradle initialization process. This command guides you through setting up a new project. ```shell gradle init ``` -------------------------------- ### Check GitLab Configuration Source: https://docs.gitlab.com/19.1/administration/raketasks/maintenance Runs a comprehensive suite of checks for GitLab components like GitLab Shell, Gitaly, Sidekiq, and more. It verifies setup against the installation guide and suggests fixes. This command should be run from the application server. ```shell sudo gitlab-rake gitlab:check ``` ```shell bundle exec rake gitlab:check RAILS_ENV=production ``` ```shell kubectl exec -it -- sudo gitlab-rake gitlab:check ``` -------------------------------- ### Install cdb-rebase Tool Source: https://docs.gitlab.com/19.1/user/application_security/sast/advanced_sast_cpp Installs the `cdb-rebase` tool using Go. Ensure the installation directory is in your PATH. ```shell go install gitlab.com/gitlab-org/secure/tools/cdb-rebase@latest ``` -------------------------------- ### Measure Individual Commands Separately with Eco CI Source: https://docs.gitlab.com/19.1/ci/sustainability/eco_ci For granular measurement, apply Eco CI's start and get measurement scripts around each individual command within your job. Ensure necessary utilities are installed. ```yaml build-job: image: node:alpine before_script: - apk add --no-cache curl jq gawk bash git coreutils script: - !reference [.start_measurement, script] - npm install - !reference [.get_measurement, script] - !reference [.display_results, script] - !reference [.start_measurement, script] - npm run build - !reference [.get_measurement, script] - !reference [.display_results, script] - !reference [.start_measurement, script] - npm test - !reference [.get_measurement, script] - !reference [.display_results, script] artifacts: paths: - eco-ci-output.txt - metrics.txt expire_in: 1 week ``` -------------------------------- ### Step 1: Setup KinD Cluster and Deploy Operator Source: https://docs.gitlab.com/19.1/operator/developer/test_olm This command initiates the setup of the KinD cluster and deploys the Operator. Ensure the Operator Pod is running after execution. ```shell scripts/test_olm.sh upgrade_test_step1 ``` -------------------------------- ### Configure Service Desk Email with Encrypted Credentials (Source) Source: https://docs.gitlab.com/19.1/user/project/service_desk/configure This example shows how to configure Service Desk email with encrypted credentials for self-compiled installations. It covers the initial gitlab.yml setup and the steps to use encrypted secrets. ```yaml production: service_desk_email: user: 'service-desk-email@mail.example.com' password: 'examplepassword' ``` ```shell bundle exec rake gitlab:service_desk_email:secret:edit EDITOR=vim RAILS_ENVIRONMENT=production ``` ```yaml user: 'service-desk-email@mail.example.com' password: 'examplepassword' ``` ```shell # For systems running systemd sudo systemctl restart gitlab.target # For systems running SysV init sudo service gitlab restart ``` -------------------------------- ### Kubernetes Executor with Container Lifecycle Hooks Source: https://docs.gitlab.com/19.1/runner/executors/kubernetes Configure container lifecycle hooks for PostStart (exec) and PreStop (HTTP GET) actions within the Kubernetes executor. This example shows how to create a file after the container starts and make an HTTP request before it stops. ```toml [[runners]] name = "kubernetes" url = "https://gitlab.example.com/" executor = "kubernetes" token = "yrnZW46BrtBFqM7xDzE7dddd" [runners.kubernetes] image = "alpine:3.11" privileged = true namespace = "default" [runners.kubernetes.container_lifecycle.post_start.exec] command = ["touch", "/builds/postStart.txt"] [runners.kubernetes.container_lifecycle.pre_stop.http_get] port = 8080 host = "localhost" path = "/test" [[runners.kubernetes.container_lifecycle.pre_stop.http_get.http_headers]] name = "header_name_1" value = "header_value_1" [[runners.kubernetes.container_lifecycle.pre_stop.http_get.http_headers]] name = "header_name_2" value = "header_value_2" ``` -------------------------------- ### Start Rails Console Source: https://docs.gitlab.com/19.1/administration/wikis Starts the Rails console for Omnibus or source installations. ```shell # For Omnibus installations sudo gitlab-rails console # For installations from source sudo -u git -H bundle exec rails console -e production ``` -------------------------------- ### Deploy with environment and strategy selection Source: https://docs.gitlab.com/19.1/ci/functions/moa This example demonstrates selecting deployment environment and strategy based on job inputs. It uses conditional logic and the `str()` function to format the replica count. ```yaml deploy job: when: manual inputs: environment: default: staging options: [staging, production] description: Target deployment environment strategy: default: rolling options: [rolling, blue-green, canary] description: Deployment strategy replicas: type: number default: 3 description: Number of replicas to deploy image: ${{ job.inputs.environment == "production" && "deploy-tools:stable" || "deploy-tools:latest" }} script: - 'echo "Deploying to ${{ job.inputs.environment }} using ${{ job.inputs.strategy }}"' - deploy --env ${{ job.inputs.environment }} --strategy ${{ job.inputs.strategy }} --replicas ${{ str(job.inputs.replicas) }} ``` -------------------------------- ### Run GitLab Duo Setup Verification (GitLab 18.8-18.11 on Source Install) Source: https://docs.gitlab.com/19.1/user/duo_agent_platform/troubleshooting Execute the `verify_setup.rb` script on self-compiled GitLab instances (18.8 to 18.11). Ensure the script is downloaded and copied to your server, then run it from the application directory. Replace `` with your project's full path. ```shell sudo -u git bundle exec rails runner \ "load '/tmp/verify_setup.rb'; Gitlab::Duo::Administration::VerifySetup.new('').execute" ``` -------------------------------- ### Start minikube and enable addons Source: https://docs.gitlab.com/19.1/charts/troubleshooting/kubernetes_cheat_sheet Starts a minikube instance with specified resources and enables the ingress addon. If minikube fails to start, try deleting and restarting it. ```shell minikube start --cpus 3 --memory 8192 # minimum amount for GitLab to work minikube addons enable ingress ``` -------------------------------- ### Install and Start GitLab Runner Service on Windows Source: https://docs.gitlab.com/19.1/runner/install/windows Commands to install and start the GitLab Runner service on Windows. This snippet is relevant when encountering 'The service did not start due to a logon failure' errors, which may indicate missing user rights. ```shell gitlab-runner install --password WINDOWS_MACHINE_PASSWORD gitlab-runner start FATA[0000] Failed to start GitLab Runner: The service did not start due to a logon failure. ``` -------------------------------- ### Install Missing Dependencies Source: https://docs.gitlab.com/19.1/user/application_security/api_security/api_discovery Optionally, install missing dependencies using a 'before_script'. This example installs 'curl' using 'apt'. ```yaml api_discovery: extends: .api_discovery_java_spring_boot image: eclipse-temurin:17-jre-alpine variables: API_DISCOVERY_JAVA_CLASSPATH: build/libs/spring-boot-app-0.0.0.jar before_script: - apk add --no-cache curl ``` -------------------------------- ### General C# Application Prompt Source: https://docs.gitlab.com/19.1/user/gitlab_duo_chat/best_practices Start with a general question about creating a C# application to get initial guidance. ```text How can I get started creating an C# application in VS Code? ``` -------------------------------- ### Point setup.py to Downloaded Certificate Source: https://docs.gitlab.com/19.1/user/application_security/dependency_scanning/legacy_dependency_scanning Update setup.py to use the downloaded certificate for secure connections to a private PyPI repository. ```python import setuptools.ssl_support setuptools.ssl_support.cert_paths = ['internal.crt'] ``` -------------------------------- ### Start IMAP Daemon Source: https://docs.gitlab.com/19.1/administration/reply_by_email_postfix_setup Start the 'imapd' service after installing the Courier IMAP package. ```shell imapd start ``` -------------------------------- ### Run GitLab Duo Setup Verification (GitLab 18.8-18.11 on Linux Package) Source: https://docs.gitlab.com/19.1/user/duo_agent_platform/troubleshooting Execute the `verify_setup.rb` script on GitLab 18.8 to 18.11 instances installed via Linux package (Omnibus). Ensure the script is downloaded and copied to your server. Replace `` with your project's full path. ```shell sudo gitlab-rails runner "load '/tmp/verify_setup.rb'; Gitlab::Duo::Administration::VerifySetup.new('').execute" ``` -------------------------------- ### Enable and Start UFW Service Source: https://docs.gitlab.com/19.1/tutorials/install_gitlab_single_node Enables the ufw service to start on boot and starts it immediately. This ensures the firewall is active after installation. ```shell sudo systemctl enable --now ufw ``` -------------------------------- ### How to start a local application server Source: https://docs.gitlab.com/19.1/user/gitlab_duo/tutorials/fix_code_python_shop A query to ask GitLab Duo Chat for instructions on starting a local application server for a Python web application. ```markdown How do I start a local application server for my Python web application? ``` -------------------------------- ### Install Cosign Source: https://docs.gitlab.com/19.1/user/packages/package_registry/pypi_cosign_tutorial Installs the Cosign binary on Linux systems. Requires sudo for global installation. ```shell wget -O cosign https://github.com/sigstore/cosign/releases/download/v2.2.3/cosign-linux-amd64 chmod +x cosign && sudo mv cosign /usr/local/bin/ ``` -------------------------------- ### Example Component Configuration File Source: https://docs.gitlab.com/19.1/omnibus/development/upgrading-software-components This is an example of a configuration file for a software component, showing where to specify the version and SHA256 checksum. ```ruby name "prometheus" default_version "2.45.0" license "Apache-2.0" # The SHA256 checksum for the Prometheus tarball. # This should be updated when the version is updated. sha256 "f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" # The URL to download the Prometheus source tarball from. # This should be updated when the version is updated. source url: "https://github.com/prometheus/prometheus/releases/download/v#{version}/prometheus-#{version}.tar.gz" # Build dependencies for Prometheus. build_depends "go", "make" # Runtime dependencies for Prometheus. runtime_depends "libstdc++" # Commands to build Prometheus. build do # Compile the Prometheus binary. command "#{install_dir}/bin/go build -o prometheus ./cmd/prometheus" # Copy the compiled binary to the installation directory. copy "prometheus", "#{install_dir}/bin/prometheus" end ``` -------------------------------- ### Start Courier Authentication Daemon Source: https://docs.gitlab.com/19.1/administration/reply_by_email_postfix_setup Start the 'courier-authdaemon' service, which is necessary for IMAP authentication. This service may not start automatically after installation. ```shell sudo service courier-authdaemon start ``` -------------------------------- ### Install Package from Instance Source: https://docs.gitlab.com/19.1/user/packages/npm_registry Installs a package from the GitLab instance registry after the registry has been configured. ```shell npm install @scope/my-package ``` -------------------------------- ### Start Ollama with Homebrew Services Source: https://docs.gitlab.com/19.1/development/ai_features/local_models Command to start Ollama as a service if installed via Homebrew. ```shell brew services start ollama ``` -------------------------------- ### Prepare SSL Certificate Directory and Files Source: https://docs.gitlab.com/19.1/omnibus/settings/ssl Create the SSL directory, set permissions, and copy your private key and certificate files. Ensure correct file permissions for security. ```shell sudo mkdir -p /etc/gitlab/ssl sudo chmod 755 /etc/gitlab/ssl sudo cp gitlab.example.com.key gitlab.example.com.crt /etc/gitlab/ssl/ sudo chmod 644 /etc/gitlab/ssl/gitlab.example.com.crt sudo chmod 600 /etc/gitlab/ssl/gitlab.example.com.key ``` -------------------------------- ### Example Response for Creating a Deploy Key Source: https://docs.gitlab.com/19.1/api/deploy_keys This is an example of the JSON response received after successfully creating a deploy key. ```json { "id": 5, "title": "My deploy key", "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNJAkI3Wdf0r13c8a5pEExB2YowPWCSVzfZV22pNBc1CuEbyYLHpUyaD0GwpGvFdx2aP7lMEk35k6Rz3ccBF6jRaVJyhsn5VNnW92PMpBJ/P1UebhXwsFHdQf5rTt082cSxWuk61kGWRQtk4ozt/J2DF/dIUVaLvc+z4HomT41fQ==", "fingerprint": "4a:9d:64:15:ed:3a:e6:07:6e:89:36:b3:3b:03:05:d9", "fingerprint_sha256": "SHA256:Jrs3LD1Ji30xNLtTVf9NDCj7kkBgPBb2pjvTZ3HfIgU", "usage_type": "auth_and_signing", "created_at": "2024-10-03T01:32:21.992Z", "expires_at": "2024-12-31T08:00:00.000Z" } ``` -------------------------------- ### Get Started Page Markdown Structure Source: https://docs.gitlab.com/19.1/development/documentation/topic_types/get_started This markdown structure outlines the recommended format for a 'Get started' page, including title, introductory paragraphs, workflow diagrams, step-by-step sections, and linking conventions. ```markdown title: Get started with abc --- These features work together in this way. You can use them to achieve these goals. Include a paragraph that ties together the features without describing what each individual feature does. Then add this sentence and a diagram. Details about the diagram file are below. The process of is part of a larger workflow: ![Workflow](img/workflow diagram.png) ## Step 1: Do this thing Each step should group features by workflow. For example, step 1 might be: ## Step 1: Determine your release cadence Then the content can explain milestones, iterations, labels, etc. The terms can exist elsewhere in the docs, but the descriptions on this page should be relatively brief. Finally, add links, in this format: For more information, see: - [Create your first abc](link.md). - [Learn more about abc](link.md). ## Step 2: The next thing Don't link in the body content. Save links for the `for more information` area. For more information, see: - [Create your first abc](link.md). - [Learn more about abc](link.md). ``` -------------------------------- ### Prepare GitLab Runner Directory and Install Source: https://docs.gitlab.com/19.1/runner/configuration/runner_autoscale_aws_fargate Create necessary directories for GitLab Runner and install the gitlab-runner package after setting up the repository. ```shell sudo mkdir -p /opt/gitlab-runner/{metadata,builds,cache} curl -s "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash sudo apt install gitlab-runner ``` -------------------------------- ### Install and Use cdb-rebase with Go and Bear Source: https://docs.gitlab.com/19.1/user/application_security/sast/advanced_sast_cpp Installs `cdb-rebase` using `go install` and then uses it to rebase a CDB generated by `bear`. Assumes `bear` is used to generate absolute paths. ```shell go install gitlab.com/gitlab-org/security-products/analyzers/clangsa/cmd/cdb-rebase@latest bear -o compile_commands_abs.json -- make cdb-rebase -i compile_commands_abs.json -o compile_commands.json -s "$PWD" -d . ``` -------------------------------- ### Codeowners Example Prompt Source: https://docs.gitlab.com/19.1/user/gitlab_duo_chat/best_practices Request a specific example for Codeowners configuration, detailing different teams involved. ```text Please show an example for Codeowners with different teams: backend, frontend, release managers. ``` -------------------------------- ### Example Request to Get Protected Tag Source: https://docs.gitlab.com/19.1/api/protected_tags This example demonstrates how to make a GET request to retrieve details for a protected tag named 'release-1-0' in project 5. Ensure you include your private token for authentication. ```shell curl --request GET \ --header "PRIVATE-TOKEN: " \ --url "https://gitlab.example.com/api/v4/projects/5/protected_tags/release-1-0" ``` -------------------------------- ### Create Vuex Store Entry Point Source: https://docs.gitlab.com/19.1/development/fe_guide/vuex Sets up the main Vuex store by importing and assembling modules (actions, getters, mutations, state) in `index.js`. ```javascript // eslint-disable-next-line no-restricted-imports import Vuex from 'vuex'; import * as actions from './actions'; import * as getters from './getters'; import mutations from './mutations'; import state from './state'; export const createStore = () => new Vuex.Store({ actions, getters, mutations, state, }); ``` -------------------------------- ### Install Maven Package with dependency:get Source: https://docs.gitlab.com/19.1/user/packages/maven_repository Use the Maven 'dependency:get' command to directly install a specific artifact from the GitLab repository. Ensure the artifact, repository URL, and settings.xml path are correctly specified. ```shell mvn dependency:get -Dartifact=com.nickkipling.app:nick-test-app:1.1-SNAPSHOT -DremoteRepositories=gitlab-maven:::: -s ``` -------------------------------- ### Install Fish Completions Source: https://docs.gitlab.com/19.1/cli/completion Save the Fish completion script to `~/.config/fish/completions/glab.fish` to enable completions for all new sessions. ```shell glab completion -s fish > ~/.config/fish/completions/glab.fish ``` -------------------------------- ### Install curl on SUSE Source: https://docs.gitlab.com/19.1/install/package/suse Install the curl package, which is required to download the GitLab repository setup script. ```shell sudo zypper install curl ``` -------------------------------- ### Create build directory and install Conan dependencies Source: https://docs.gitlab.com/19.1/user/packages/conan_1_repository Create a `build` directory at the root of your project and navigate into it. Then, run the `conan install` command with the path to your `conanfile.txt` and any necessary options. ```shell mkdir build && cd build ``` ```shell conan install .. ``` -------------------------------- ### Example: Universal File Instructions Source: https://docs.gitlab.com/19.1/user/duo_agent_platform/customize/review_instructions Applies a general set of instructions to all files within the repository. ```yaml instructions: - name: All Files fileFilters: - "**/*" # All files in the repository instructions: | 1. Explain the "why" behind each suggestion ```