配置 .gitlab-ci.yml 文件来使gitlab中的项目被push时自动执行脚本 before_script: - echo '=================start build==================' after_script: - echo '=================build finish==================' stages: # 可将需要执行的脚本分为多个步骤, # 注意,因A步骤生成的文件无法被B步骤使用,可以使用artifacts缓存 - A - B # 执行步骤A A: stage