# Skip the clone step

**URL:** <https://drone.discourse.group/t/skip-the-clone-step/10912>\
**Category:** Drone Support\
**Created:** [January 18, 2018, 8:40am UTC](https://drone.discourse.group/t/skip-the-clone-step/10912 "2018-01-18T08:40:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyansilver](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@Cyansilver](https://drone.discourse.group/u/Cyansilver)\
**Post date:** [January 18, 2018, 8:40am UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/1 "2018-01-18T08:40:10Z")

</div>

Hi,

I wonder how I can skip the clone step when it’s the only one in the pipeline.

For example, I set up the pipeline as below:

```
pipeline:
  step1:
    image: golang
    when:
      event: [push]
      branch: [test]

```

When I push to branch **test1** , it also triggers a build with only one step **clone**.

If I override the clone step as below:

```
clone:
  clone:
    image: plugins/git
    when:
      event: [push]
      branch: [test]
pipeline:
  step1:
    image: golang
    when:
      event: [push]
      branch: [test]

```

When I push to branch **test1** , the GUI shows one build is pending forever.

I use drone 0.8

---

<div class="post-metadata">

**Author:** ![robertstettner](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/robertstettner/32/3803_2.png) [@robertstettner](https://drone.discourse.group/u/robertstettner)\
**Post date:** [August 17, 2018, 1:22pm UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/2 "2018-08-17T13:22:16Z")

</div>

Bump. How do you do this in Drone 0.8.x?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [August 17, 2018, 2:47pm UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/3 "2018-08-17T14:47:55Z")

</div>

you can add a no-op clone step like this:

```auto
clone:
  none:
    image: alpine
    commands:
    - echo skipping clone

pipeline: ...

```

---

<div class="post-metadata">

**Author:** ![nikolaevigor](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nikolaevigor/32/6103_2.png) [@nikolaevigor](https://drone.discourse.group/u/nikolaevigor)\
**Post date:** [August 29, 2018, 4:21pm UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/4 "2018-08-29T16:21:57Z")

</div>

Hi,  
Just tried this method. As expected repo wasn’t cloned and echo command executed. What I am trying to implement is to completely omit this item from build list for this repo. Is it possible in current drone. I am using 0.8 verion.

Another question about your method. Will it skip cloning for all branches and all pipeline steps?

---

<div class="post-metadata">

**Author:** ![izumskee](https://avatars.discourse-cdn.com/v4/letter/i/54ee81/32.png) [@izumskee](https://drone.discourse.group/u/izumskee)\
**Post date:** [September 6, 2018, 4:18pm UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/5 "2018-09-06T16:18:35Z")

</div>

Join to [nikolaevigor](http://discuss.harness.io/u/nikolaevigor) answer. [bradrydzewski](http://discuss.harness.io/u/bradrydzewski), is it possible to completely omit clone step in this case?

---

<div class="post-metadata">

**Author:** ![dmytro-tolkodubov](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dmytro-tolkodubov](https://drone.discourse.group/u/dmytro-tolkodubov)\
**Post date:** [April 22, 2019, 2:15pm UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/6 "2019-04-22T14:15:08Z")

</div>

> [@On another topic](https://drone.discourse.group/t/1571/3):
>
> clone: none: image: alpine commands: - echo skipping clone

Hi Brad,  
Please, could you advise, what is the correct way to filter the clone step execution on 1.x version? Currently clone is step is being executed even when we have not request it to…

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [April 22, 2019, 2:23pm UTC](https://drone.discourse.group/t/skip-the-clone-step/10912/7 "2019-04-22T14:23:47Z")

</div>

[https://docs.drone.io/pipeline/docker/syntax/cloning/#custom-logic](https://docs.drone.io/pipeline/docker/syntax/cloning/#custom-logic)
