Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dependency outputs #525

Merged
merged 5 commits into from
Aug 21, 2019
Merged

Conversation

carolynvs
Copy link
Member

@carolynvs carolynvs commented Aug 19, 2019

  • Inject the output values for each dependency into /cnab/app/dependencies/ALIAS/outputs
  • Inject the bundle.json for each dependency into /cnab/app/dependencies/ALIAS/bundle.json
  • Inject bundle.dependencies.ALIAS.outputs.OUTPUT

Closes #432

@carolynvs carolynvs force-pushed the dep-outputs branch 2 times, most recently from b369938 to 3fd7d35 Compare August 20, 2019 14:46
@carolynvs carolynvs changed the title Support outputs in bundles with dependencies Support dependency outputs Aug 20, 2019
@@ -43,7 +43,7 @@ install:
#externalDatabase.database: "{{ bundle.dependencies.mysql.parameters.database-name }}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have another issue to address bundle.dependencies.DEP.parameters.PARAM #533

if err != nil {
return errors.Wrap(err, "unable to instantiate driver")
}
i := action.Uninstall{
Driver: driver,
Driver: driver,
OperationConfig: args.ApplyFiles(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change here is part of a PR to cnab-go (see cnabio/cnab-go#112). In the meantime, we'll use my fork.


if bun.Outputs == nil || m.Action == ActionUninstall {
// uninstalls are done backwards, so we don't have outputs available from dependencies
// TODO: validate that they weren't trying to use them at build time so they don't find out at uninstall time.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #532

return nil, err
bun["dependencies"] = deps
for alias, bun := range m.bundles {
// TODO: Do we still want to allow resolving against bundle.dependencies.ALIAS.parameters.NAME and credentials?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't going to support bundle.dependencies.DEP.credentials anymore. I will come back in another PR and remove that from the docs and examples.

@carolynvs carolynvs force-pushed the dep-outputs branch 2 times, most recently from 481b2b3 to b63d918 Compare August 20, 2019 16:53
@carolynvs carolynvs marked this pull request as ready for review August 20, 2019 18:11
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 LGTM!

Makefile Outdated Show resolved Hide resolved
pkg/config/outputs.go Show resolved Hide resolved
tests/dependencies_test.go Outdated Show resolved Hide resolved
* Inject the output values for each dependency into
/cnab/app/dependencies/SLUG/outputs
* Inject the bundle.json for each dependency into
/cnab/app/dependencies/SLUG/bundle.json
* Inject bundle.dependencies.DEP.outputs.OUTPUT
@carolynvs
Copy link
Member Author

Rebased

@carolynvs carolynvs merged commit a105848 into getporter:master Aug 21, 2019
@carolynvs carolynvs deleted the dep-outputs branch August 21, 2019 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wire up a bundle's outputs into bundle.dependencies.NAME.outputs
3 participants