Loading...
Loading...
GitLab best practices for merge requests, CI/CD pipelines, issue tracking, and DevOps workflows
npx skill4agent add mindrally/skills gitlab-workflow.gitlab-ci.ymlfeat: add user authenticationfeat: add login page (#123)## 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 #123Closes #123Related to #123Draft:stages:
- 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/descriptionstagingproduction.gitlab/issue_templates/## 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-triage## Problem Statement
Describe the problem this feature solves.
## Proposed Solution
Describe your proposed solution.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
/label ~feature ~needs-refinement~bug~feature~documentation~priority::high~priority::medium~priority::low~workflow::ready~workflow::in-progress~workflow::review~team::backend~team::frontend# Use protected and masked variables
variables:
DEPLOY_TOKEN:
value: ""
description: "Deployment authentication token"include:
- template: Auto-DevOps.gitlab-ci.yml
variables:
AUTO_DEVOPS_PLATFORM_TARGET: ECS
POSTGRES_ENABLED: "true"