小编nz_*_*ree的帖子

如何在bitbucket pipelines.yml文件中编写条件语句?

我是 bitbucket 管道的新手,并尝试使用 javaScript 通过 bitbucket 管道部署我的代码。我的问题是我们可以声明变量(例如:var flag = false),然后根据标志值编写 if/else 语句吗?

下面是我的 pipelines.yml 文件

# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:12.18.2

pipelines:
branches: # deploying as per branches
 feature/pocDepTerex: # poc master branch
    - step: 
       caches:
        - node
       script: 
         - …
Run Code Online (Sandbox Code Playgroud)

javascript continuous-integration bitbucket node.js bitbucket-pipelines

6
推荐指数
2
解决办法
1万
查看次数