# Skipping a deployment with the script provider because this branch is not permitted: advanced-1.0.0

**URL:** <https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895>\
**Category:** Deployment\
**Created:** [November 14, 2018, 12:59pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895 "2018-11-14T12:59:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![runzexia](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@runzexia](https://travis-ci.community/u/runzexia)\
**Post date:** [November 14, 2018, 12:59pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/1 "2018-11-14T12:59:51Z")

</div>

I tried to push the tag to the master branch. But the deploy is not being executed correctly  
[https://travis-ci.org/kubesphere/devops/builds/454893079](https://travis-ci.org/kubesphere/devops/builds/454893079)

```auto
language: go

go_import_path: kubesphere.io/devops

go:
  - "1.10.3"

sudo: required

services:
- docker

before_script:
- docker --version

install:
  - chmod +x hack/*.sh
  - go get golang.org/x/tools/cmd/goimports

scripts:
  - make check
  - make test

deploy:
  - provider: script
    script: bash hack/docker_push.sh latest
    on:
      branch: master
      repo: kubesphere/devops
  - provider: script
    script: bash hack/docker_push.sh $TRAVIS_TAG
    on:
      tags: true
      repo: kubesphere/devops

```

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 14, 2018, 2:54pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/2 "2018-11-14T14:54:54Z")

</div>

Please elaborate on what you mean by “not being executed correctly”. I see that the deployment is correctly initiated.

---

<div class="post-metadata">

**Author:** ![runzexia](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@runzexia](https://travis-ci.community/u/runzexia)\
**Post date:** [November 14, 2018, 3:21pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/3 "2018-11-14T15:21:54Z")

</div>

Deploy is not executed when I push tag to the master branch

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 14, 2018, 3:33pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/4 "2018-11-14T15:33:41Z")

</div>

I’m sorry, but I must be missing something, because [https://travis-ci.org/kubesphere/devops/builds/454893079#L490](https://travis-ci.org/kubesphere/devops/builds/454893079#L490) shows that the deployment is triggered on the `advanced-1.0.0` tag.

(As an aside, note that a git tag is tied to a commit, not a branch, so “push tag to the master branch” is semantically incorrect.)

---

<div class="post-metadata">

**Author:** ![runzexia](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@runzexia](https://travis-ci.community/u/runzexia)\
**Post date:** [November 14, 2018, 4:03pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/5 "2018-11-14T16:03:12Z")

</div>

Many thanks to the reminder about the tag statement error. In my travis yaml, the “deploy step” is included, and this step does not have a normal trigger in this build. Output log prompt

```auto
Skipping a deployment with the script provider because this branch is not permitted: advanced-1.0.0

```

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 14, 2018, 4:10pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/6 "2018-11-14T16:10:26Z")

</div>

Thanks for the clarification. You have two deployment providers defined. One that acts on `branch: master`, and the other on `tags: true`. The [“not started” message](https://travis-ci.org/kubesphere/devops/builds/454893079#L489) comes from the first, as this is a tag build (and not a `master` branch build).

---

<div class="post-metadata">

**Author:** ![runzexia](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@runzexia](https://travis-ci.community/u/runzexia)\
**Post date:** [November 14, 2018, 4:38pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/7 "2018-11-14T16:38:31Z")

</div>

So what if I want to execute different deploys in the tagged version? In the [https://travis-ci.org/openpitrix/openpitrix/jobs/454336818#L3100](https://travis-ci.org/openpitrix/openpitrix/jobs/454336818#L3100) repository, the yaml file can be written in the same way to execute the tag deploy. Did I make a mistake?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 14, 2018, 5:19pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-script-provider-because-this-branch-is-not-permitted-advanced-1-0-0/895/8 "2018-11-14T17:19:52Z")

</div>

> [@runzexia](#):
>
> So what if I want to execute different deploys in the tagged version?

You can define multiple deployment providers acting on the same condition.
