-
Notifications
You must be signed in to change notification settings - Fork 44
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
Multiple dependencies, same package with different environments #255
Comments
This cannot be supported. The underlying problem is that you cannot address the individual packages anymore because they have the same name. The
Utilizing anonymous multiPackages you could write it as follows: # file my.yaml
multiPackage:
"":
buildVars: [VAR]
buildScript: "# build here"
packageScript: "# package here"
multiPackage:
app_var1:
environment:
VAR: "1"
app_var2:
environment:
VAR: "2"
build_all:
root: True
depends:
- my-app_var1
- my-app_var2
buildScript: "# package all variants"
I'm afraid there is no other option. Bob's structure requires that different variants of a recipe must have distinct names if they are used as input for the same package.
As long as the different cores have separate images it should be no problem because the image would be one layer of indirection. Otherwise I would propose a schema like above. |
That solution works fine for us. Thank you very much! One idea we had, would be to add a field # file my.yaml
multiPackage:
app:
buildVars: [VAR]
buildScript: "# build here"
packageScript: "# package here"
build_all:
root: True
depends:
-
name: my-app
environment:
VAR: "1"
alias: app_var1
-
name: my-app
environment:
VAR: "2"
alias: app_var2
buildScript: "# package all variants" It would be a bit more intuitive, at least for me, but in the end it's the same as your solution using the anonymous multipackage. |
You're welcome. In fact I was thinking hard about adding such a "rename" feature for a long time. In the end I was reluctant to add it so far because you will end with package names that you won't find directly in the recipes. And until now there was always another way to solve it. 😉 |
We would like to do the following:
But this is currently not supported by Bob:
Parse error: Multiple incompatible dependencies to package: my-app
A workaround we found, was to introduce intermediate packages. But they contain some boiler plate to forward the build results.
Is there any other option on how to use a certain package as dependency multiple times?
Use-cases are for example:
The text was updated successfully, but these errors were encountered: