ability.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: deploy
  2. description: Deploy application with safety checks
  3. triggers:
  4. keywords:
  5. - "deploy"
  6. - "ship it"
  7. - "release"
  8. inputs:
  9. version:
  10. type: string
  11. required: true
  12. pattern: '^v\d+\.\d+\.\d+$'
  13. description: "Version to deploy (e.g., v1.2.3)"
  14. environment:
  15. type: string
  16. required: true
  17. enum: [staging, production]
  18. default: staging
  19. description: "Target environment"
  20. steps:
  21. - id: test
  22. type: script
  23. description: Run test suite
  24. run: echo "Running tests..." && echo "All tests passed"
  25. validation:
  26. exit_code: 0
  27. - id: build
  28. type: script
  29. description: Build application
  30. run: echo "Building for {{inputs.environment}}..." && echo "Build complete"
  31. needs: [test]
  32. validation:
  33. exit_code: 0
  34. - id: deploy-staging
  35. type: script
  36. description: Deploy to staging
  37. run: echo "Deploying {{inputs.version}} to staging..." && echo "Staging deploy complete"
  38. needs: [build]
  39. validation:
  40. exit_code: 0
  41. - id: approve
  42. type: approval
  43. description: Approve production deployment
  44. when: inputs.environment == "production"
  45. prompt: |
  46. Ready to deploy {{inputs.version}} to production.
  47. Staging deployment was successful.
  48. Proceed with production deployment?
  49. needs: [deploy-staging]
  50. - id: deploy-prod
  51. type: script
  52. description: Deploy to production
  53. when: inputs.environment == "production"
  54. run: echo "Deploying {{inputs.version}} to production..." && echo "Production deploy complete"
  55. needs: [approve]
  56. validation:
  57. exit_code: 0
  58. settings:
  59. timeout: 30m
  60. enforcement: strict
  61. on_failure: stop