# Plugin environment variables question

**URL:** <https://forum.buildkite.community/t/plugin-environment-variables-question/1303>\
**Category:** General\
**Created:** [October 23, 2020, 7:46pm UTC](https://forum.buildkite.community/t/plugin-environment-variables-question/1303 "2020-10-23T19:46:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [October 23, 2020, 7:46pm UTC](https://forum.buildkite.community/t/plugin-environment-variables-question/1303/1 "2020-10-23T19:46:55Z")

</div>

I’m using the `ecr-buildkite-plugin` and wanted to add `retries: 2` to all my steps. I was wondering if the “best practice” way of doing this is actually adding `retries: 2` everywhere, or should I just set `BUILDKITE_PLUGIN_ECR_RETRIES=2` in my pipeline env as a “global” setting?

---

<div class="post-metadata">

**Author:** ![juanitofatas](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/juanitofatas/32/957_2.png) [@juanitofatas](https://forum.buildkite.community/u/juanitofatas)\
**Post date:** [October 26, 2020, 12:41am UTC](https://forum.buildkite.community/t/plugin-environment-variables-question/1303/2 "2020-10-26T00:41:32Z")

</div>

Hi Ngan 👋

Set environment for the pipeline then step can access it sounds like a good idea to me.

> **[Environment Variables](https://buildkite.com/docs/pipelines/environment-variables#defining-your-own)**
>
> When the agent invokes your build scripts it passes in a set of standard Buildkite environment variables, along with any that you've defined in your build configuration. You can use these environment variables in your build steps and agent hooks.

Cheers,  
Juanito
