# Rancher 2.0 Pipeline conditional steps

**URL:** <https://forums.suse.com/t/rancher-2-0-pipeline-conditional-steps/11115>\
**Category:** SUSE Rancher Prime\
**Created:** [July 13, 2018, 9:02am UTC](https://forums.suse.com/t/rancher-2-0-pipeline-conditional-steps/11115 "2018-07-13T09:02:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jscrobinson](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jscrobinson/32/3317_2.png) [@jscrobinson](https://forums.suse.com/u/jscrobinson)\
**Post date:** [July 13, 2018, 9:02am UTC](https://forums.suse.com/t/rancher-2-0-pipeline-conditional-steps/11115/1 "2018-07-13T09:02:33Z")

</div>

Hi. I’ve got a pipeline set up in Rancher 2.0.4 and wanted to use the step ‘conditions’ as described in the rancher/pipeline github docs [https://github.com/rancher/pipeline/tree/master/docs#conditions](https://github.com/rancher/pipeline/tree/master/docs#conditions). Has anybody managed to get this to work successfully?

The conditions seem to be ignored by the pipeline. I’m assuming that the rancher/pipeline is what’s being used for Rancher 2.0 but can’t find any further documentation on it. Any help would be most appreciated. If this doesn’t work the plan is to set up multiple pipelines with different config for various trigger types / branches etc but this seems a bit messy.

The end goal is to only build and push a docker tag for git tags but still run tests for PRs and Commits.

My current pipeline config is:

```
name: connect-nuxt-universal-app
stages:
- name: clone
steps:
- sourceCodeConfig:
    branch: master
    branchCondition: only
    sourceCodeCredentialId: REDACTED
    url: REDACTED
- name: build
steps:
- runScriptConfig:
    image: busybox:latest
    isShell: true
    shellScript: |-
        ls
        env
- name: publish
steps:
- publishImageConfig:
    buildContext: .
    dockerfilePath: ./Dockerfile
    tag: REDACTED
    conditions:
        all:
        - "CICD_TRIGGER_TYPE=tag"
        - "CICD_GIT_BRANCH=master"
triggerWebhookPr: true
triggerWebhookTag: true
```
