Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Missing Environment Variables Error.

Hello,

I have created Environments in deployments namely Development and Production which are using different aws accounts for deployment purposes.

I have added variables in development environment :

dev_env.png

and this is my pipeline snippet :
pipe_snip.png


this is giving me error  - AWS_ACCESS_KEY_ID variable is missing.
I have tried to add in repository variables and it worked, but my requirement is environment specific since we are using different aws accounts for production and development.

repo_vars.png

Let me know what I'm missing.

Thanks.



1 answer

1 accepted

0 votes
Answer accepted

Hello @Darshan Gerra ,

It looks like the step with AWS pipe is missing deployment: Deployment property. The previous step, in turn, shouldn't have it as it doesn't actually do deploy.

Hope this helps.

Cheers,
Daniil

Thanks Daniil,

adding deployment: Development in first step works, and i'm getting another error in another step. Require your expertise and help.

Pipeline snippet : 

bitbucket_pipe.png

Error : 
error.png

Same thing: if your variables are defined for a specific environment, they are not visible unless your step is marked as deployment step to that environment. Moreover, you can only define a particular deployment environment once per pipeline. That is, you can't mark two or more steps as deployment steps to the very same environment within one pipeline.

So if the second step you added is meant to do something around the same environment (Development in your case), you need to consolidate two steps into one which would call both pipes in its script.

Hope this makes sense. Let me know if you have any questions.

Cheers,
Daniil

Thanks Daniil,

I have tried to merge steps and it worked. One thing I want to know on this : if I have s3 deployment , lambda deployments, docker images deployment to ec2 using code-deploy in my application, So should I include all these in a single step??

Well, if they all are part of a single deployment to a single environment from the very same repository, then yes, they all should happen within one step marked as deployment step for that environment.

You can split your pipeline into multiple if that makes sense. In that case each pipeline would only deploy its own component. Again, constraint is: one deployment step into a given environment within a pipeline.

Another option is to move your deployment logic into external script. But you won't be able to easily use pipes there, so this is probably not a desired option I guess, by the look of your current script.

Cheers,
Daniil

Understood, I have merged all deployments into a single step.

Thanks alot Daniil.

Like Daniil Penkin likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

505 views 6 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you