rshop/pipeline-pipe本镜像为Bitbucket Pipelines提供专用管道功能,旨在简化开发团队通过Bitbucket实现CI/CD流程的配置与执行。通过预配置的任务模板和标准化接口,可快速集成构建、测试、部署等自动化流程,减少手动配置成本,提升流程一致性。
在仓库根目录的bitbucket-pipelines.yml文件中指定本镜像:
yamlimage: your-registry/bitbucket-pipe:latest pipelines: default: - step: name: 执行自动化测试 script: - pipe: your-registry/bitbucket-pipe:latest variables: TASK_TYPE: "test" TEST_SUITE: "unit" REPORT_PATH: "reports/test-results.xml" branches: main: - step: name: 生产环境部署 script: - pipe: your-registry/bitbucket-pipe:latest variables: TASK_TYPE: "deploy" DEPLOY_ENV: "production" DEPLOY_TIMEOUT: "300"
| 变量名 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|
| BITBUCKET_USER | Bitbucket API访问用户名 | 是 | - |
| BITBUCKET_TOKEN | Bitbucket API访问令牌 | 是 | - |
| TASK_TYPE | 任务类型(test/build/deploy等) | 是 | - |
| LOG_LEVEL | 日志级别(debug/info/warn/error) | 否 | info |
| WORKSPACE_PATH | 工作目录路径 | 否 | /opt/bitbucket |
| TIMEOUT | 任务超时时间(秒) | 否 | 180 |
通过挂载配置文件实现高级自定义:
yaml- step: name: 自定义工作流执行 script: - pipe: your-registry/bitbucket-pipe:latest variables: TASK_TYPE: "custom" CONFIG_FILE: "./custom-pipe-config.yml" artifacts: - logs/** - reports/**
custom-pipe-config.yml示例:
yamlsteps: - name: 代码静态检查 command: "lint --strict" ignore_errors: false - name: 构建应用 command: "build --target=production" depends_on: ["代码静态检查"] - name: 部署验证 command: "verify-deployment" depends_on: ["构建应用"] env: VERIFY_URL: "[***]"
使用Docker运行镜像进行本地调试:
bashdocker run -it --rm \ -e BITBUCKET_USER=your-username \ -e BITBUCKET_TOKEN=your-token \ -e TASK_TYPE=test \ -v $(pwd):/opt/bitbucket \ your-registry/bitbucket-pipe:latest

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务