Using variables or RPM macros in RemoteAssetUrl?
![](https://seccdn.libravatar.org/avatar/82e205074998b62b41625d6de2784e5d.jpg?s=120&d=mm&r=g)
Hi all, when building containers, one can use #!RemoteAssetUrl: together with the download_assets service, so OBS downloads the files when uploading a new package version. Very handy, but one thing seems to not work: Can I use variables or RPM macros in the URLs? If so, how? I can use prjconf to set docker build args aka "ARG". Would be great if this worked for the assets, too... Kind Regards Johannes
![](https://seccdn.libravatar.org/avatar/757205097a14d69edc12951b3375437b.jpg?s=120&d=mm&r=g)
Hi Johannes,
On May 24, 2024 11:39:52 PM GMT+02:00, Johannes Kastl
Hi all,
when building containers, one can use #!RemoteAssetUrl: together with the download_assets service, so OBS downloads the files when uploading a new package version.
Very handy, but one thing seems to not work:
Can I use variables or RPM macros in the URLs? If so, how?
I can use prjconf to set docker build args aka "ARG". Would be great if this worked for the assets, too...
I think this is conceptually problematic as macros can be set on a repository basis, but that would mean that you end up with potentially different assets per repo. Cheers, Dan
![](https://seccdn.libravatar.org/avatar/84ee0bcf221e4fb2b4741908022b82fb.jpg?s=120&d=mm&r=g)
On Montag, 27. Mai 2024, 12:10:31 CEST Dan Čermák wrote:
Hi Johannes,
On May 24, 2024 11:39:52 PM GMT+02:00, Johannes Kastl
wrote: Hi all,
when building containers, one can use #!RemoteAssetUrl: together with the download_assets service, so OBS downloads the files when uploading a new package version.
Very handy, but one thing seems to not work:
Can I use variables or RPM macros in the URLs? If so, how?
I can use prjconf to set docker build args aka "ARG". Would be great if this worked for the assets, too...
I think this is conceptually problematic as macros can be set on a repository basis, but that would mean that you end up with potentially different assets per repo.
indeed.
It could work in theory for things like architectures, where we know mostly
all of possible values and can execute the download for each of them.
But zero chance for a free text variable...
--
Adrian Schroeter
![](https://seccdn.libravatar.org/avatar/82e205074998b62b41625d6de2784e5d.jpg?s=120&d=mm&r=g)
Hi Adrian, On 27.05.24 12:45 Adrian Schröter wrote:
It could work in theory for things like architectures, where we know mostly all of possible values and can execute the download for each of them.
But zero chance for a free text variable...
OK, thanks for the confirmation. I thought so. Have a holiday and (long) nice weekend, everybody! Kind Regards, Johannes
![](https://seccdn.libravatar.org/avatar/82e205074998b62b41625d6de2784e5d.jpg?s=120&d=mm&r=g)
Good evening Dan, On 27.05.24 12:10 Dan Čermák wrote:
On May 24, 2024 11:39:52 PM GMT+02:00, Johannes Kastl
wrote:
Can I use variables or RPM macros in the URLs? If so, how?
I can use prjconf to set docker build args aka "ARG". Would be great if this worked for the assets, too...
I think this is conceptually problematic as macros can be set on a repository basis, but that would mean that you end up with potentially different assets per repo.
That was the idea. Having separate projects for e.g. different versions of a software. I can use ARG for setting things like that in a Dockerfile, but if this does not work with the remote assets, then this might pull in the wrong version of e.g. a file. Kind Regards, Johannes
![](https://seccdn.libravatar.org/avatar/84ee0bcf221e4fb2b4741908022b82fb.jpg?s=120&d=mm&r=g)
On Mittwoch, 29. Mai 2024, 23:29:13 CEST Johannes Kastl wrote:
Good evening Dan,
On 27.05.24 12:10 Dan Čermák wrote:
On May 24, 2024 11:39:52 PM GMT+02:00, Johannes Kastl
wrote: Can I use variables or RPM macros in the URLs? If so, how?
I can use prjconf to set docker build args aka "ARG". Would be great if this worked for the assets, too...
I think this is conceptually problematic as macros can be set on a repository basis, but that would mean that you end up with potentially different assets per repo.
That was the idea. Having separate projects for e.g. different versions of a software. I can use ARG for setting things like that in a Dockerfile, but if this does not work with the remote assets, then this might pull in the wrong version of e.g. a file.
It is not impossible to add support, but it would mean the buildconfig of
each repo needs to be calculated first.
That would need to be implemented in multiple places. Without a bigger
need, I would not see that we add support for that atm...
--
Adrian Schroeter
participants (3)
-
Adrian Schröter
-
Dan Čermák
-
Johannes Kastl