bitbucket-workflow by mindrally/skills
npx skills add https://github.com/mindrally/skills --skill bitbucket-workflow您是一位 Bitbucket 工作流专家,精通拉取请求、Bitbucket Pipelines、Jira 集成以及 Atlassian 生态系统的最佳实践。
bitbucket-pipelines.yml 通过 Bitbucket Pipelines 实现 CI/CD保持 PR 专注且易于审查
PR 标题规范
PROJ-123: 添加用户认证feat: 实现登录页面PR 描述模板
## 摘要
简要描述变更内容和动机。
## Jira 问题
[PROJ-123](https://your-org.atlassian.net/browse/PROJ-123)
## 变更内容
- 所做具体变更的列表
## 测试
- 变更如何被测试
- 手动测试步骤
## 检查清单
- [ ] 已添加/更新测试
- [ ] 已更新文档
- [ ] 流水线通过
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
image: node:20
definitions:
caches:
npm: ~/.npm
steps:
- step: &build-step
name: Build
caches:
- npm
script:
- npm ci
- npm run build
artifacts:
- dist/**
- step: &test-step
name: Test
caches:
- npm
script:
- npm ci
- npm test
pipelines:
default:
- step: *build-step
- step: *test-step
branches:
main:
- step: *build-step
- step: *test-step
- step:
name: Deploy to Production
deployment: production
trigger: manual
script:
- pipe: atlassian/aws-s3-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
S3_BUCKET: 'my-bucket'
LOCAL_PATH: 'dist'
develop:
- step: *build-step
- step: *test-step
- step:
name: Deploy to Staging
deployment: staging
script:
- ./deploy.sh staging
pipelines:
default:
- parallel:
- step:
name: Unit Tests
script:
- npm test:unit
- step:
name: Integration Tests
script:
- npm test:integration
- step:
name: Lint
script:
- npm run lint
pipelines:
pull-requests:
'**':
- step:
name: Build and Test
script:
- npm ci
- npm test
condition:
changesets:
includePaths:
- "src/**"
- "package.json"
pipelines:
default:
- step:
name: Deploy
script:
- pipe: atlassian/aws-ecs-deploy:1.6.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
CLUSTER_NAME: 'my-cluster'
SERVICE_NAME: 'my-service'
TASK_DEFINITION: 'task-definition.json'
definitions:
services:
postgres:
image: postgres:15
variables:
POSTGRES_DB: test_db
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_pass
redis:
image: redis:7
pipelines:
default:
- step:
name: Integration Tests
services:
- postgres
- redis
script:
- npm ci
- npm run test:integration
definitions:
caches:
npm: ~/.npm
pip: ~/.cache/pip
gradle: ~/.gradle/caches
pipelines:
default:
- step:
caches:
- npm
script:
- npm ci
- npm run build
启用智能提交,以便通过提交消息更新 Jira 问题:
PROJ-123 #comment Fixed the login redirect issue
PROJ-123 #time 2h 30m
PROJ-123 #done
在分支名称中包含 Jira 问题键:
feature/PROJ-123-user-authenticationbugfix/PROJ-456-fix-login-redirect这将自动将分支链接到问题。
设置 Jira 自动化:
pipelines:
branches:
main:
- step:
name: Deploy Production
deployment: production
script:
- ./deploy.sh production
develop:
- step:
name: Deploy Staging
deployment: staging
script:
- ./deploy.sh staging
'release/*':
- step:
name: Release Build
script:
- npm run build:release
'feature/*':
- step:
name: Feature Build and Test
script:
- npm ci
- npm test
'hotfix/*':
- step:
name: Hotfix Build
script:
- npm ci
- npm test
在仓库设置 > 分支权限中配置:
主分支:
开发分支:
为保持代码审查的一致性,设置默认审查者:
启用合并检查:
在仓库设置 > Pipelines > 变量中配置安全变量:
# 在流水线中引用
script:
- echo "Deploying with token"
- ./deploy.sh --token=$DEPLOY_TOKEN
变量选项:
为部署环境限制流水线访问特定的 IP 范围。
使用仓库或项目访问令牌,而非个人令牌:
pipelines:
branches:
main:
- step:
name: Deploy to Production
deployment: production
script:
- ./deploy.sh
在仓库设置 > 部署中配置环境:
每周安装数
117
仓库
GitHub 星标数
43
首次出现
2026 年 1 月 25 日
安全审计
安装于
gemini-cli102
opencode101
codex98
cursor93
github-copilot93
amp89
You are an expert in Bitbucket workflows, including pull requests, Bitbucket Pipelines, Jira integration, and Atlassian ecosystem best practices.
bitbucket-pipelines.ymlKeep PRs focused and reviewable
PR Title Convention
PROJ-123: Add user authenticationfeat: implement login pagePR Description Template
## Summary
Brief description of changes and motivation.
## Jira Issue
[PROJ-123](https://your-org.atlassian.net/browse/PROJ-123)
## Changes
- List of specific changes made
## Testing
- How the changes were tested
- Manual testing steps
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Pipeline passes
image: node:20
definitions:
caches:
npm: ~/.npm
steps:
- step: &build-step
name: Build
caches:
- npm
script:
- npm ci
- npm run build
artifacts:
- dist/**
- step: &test-step
name: Test
caches:
- npm
script:
- npm ci
- npm test
pipelines:
default:
- step: *build-step
- step: *test-step
branches:
main:
- step: *build-step
- step: *test-step
- step:
name: Deploy to Production
deployment: production
trigger: manual
script:
- pipe: atlassian/aws-s3-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
S3_BUCKET: 'my-bucket'
LOCAL_PATH: 'dist'
develop:
- step: *build-step
- step: *test-step
- step:
name: Deploy to Staging
deployment: staging
script:
- ./deploy.sh staging
pipelines:
default:
- parallel:
- step:
name: Unit Tests
script:
- npm test:unit
- step:
name: Integration Tests
script:
- npm test:integration
- step:
name: Lint
script:
- npm run lint
pipelines:
pull-requests:
'**':
- step:
name: Build and Test
script:
- npm ci
- npm test
condition:
changesets:
includePaths:
- "src/**"
- "package.json"
pipelines:
default:
- step:
name: Deploy
script:
- pipe: atlassian/aws-ecs-deploy:1.6.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
CLUSTER_NAME: 'my-cluster'
SERVICE_NAME: 'my-service'
TASK_DEFINITION: 'task-definition.json'
definitions:
services:
postgres:
image: postgres:15
variables:
POSTGRES_DB: test_db
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_pass
redis:
image: redis:7
pipelines:
default:
- step:
name: Integration Tests
services:
- postgres
- redis
script:
- npm ci
- npm run test:integration
definitions:
caches:
npm: ~/.npm
pip: ~/.cache/pip
gradle: ~/.gradle/caches
pipelines:
default:
- step:
caches:
- npm
script:
- npm ci
- npm run build
Enable smart commits to update Jira issues from commit messages:
PROJ-123 #comment Fixed the login redirect issue
PROJ-123 #time 2h 30m
PROJ-123 #done
Include Jira issue key in branch names:
feature/PROJ-123-user-authenticationbugfix/PROJ-456-fix-login-redirectThis automatically links branches to issues.
Set up Jira automation:
pipelines:
branches:
main:
- step:
name: Deploy Production
deployment: production
script:
- ./deploy.sh production
develop:
- step:
name: Deploy Staging
deployment: staging
script:
- ./deploy.sh staging
'release/*':
- step:
name: Release Build
script:
- npm run build:release
'feature/*':
- step:
name: Feature Build and Test
script:
- npm ci
- npm test
'hotfix/*':
- step:
name: Hotfix Build
script:
- npm ci
- npm test
Configure in Repository settings > Branch permissions:
Main branch:
Develop branch:
Set up default reviewers for consistent code review:
Enable merge checks:
Configure secure variables in Repository settings > Pipelines > Variables:
# Reference in pipeline
script:
- echo "Deploying with token"
- ./deploy.sh --token=$DEPLOY_TOKEN
Variable options:
Restrict pipeline access to specific IP ranges for deployment environments.
Use repository or project access tokens instead of personal tokens:
pipelines:
branches:
main:
- step:
name: Deploy to Production
deployment: production
script:
- ./deploy.sh
Configure environments in Repository settings > Deployments:
Weekly Installs
117
Repository
GitHub Stars
43
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli102
opencode101
codex98
cursor93
github-copilot93
amp89
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
104,900 周安装
标签页与手风琴组件实现指南:SEO友好的内容组织与用户体验优化
305 周安装
注册流程转化率优化指南:提升用户注册完成率的专家建议与最佳实践
298 周安装
AI智能体指令文件重构工具 - 渐进式披露原则优化AGENTS.md/CLAUDE.md文件结构
298 周安装
Ruby on Rails 应用开发指南:构建功能全面的Rails应用,包含模型、控制器、身份验证与最佳实践
298 周安装
Reddit 只读浏览技能 - 安全获取帖子、评论与搜索,助力智能体开发
297 周安装
原生广告投放指南:Taboola/Outbrain平台优化策略、创意测试与预算建议
313 周安装