# Environment variable identifying a deployment?

**URL:** <https://discuss.circleci.com/t/environment-variable-identifying-a-deployment/5669>\
**Category:** Deployments\
**Created:** [August 12, 2016, 4:53pm UTC](https://discuss.circleci.com/t/environment-variable-identifying-a-deployment/5669 "2016-08-12T16:53:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilong](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/emilong/32/11314_2.png) [@emilong](https://discuss.circleci.com/u/emilong)\
**Post date:** [August 12, 2016, 4:53pm UTC](https://discuss.circleci.com/t/environment-variable-identifying-a-deployment/5669/1 "2016-08-12T16:53:33Z")

</div>

Is there a way to determine if a build is running specifically as a deployment? Something along the lines of the `CI` variable, but maybe `CI_DEPLOYMENT=true`?

Thanks!

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [August 12, 2016, 6:39pm UTC](https://discuss.circleci.com/t/environment-variable-identifying-a-deployment/5669/2 "2016-08-12T18:39:32Z")

</div>

The deployment phase is just a part of the build process. Any build in theory can be a deployment depending on what is specified in `circle.yml`.

Depending on what you are doing, if you really need an environment variable you can prefix a deployment command with one:

```auto
deployment:
  production:
    branch: master
    commands:
      - CI_DEPLOYMENT=true ./run-this-thing.sh

```

How helpful that would be is dependent on what you’re doing I guess.

---

<div class="post-metadata">

**Author:** ![emilong](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/emilong/32/11314_2.png) [@emilong](https://discuss.circleci.com/u/emilong)\
**Post date:** [August 12, 2016, 7:26pm UTC](https://discuss.circleci.com/t/environment-variable-identifying-a-deployment/5669/3 "2016-08-12T19:26:32Z")

</div>

Ah, I see. That actually answered a bunch of other questions I had… 🙂

I’m trying not to run test on tagged deploys since they’ve already run once in our process. I can do that by overriding the test phase, but I was hoping to short circuit it higher up to avoid duplicated logic and to let Circle be in control of test.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/environment-variable-identifying-a-deployment/5669/4 "2018-06-18T11:41:05Z")

</div>


