云应用引擎 CAE-操作步骤:使用流水线升级多个组件

时间:2024-07-08 11:45:36

使用流水线升级多个组件

  1. 选择流水线,单击“参数化构建”

    图7 参数化构建

  2. 选择要升级的组件,可以选择一个或多个同时升级,本示例选择全部组件同时升级,单击“开始构建”。

    图8 选择组件

  3. 可在构建历史中查看流水线任务执行结果。

    图9 查看执行结果

  4. 流水线日志如下所示,可以看出先升级componentA,再并行升级componentB和componentC,最后升级componentD。

    Started by user admin
    Running in Durability level: MAX_SURVIVABILITY
    [Pipeline] Start of Pipeline
    [Pipeline] node
    Running on Jenkins in /root/.jenkins/workspace/pipeline-arrange
    [Pipeline] {
    [Pipeline] sh
    + echo componentA,componentB,componentC,componentD
    + grep -w -o componentA
    [Pipeline] sh
    + echo componentA,componentB,componentC,componentD
    + grep -w -o componentD
    [Pipeline] sh
    + echo componentA,componentB,componentC,componentD
    + grep -w -o componentB
    [Pipeline] sh
    + echo componentA,componentB,componentC,componentD
    + grep -w -o componentC
    [Pipeline] withEnv
    [Pipeline] {
    [Pipeline] stage
    [Pipeline] { (Build componentA)
    [Pipeline] sh
    + echo 'start to build componentA'
    start to build componentA
    [Pipeline] script
    [Pipeline] {
    [Pipeline] build
    Scheduling project: componentA
    Starting building: componentA #13
    [Pipeline] echo
    SUC CES S
    [Pipeline] }
    [Pipeline] // script
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] stage
    [Pipeline] { (Build parallel jobs)
    [Pipeline] parallel
    [Pipeline] { (Branch: Build componentB)
    [Pipeline] { (Branch: Build componentC)
    [Pipeline] stage
    [Pipeline] { (Build componentB)
    [Pipeline] stage
    [Pipeline] { (Build componentC)
    [Pipeline] sh
    [Pipeline] sh
    + echo 'start to build componentB'
    start to build componentB
    [Pipeline] script
    + echo 'start to build componentC'
    start to build componentC
    [Pipeline] {
    [Pipeline] script
    [Pipeline] {
    [Pipeline] build
    Scheduling project: componentB
    [Pipeline] build
    Scheduling project: componentC
    Starting building: componentB #12
    Starting building: componentC #12
    [Pipeline] echo
    SUCCESS
    [Pipeline] }
    [Pipeline] // script
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] echo
    SUCCESS
    [Pipeline] }
    [Pipeline] // script
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // parallel
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] stage
    [Pipeline] { (Build componentD)
    [Pipeline] sh
    + echo 'start to build componentD'
    start to build componentD
    [Pipeline] script
    [Pipeline] {
    [Pipeline] build
    Scheduling project: componentD
    Starting building: componentD #10
    [Pipeline] echo
    SUCCESS
    [Pipeline] }
    [Pipeline] // script
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // withEnv
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
    Finished: SUCCESS

  5. 登录CAE控制台查看组件状态,“最近一次变更状态/时间”列显示状态为“升级成功”,表示组件升级成功。

    图10 查看组件

support.huaweicloud.com/bestpractice-cae/cae_05_0046.html