ci-cd-pipelines
GitHub Actions, GitLab CI/CD, Jenkins, Azure DevOps, build and test strategies, and deployment patterns
What this skill does
# CI/CD Pipelines
## GitHub Actions Workflows
### Core Concepts
- **Workflows**: YAML files defining automation processes
- **Events**: Triggers for workflow execution (push, pull_request, schedule)
- **Jobs**: Collections of steps that run on the same runner
- **Steps**: Individual tasks within a job
- **Actions**: Reusable components for common tasks
### Best Practices
- **Workflow Organization**
- Use separate workflows for different concerns (CI, CD, release)
- Use workflow templates for consistency
- Use composite actions for reusable steps
- Use reusable workflows for shared pipeline logic
- Use matrix strategy for testing across multiple configurations
- **Job Optimization**
- Use caching for dependencies and build artifacts
- Use parallel jobs for faster execution
- Use job dependencies for sequential execution
- Use artifacts for passing data between jobs
- Use self-hosted runners for custom environments
- **Security**
- Use secrets for sensitive data
- Use environments for deployment protection
- Use required reviews for critical deployments
- Use OIDC for cloud provider authentication
- Use branch protection rules
### GitHub Actions Examples
```yaml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run build
deploy:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Deploy to production
run: |
# Deployment commands
```
## GitLab CI/CD Pipelines
### Core Concepts
- **Pipelines**: Series of jobs executed in stages
- **Stages**: Logical grouping of jobs
- **Jobs**: Individual tasks that execute scripts
- **Runners**: Agents that execute jobs
- **Artifacts**: Files passed between jobs
### Best Practices
- **Pipeline Configuration**
- Use `.gitlab-ci.yml` for pipeline definition
- Use stages for logical job grouping
- Use only/except rules for job execution control
- Use rules for more complex conditions
- Use needs for job dependencies
- **Job Optimization**
- Use artifacts for passing data between jobs
- Use cache for dependency caching
- Use parallel jobs for faster execution
- Use retry for transient failures
- Use timeout for job duration limits
- **Security**
- Use CI/CD variables for sensitive data
- Use protected variables for protected branches
- Use masked variables for hiding values
- Use environments for deployment control
- Use approval rules for critical deployments
### GitLab CI/CD Examples
```yaml
stages:
- test
- build
- deploy
test:
stage: test
image: node:18
script:
- npm ci
- npm test
parallel:
matrix:
- NODE_VERSION: [14, 16, 18]
cache:
paths:
- node_modules/
build:
stage: build
image: node:18
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
deploy:
stage: deploy
image: node:18
script:
- npm install -g serverless
- serverless deploy
only:
- main
when: manual
```
## Jenkins Pipelines
### Core Concepts
- **Pipelines**: Groovy scripts defining automation
- **Stages**: Logical grouping of steps
- **Steps**: Individual operations
- **Agents**: Nodes where pipeline runs
- **Credentials**: Secure storage for secrets
### Best Practices
- **Pipeline Design**
- Use Declarative Pipeline syntax
- Use shared libraries for reusable code
- Use pipeline stages for logical organization
- Use when conditions for conditional execution
- Use post sections for cleanup and notifications
- **Agent Management**
- Use labels for agent selection
- Use Docker agents for consistent environments
- Use Kubernetes agents for dynamic scaling
- Use agent none for lightweight pipelines
- Use stash/unstash for passing data
- **Security**
- Use credentials binding for secrets
- Use credential scopes for access control
- Use approval steps for manual gates
- Use input steps for user interaction
- Use role-based strategy for permissions
### Jenkins Pipeline Examples
```groovy
pipeline {
agent any
stages {
stage('Test') {
parallel {
stage('Node 14') {
agent { docker { image 'node:14' } }
steps {
sh 'npm ci'
sh 'npm test'
}
}
stage('Node 16') {
agent { docker { image 'node:16' } }
steps {
sh 'npm ci'
sh 'npm test'
}
}
}
}
stage('Build') {
agent { docker { image 'node:18' } }
steps {
sh 'npm ci'
sh 'npm run build'
archiveArtifacts artifacts: 'dist/**'
}
}
stage('Deploy') {
when {
branch 'main'
}
steps {
input message: 'Deploy to production?', ok: 'Deploy'
sh 'npm install -g serverless'
sh 'serverless deploy'
}
}
}
post {
always {
cleanWs()
}
success {
emailext subject: 'Build Success',
body: 'The build completed successfully.',
to: '[email protected]'
}
failure {
emailext subject: 'Build Failed',
body: 'The build failed.',
to: '[email protected]'
}
}
}
```
## Azure DevOps Pipelines
### Core Concepts
- **Pipelines**: YAML or GUI-defined automation
- **Stages**: Major divisions in a pipeline
- **Jobs**: Units of work within a stage
- **Tasks**: Pre-built units of work
- **Agents**: Machines that run jobs
### Best Practices
- **Pipeline Configuration**
- Use YAML pipelines for version control
- Use templates for reusable pipeline logic
- Use parameters for pipeline customization
- Use variables for configuration values
- Use stages for environment separation
- **Job Optimization**
- Use parallel jobs for faster execution
- Use artifacts for passing data between jobs
- Use caching for dependency caching
- Use matrix strategy for multiple configurations
- Use demands for agent selection
- **Security**
- Use secret variables for sensitive data
- Use variable groups for organization
- Use key vault for secret management
- Use environment checks for deployment control
- Use approval gates for manual intervention
### Azure DevOps Pipeline Examples
```yaml
trigger:
- main
- develop
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: Test
jobs:
- job: Test
strategy:
matrix:
Node_14:
node_version: 14.x
Node_16:
node_version: 16.x
Node_18:
node_version: 18.x
steps:
- task: UseNode@1
inputs:
versionSpec: $(node_version)
- script: |
npm ci
npm test
displayName: 'Install dependencies and run tests'
- stage: Build
dependsOn: Test
jobs:
- job: Build
steps:
- task: UseNode@1
inputs:
versionSpec: '18.x'
- script: |
npm ci
npm run build
displayName: 'Build application'
- publish: dist
artifact: dist
- stage: Deploy
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: Deploy
environment: 'production'
straRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.