-
Notifications
You must be signed in to change notification settings - Fork 8
Description
odo pipeline init
creates GitOps repos that use a modified version of the gitops repository spec, as per https://github.com/rhd-gitops-example/manifest-documentation. See for example https://github.com/bigkevmcd/gitops/.
In order to support multiple environments, a path /environments/environment-name/
is added to the top of the directory structure.
Currently we use
services promote --from [path] --to [git url] --service [name]
This means, copy [name]/config/*
to /services/[name]/base/config/*
in the [git url] repo via a PR. In the new case, the target path is /environment/[environment-name]/services/[service-name]/base/config/*
and the question is, How do we determine [environment-name] when preparing the pull request, if the [service-name] subdirectory does not exist?
- We could add another command line arg,
--env env-name
- We could say, ‘if /environment contains only one subdirectory, use it’
- We could say, ‘if /environment is empty, create a subdirectory whose name is the same as the target repo’
Under this issue implement option 2 and either implement option 1 or raise a follow-on issue to do so.
Also update our example projects (gitops-exampl-dev and -staging) to conform to the new format.
Also update our sample code and documentation.