映射条目 gitlab 的 yaml 错误缩进?

yaml bad indentation of a mapping entry gitlab?

我正在尝试使用 gitlab 实现一个 ci/cd 管道,我创建了一个包含以下内容的 ci 文件。

stages:
    - deploy
image:
   name: "ubuntu:16.04"

first-pipeline:test:
  stage: deploy
  tags:
    - executor:docker
  only:
    refs:
      - branches
      - schedules
  script:
    - export ANSIBLE_HOST_KEY_CHECKING=False
    - echo "Job:  $job_param"
    - ansible-playbook -i production.ini -e "job_id=$job_param ansible_ssh_user=ubuntu" my-playbook.yml -l "10.37.23.230"
    - apk add curl
    - curl -X POST http://98.121.222.32:8080/api/v2/removejob -H 'Content-Type: application/json' -d "{"jobId": $job_param}"
    - echo $query
    - echo "Executed at= $now"

我将 运行 保存到以下错误消息中:bad indentation of a mapping entry

 24 |  ... 
 25 |  ... ubuntu" my-playbook.yml -l "10.37.23.230"
 26 |  ... 
 27 |  ... application/json' -d "{"jobId": $job_param}"
-----------------------------------------^
 28 |  ... 
 29 |  ... 

关于如何修复它有什么建议吗?我们将感谢您提供任何帮助ci。谢谢。

这有效:-

'curl -H "Content-Type: application/json" -X POST http://98.121.222.32:8080/api/v2/removejob -d "{"jobId": $job_param}"'