Closed tombart closed 2 months ago
I was under impression that this command will be using information from remote repository. I.e. if I do
corectl p2p export -r <path_to_app>
it will not ask me abouttenant
but will get it from repo variableTENANT_NAME
As for the environments (as there may be muliple existing per repo) we could make user choose, but only from the ones that exists in repo, i.e.
gcp-prod
,gcp-dev
As agreed with Tiago/Lukasz:
new functionality that allows to export required env variables required to execute onboarded apps p2p make targets issue: https://github.com/coreeng/project-platform-accelerator/issues/396. The command will print out export statements in new lines as:
The user is expected to copy and paste in terminal.
Example run:
corectl p2p export --tenant tomaszb --environment gcp-dev --repoPath ../tombart-app
orcorectl p2p export --tenant tomaszb --environment gcp-dev
-- defaults to current dir oreval $(corectl p2p export --tenant tomaszb --environment gcp-dev --repoPath ../tombart-app)
-- automatically add vars to current shellThere is quite a lot of duplication in the tool in both logic and code, however due to the size of this pr didn't do much cleanup. Probably better to tackle separately as sep tickets. Also p2p sync command is quite similar to this one, however not very extensible to be re-used. Would need to major refactoring which decided not to do as a part of this work.