算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ci-cd-pipeline-design【设计与创意】Implements strategies for automation in building, testing, and deploying software through continuous integration and delivery principles.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: ci-cd-pipeline-design
description: Implements strategies for automation in building, testing, and deploying software through continuous integration and delivery principles. license: MIT compatibility: opencode metadata: version: "1.1.1" domain: coding triggers: ci cd, automation strategies, pipeline design, build automation, deployment strategies archetypes: [implementation, orchestration] anti_triggers: [manual deployment processes, non-automated testing] response_profile: verbosity: medium directive_strength: high abstraction_level: operational
role: implementation scope: implementation output-format: code
Designs and implements CI/CD pipelines using GitHub Actions, GitLab CI, and Jenkins with automated build, test, security scan, and deployment stages, enforcing quality gates and reliable release workflows across environments.
ubuntu-22.04, actions/checkout@v4) to prevent unexpected breakage from runner updatesContinuous Integration and Continuous Delivery (CI/CD) are essential methodologies that enable teams to deliver high-quality software efficiently. Here are the primary benefits:
Establish KPIs like build success rates, deployment frequency, lead time for changes, mean time to recover, and change failure rates to allow for consistent evaluation of your CI/CD effectiveness.
By adopting effective CI/CD strategies, teams can foster an environment of continuous improvement while delivering high-quality software rapidly and efficiently.
A complete .github/workflows/ci.yml with lint, test (matrix), build, and deploy stages:
name: CI Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
NODE_VERSION: "20"
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run lint
- run: npm audit --audit-level=high
test:
runs-on: ubuntu-22.04
needs: lint
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm test
env:
CI: "true"
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.node-version }}
path: junit.xml
build:
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: build-output
path: dist/
deploy:
runs-on: ubuntu-22.04
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v4
with:
name: build-output
path: dist/
- run: echo "Deploying to production..."
A complete .gitlab-ci.yml with parallel test matrix, caching, and environment-scoped deploy:
stages:
- lint
- test
- build
- deploy
variables:
NODE_VERSION: "20"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
lint:
stage: lint
image: node:${NODE_VERSION}
script:
- npm ci
- npm run lint
- npm audit --audit-level=high
test:
stage: test
image: node:${CI_NODE_VERSION}
parallel:
matrix:
- CI_NODE_VERSION: ["18", "20"]
script:
- npm ci
- npm run test:ci
artifacts:
when: always
reports:
junit: junit.xml
build:
stage: build
image: node:${NODE_VERSION}
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
deploy:
stage: deploy
image: alpine:latest
script:
- apk add --no-cache curl
- curl -X POST "$DEPLOY_WEBHOOK"
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: always
- when: never
environment:
name: production
url: https://app.example.com
Authoritative documentation links for this skill's domain. The model follows markdown links at load time to resolve external references and inline content.