zoukankan      html  css  js  c++  java
  • gitlab的yml语法-小结

    gitlab的yml官方文档

    https://docs.gitlab.com/ee/ci/yaml/README.html#allow_failure

    1、新建作业(job)、定义阶段(stage)、允许失败(allow_failure)、人工触发(when: manual)、作业运行前执行的脚本(before_script)、作业运行后执行的脚本(after_script)

    案例1:.gitlab-ci.yml中内容

    before_script:
      - echo "Before script section"
      - echo "For example you might run an update here or install a build dependency"
      - echo "Or perhaps you might print out some debugging details"
      - ping -c 2 127.0.0.1
      - echo "$ci_test01"
      - ping -c $ci_time_sec2 127.0.0.1
       
    after_script:
      - echo "After script section"
      - echo "For example you might do some cleanup here"
      - ping -c 2 127.0.0.1
       
    build1:
      stage: build
      script:
        - echo "Do your build here"
        - ping -c 3 127.0.0.1
    #  when: manual
       
    test1:
      stage: test
      script: 
        - echo "Do a test here"
        - echo "For example run a test suite"
        - ping -c 1 10.5.6.7
      #when: manual
      allow_failure: true
      
    test2:
      stage: test
      script: 
        - echo "Do another parallel test here"
        - echo "For example run a lint test"
        - ping -c 3 127.0.0.1
      #when: manual
       
    deploy1:
      stage: deploy
      script:
        - echo "Do your deploy here"
        - ping -c 3 127.0.0.1
      #when: manual
    

      

    效果:

  • 相关阅读:
    小程序模板
    小程序 if else
    小程序入门小知识
    懒加载
    展示效果
    五星评价
    萤火虫效果
    下雪效果
    选项卡
    VUE组件中 data 里面的数据为什么要return 出来
  • 原文地址:https://www.cnblogs.com/andy9468/p/12874225.html
Copyright © 2011-2022 走看看