csye7125-fall2023-group05 / ami-jenkins

Custom AMI built using HashiCorp Packer to configure a Jenkins server for CI/CD
1 stars 3 forks source link

May i ask what environment: ${{ vars.ENVIRONMENT }} used for in Gihtub Action workflow? #44

Closed xinatcg closed 3 weeks ago

xinatcg commented 2 months ago

May i ask what environment: ${{ vars.ENVIRONMENT }} used for in Gihtub Action workflow?

and what I should setup for vars.ENVIRONMENT?

sydrawat01 commented 2 months ago

Hi @xinatcg, the vars.ENVIRONMENT variable is used to differentiate between development, staging and production build of the custom AMI for our Jenkins server image. We have this configured at organization level rather than repository level since all of our repositories require development, staging and production builds for our CD pipelines.

Once you configure the ENVIRONMENT at the organization level, you can have localized variables in your repositories (like here) to differentiate the AWS credentials required for different environments for your builds.

sydrawat01 commented 3 weeks ago

Closing this as resolved. Please feel free to reopen the issue if you still have doubts!