Skip to content

Conversation

@cojennin
Copy link
Contributor

This pull request should hopefully fix the following issue I've walked through in "Steps to reproduce" below. I have it currently running on my personal Jenkins and it seems to have fixed the issue. Probably not the cleanest and unsure how to standardize this pull request, so I've just listed a steps to reproduce below and I'd be happy to make any code changes as necessary.

Steps to reproduce

  • Install v1.8 of AWS Codedeploy plugin on Jenkins 1.583
  • Create a project and make sure to select "This build is parameterized"
  • Add "Deploy an application to AWS CodeDeploy" as a Post-Build step to a project
  • In the "AWS CodeDeploy Deployment Group" field, use a parameter of the project (in this example, I will use $DEPLOYMENT_GROUP to represent the parameter). So the value of the "AWS CodeDeploy Deployment Group" field is $DEPLOYMENT_GROUP
  • Run a build, pass "QA" as the value of the parameter $DEPLOYMENT_GROUP
  • Wait until the build is complete complete, then revisit (leave the "Configure" page and visit it again) the "Configure" page of the project you created.
  • The value of the "AWS CodeDeploy Deployment Group" field is now "QA"

…AWS CodeDeploy Deployment Group field.

When executing a build, if an environemnt variable is specified by name in the AWS CodeDeploy Deployment Group field, at the end of the build the value of the environment variable will ovewrite the name of the environment variable in that field.

Example of the bug this commit fixes:
At the start of a build, the value of AWS CodeDeploy Deployment Group is "$DEPLOYMENT_GROUP". I then do a build where the value of the $DEPLOYMENT_GROUP environment variable is "QA". If I wait until the end of the build and come back to the Configure page, the value of the field will now be "QA".
@dlen
Copy link

dlen commented Nov 10, 2015

This is interesting feature to be fixed is it going to be merged anytime soon?

@Jmcfar Jmcfar added the bug label Nov 15, 2015
surybala added a commit that referenced this pull request Dec 4, 2015
AWS CodeDeploy Deployment Group environment variable value ovewrites field value
@surybala surybala merged commit e46d0ef into awslabs:master Dec 4, 2015
@surybala
Copy link
Contributor

surybala commented Dec 4, 2015

Validated. Thanks for your contribution.

@br0ch0n
Copy link

br0ch0n commented Dec 5, 2015

+1 THANK YOU. I thought I was losing my mind. Had never seen a job mysteriously reconfigure itself before. Happy (well, not that it was a happy thing) that this issue happened to not-just-me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants