Bitbucket 管道 ssh-运行:缺少服务器变量
Bitbucket pipelines ssh-run: SERVER variable missing
当我 运行 Bitbucket 管道时,我总是遇到这个我无法解决的奇怪错误:
在构建日志中
--env=COMMAND="./ansible/deploy-dev.sh" \
--env=MODE="script" \
--env=SERVER="$SSH_JUMP_HOST" \
--env=SSH_KEY="$SSH_JUMP" \
--env=SSH_USER="$SSH_JUMP_USER" \
...
...
Status: Downloaded newer image for bitbucketpipelines/ssh-run:0.4.0
INFO: Executing the pipe...
/pipe.sh: line 26: SERVER: SERVER variable missing.
SERVER 变量由存储库变量设置和提供。
bitbucket-pipelines.yml
...
branches:
develop:
- step:
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: $SSH_JUMP_USER
SERVER: $SSH_JUMP_HOST
SSH_KEY: $SSH_JUMP
MODE: "script"
COMMAND: "./ansible/deploy-dev.sh"
谁有线索,我要疯了!?
Atlassian 团队回答了我。我 post 它回到这里因为它可以节省一些
宝贵的时间!
I've seen this error occur because of incorrect indentation in the
bitbucket-pipelines.yml file.
Indentation should be two spaces, except for the level after - step:
which should be four spaces, as follows:
pipelines:
branches:
develop:
- step:
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: $SSH_JUMP_USER
SERVER: $SSH_JUMP_HOST
SSH_KEY: $SSH_JUMP
MODE: "script"
COMMAND: "./ansible/deploy-dev.sh"
你能在我们的验证器中检查你的 bitbucket-pipelines.yml 文件的内容 https://bitbucket-pipelines.atlassian.io/validator 吗?
当我 运行 Bitbucket 管道时,我总是遇到这个我无法解决的奇怪错误: 在构建日志中
--env=COMMAND="./ansible/deploy-dev.sh" \
--env=MODE="script" \
--env=SERVER="$SSH_JUMP_HOST" \
--env=SSH_KEY="$SSH_JUMP" \
--env=SSH_USER="$SSH_JUMP_USER" \
...
...
Status: Downloaded newer image for bitbucketpipelines/ssh-run:0.4.0
INFO: Executing the pipe...
/pipe.sh: line 26: SERVER: SERVER variable missing.
SERVER 变量由存储库变量设置和提供。
bitbucket-pipelines.yml
...
branches:
develop:
- step:
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: $SSH_JUMP_USER
SERVER: $SSH_JUMP_HOST
SSH_KEY: $SSH_JUMP
MODE: "script"
COMMAND: "./ansible/deploy-dev.sh"
谁有线索,我要疯了!?
Atlassian 团队回答了我。我 post 它回到这里因为它可以节省一些 宝贵的时间!
I've seen this error occur because of incorrect indentation in the bitbucket-pipelines.yml file.
Indentation should be two spaces, except for the level after - step: which should be four spaces, as follows:
pipelines:
branches:
develop:
- step:
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: $SSH_JUMP_USER
SERVER: $SSH_JUMP_HOST
SSH_KEY: $SSH_JUMP
MODE: "script"
COMMAND: "./ansible/deploy-dev.sh"
你能在我们的验证器中检查你的 bitbucket-pipelines.yml 文件的内容 https://bitbucket-pipelines.atlassian.io/validator 吗?