Bitbucket SSH管道失败

发布于 2025-01-17 16:55:48 字数 1015 浏览 1 评论 0原文

尝试为 2 个分支创建管道,但出现配置错误

配置错误 您的 bitbucket-pipelines.yml 中的 [pipelines >] 处存在错误。分支>分期> 1]。准确地说:步骤为空、为空或缺失。

验证您的 bitbucket-pipelines.yml 查看 bitbucket-pipelines.yml

image: node:14
definitions:
  steps:
    - step: &build
       caches:
       - node
       script: 
       - npm install 
       
    - step: &deploy
        name: Deploy to server
        script:
          - echo "Deploying to production environment"
          - pipe: atlassian/ssh-run:0.2.2
            variables:
              SSH_USER: 'ubuntu'
              SERVER: $SERVER_IP
              COMMAND: '/home/ubuntu/backend/cyan/deployment.sh'

pipelines:
  branches:
    staging:
      - step: *build
      - step:
        <<: *deploy
        name: Deploy to production
        deployment: staging
    production:
      - step: *build
      - step:
        <<: *deploy
        name: Deploy to production
        deployment: production

由于我刚刚开始使用 bitbucket 管道,因此我将不胜感激。

Trying to ctreate pipeline for 2 brances but got configiration error

Configuration error
There is an error in your bitbucket-pipelines.yml at [pipelines > branches > staging > 1]. To be precise: Step is empty, null, or missing.

Validate your bitbucket-pipelines.yml
View bitbucket-pipelines.yml

image: node:14
definitions:
  steps:
    - step: &build
       caches:
       - node
       script: 
       - npm install 
       
    - step: &deploy
        name: Deploy to server
        script:
          - echo "Deploying to production environment"
          - pipe: atlassian/ssh-run:0.2.2
            variables:
              SSH_USER: 'ubuntu'
              SERVER: $SERVER_IP
              COMMAND: '/home/ubuntu/backend/cyan/deployment.sh'

pipelines:
  branches:
    staging:
      - step: *build
      - step:
        <<: *deploy
        name: Deploy to production
        deployment: staging
    production:
      - step: *build
      - step:
        <<: *deploy
        name: Deploy to production
        deployment: production

I would appreciate any help since I just started using bitbucket pipelines.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请叫√我孤独 2025-01-24 16:55:48
pipelines:
  branches:
    staging:
      - step: *build
      - step:
          <<: *deploy
          name: Deploy to production
          deployment: staging
    production:
      - step: *build
      - step:
          <<: *deploy
          name: Deploy to production
          deployment: production
pipelines:
  branches:
    staging:
      - step: *build
      - step:
          <<: *deploy
          name: Deploy to production
          deployment: staging
    production:
      - step: *build
      - step:
          <<: *deploy
          name: Deploy to production
          deployment: production
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文