Multiline YAML string for GitLab CI (.gitlab-ci.yml)

后端 未结 6 1409
一向
一向 2020-12-13 23:02

I\'m trying to write a gitlab-ci.yml file which uses a multi-line string for the command. However, it seems like it is not being parsed. I\'ve tried both the

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 23:23

    I came here preemptively expecting this would be an issue but the following "multi-line" command for readability is working for me:

    Gitlab Runner: Shell Runner version 1.11.0 / Gitlab version: 8.17.2

    myjob:
    stage: deploy
    script:
      # Single line command
      - az component update --add sql
    
      # Multi-line command
      - az sql server create -n ${variable} -g ${variable} -l ${variable}
        --administrator-login ${variable} --administrator-login-password ${variable}
    

提交回复
热议问题