CircleCI-Public / CircleCI-Public/aws-code-deploy-orb
Out of date ENV variable in the push_bundle.sh script
- Dominant language
- Shell
- Stars
- 9
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
**Orb Version**
3.0.2
**Describe the bug**
In 3.0.1+, the push_bundle.sh script calls for ORB_VAL_BUNDLE_TYPE at https://github.com/CircleCI-Public/aws-code-deploy-orb/blob/master/src/scripts/push_bundle.sh#L19C74-L19C82 that was migrated to ORB_STR_BUNDLE_TYPE in 3.0.1 at https://github.com/CircleCI-Public/aws-code-deploy-orb/blob/master/src/scripts/push_bundle.sh#L19C74-L19C82, causing cases where the data is pushed to `blah.` but the deploy_bundle tries to grab it from `blah.zip`. If the setup has properly named files from previous deploys called `blah.zip` this doesn't fail, but looks like a success BUT deploys the older packaged version, not the newly-built one.
**To Reproduce**
Run something like:
```
- aws-code-deploy/push_bundle:
application_name: << parameters.codedeploy-application-name >>
bundle_bucket: << parameters.codedeploy-s3-bucket >>
bundle_key: << parameters.codedeploy-s3-key >>
bundle_type: zip
bundle_source: << parameters.tmp-directory-name >>
- aws-code-deploy/deploy_bundle:
application_name: << parameters.codedeploy-application-name >>
deployment_group: << parameters.codedeploy-deployment-group >>
bundle_bucket: << parameters.codedeploy-s3-bucket >>
bundle_key: << parameters.codedeploy-s3-key >>
bundle_type: zip
```
and either a failure (if xyz.zip doesn't already exist previously in s3) or an incorrect success (wrong version deployed) happens.
**Expected behavior**
The same file pushed to S3 should be deployed to the deploy targets.
**Additional context**
N/A
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/scripts/push_bundle.sh at line 19 and compare the bundle-type variable used by the push and deploy workflow. Re-run the provided CircleCI orb configuration with a fresh bundle and confirm the object pushed to S3 is the one deployed, including when no older archive exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, shell
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100