GitLab best practices for merge requests, CI/CD pipelines, issue tracking, and DevOps workflows
56
45%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./gitlab-workflow/SKILL.mdYou are an expert in GitLab workflows, including merge requests, CI/CD pipelines, issue tracking, and DevOps best practices.
.gitlab-ci.ymlKeep MRs small and focused
MR Title Convention
feat: add user authenticationfeat: add login page (#123)MR Description Template
## Summary
Brief description of what this MR accomplishes.
## Changes
- List of specific changes
## Testing
- How changes were tested
- Test commands to run
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Pipeline passes
## Related Issues
Closes #123Link issues properly
Closes #123 to auto-close issues on mergeRelated to #123 for references without closingUse Draft MRs for work in progress:
Draft: or use the Draft buttonstages:
- build
- test
- security
- deploy
variables:
NODE_VERSION: "20"
default:
image: node:${NODE_VERSION}
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
build:
stage: build
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 week
test:
stage: test
script:
- npm ci
- npm test
coverage: '/Coverage: \d+\.\d+%/'
lint:
stage: test
script:
- npm ci
- npm run lint
allow_failure: falsetest:
stage: test
parallel: 3
script:
- npm ci
- npm test -- --shard=$CI_NODE_INDEX/$CI_NODE_TOTALdeploy:production:
stage: deploy
script:
- ./deploy.sh production
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manual
- when: never
environment:
name: production
url: https://example.com.test_template: &test_template
stage: test
before_script:
- npm ci
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
unit_tests:
<<: *test_template
script:
- npm run test:unit
integration_tests:
<<: *test_template
script:
- npm run test:integration
services:
- postgres:15include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
- template: Security/Container-Scanning.gitlab-ci.yml
sast:
stage: security
dependency_scanning:
stage: security
secret_detection:
stage: security.deploy_template:
stage: deploy
script:
- ./deploy.sh $ENVIRONMENT
environment:
name: $ENVIRONMENT
url: https://$ENVIRONMENT.example.com
deploy:staging:
extends: .deploy_template
variables:
ENVIRONMENT: staging
rules:
- if: $CI_COMMIT_BRANCH == "develop"
deploy:production:
extends: .deploy_template
variables:
ENVIRONMENT: production
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manualfeature/descriptionstaging, productionCreate in .gitlab/issue_templates/:
Bug.md:
## Description
Clear description of the bug.
## Steps to Reproduce
1. Step one
2. Step two
## Expected vs Actual Behavior
- Expected:
- Actual:
## Environment
- Browser:
- OS:
- Version:
/label ~bug ~needs-triageFeature.md:
## Problem Statement
Describe the problem this feature solves.
## Proposed Solution
Describe your proposed solution.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
/label ~feature ~needs-refinementOrganize with labels:
~bug, ~feature, ~documentation~priority::high, ~priority::medium, ~priority::low~workflow::ready, ~workflow::in-progress, ~workflow::review~team::backend, ~team::frontendConfigure for main:
# Use protected and masked variables
variables:
DEPLOY_TOKEN:
value: ""
description: "Deployment authentication token"Configure in Settings > CI/CD > Variables:
Enable compliance features:
For quick setup, enable Auto DevOps:
include:
- template: Auto-DevOps.gitlab-ci.yml
variables:
AUTO_DEVOPS_PLATFORM_TARGET: ECS
POSTGRES_ENABLED: "true"Features included:
47f47c1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.