writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
gitlab-ci-cd-pipelinesImplements GitLab CI/CD pipelines to automate development, testing, and deployment processes, allowing teams to integrate changes quickly and deliver software efficiently.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: gitlab-ci-cd-pipelines description: Implements GitLab CI/CD pipelines to automate development, testing, and deployment processes, allowing teams to integrate changes quickly and deliver software efficiently. license: MIT compatibility: opencode metadata: version: "1.0.0" domain: coding triggers: gitlab, ci/cd, continuous integration, deployment, testing automation, DevOps role: implementation scope: implementation output-format: code related-skills: coding-git, coding-test-automation archetypes: tactical, operational anti_triggers: manual, vague response_profile: verbosity: low directive_strength: medium abstraction_level: tactical
This skill facilitates the automation of development, testing, and deployment processes using GitLab CI/CD. It helps teams maintain high-quality code and streamline their software delivery through continuous integration (CI) and continuous deployment (CD) practices.
.gitlab-ci.yml file. Include all necessary jobs for building, testing, and deploying your application.Create a .gitlab-ci.yml file at the root of your repository. Here’s an example configuration that defines a simple pipeline with build, test, and deploy stages:
# .gitlab-ci.yml
stages:
- build
- test
- deploy
build:
stage: build
script:
- echo "Building the application..."
- npm install
- npm run build
artifacts:
paths:
- dist/
unit_test:
stage: test
script:
- echo "Running unit tests..."
- npm test
deploy:
stage: deploy
script:
- echo "Deploying application..."
- ./deploy.sh
only:
- main
To implement a more sophisticated pipeline that handles multiple testing scenarios:
# .gitlab-ci.yml
stages:
- build
- test
- e2e_test
- deploy
build:
stage: build
script:
- echo "Building the application..."
- npm install
- npm run build
artifacts:
paths:
- dist/
unit_test:
stage: test
script:
- echo "Running unit tests..."
- npm test
integration_test:
stage: test
script:
- echo "Running integration tests..."
- npm run test:integration
end_to_end_test:
stage: e2e_test
script:
- echo "Running end-to-end tests..."
- npm run test:e2e
deploy:
stage: deploy
script:
- echo "Deploying application..."
- ./deploy.sh
only:
- main
.gitlab-ci.yml file; use GitLab CI/CD variables instead.Authoritative documentation links for this domain. The model follows markdown links at load time to resolve external references and inline content.
.gitlab-ci.yml keywords and configurations