otterdog icon indicating copy to clipboard operation
otterdog copied to clipboard

Can `base_template` be part of the `.otterdog-template` (`.eclipseFnd-template`)

Open kairoaraujo opened this issue 8 months ago • 2 comments

While experimenting with the otterdog deployment, I noticed that the otterdog.json requires the base_template for the jsonnet.

{
  "defaults": {
    "jsonnet": {
      "base_template": "https://github.com/eclipse-csi/otterdog#examples/template/otterdog-defaults.libsonnet@main",
      "config_dir": "orgs"
    }
  },
...

Please, see also #396

Question and maybe an action for this issue:

Can the template examples be maintained together with the .otterdog config template repository?

My suggestion is to maintain their base template examples together with the .otterdog and not together with the source code of the application.

When users create their .otterdog repository from our template they can modify it to their organization's without the need to fork the otterdog repository to point it as the initial template or even copy it.

Another point is for developers to create their own otterdog- organization and create .otterdog from the template and point their development entirely to the github.com/otterdog-/.otterdog

{
  "defaults": {
    "jsonnet": {
      "base_template": "https://github.com/otterdog-<username>/.otterdog#examples/template/otterdog-defaults.libsonnet@main",
      "config_dir": "orgs"
    }
  },
...

kairoaraujo avatar Mar 20 '25 11:03 kairoaraujo

Maybe the name is confusing. base_template in this context means the default config that is being used.

netomi avatar Mar 20 '25 12:03 netomi

the reason why these example reside within the otterdog source is because they are tied together. When a new feature is introduced, the example template also needs to be adjusted and you should use an otterdog version with a compatible default config.

netomi avatar Mar 20 '25 12:03 netomi