bcgov / TheOrgBook

A public repository of verifiable claims about organizations. A key component of the Verifiable Organization Network.
http://von.pathfinder.gov.bc.ca
Apache License 2.0
78 stars 66 forks source link

tob-* profile.param files don't seem to apply to build/deploy templates #872

Closed chrismajewski closed 4 years ago

chrismajewski commented 4 years ago

I grant I may be doing something dumb or missing something obvious but if I understand how profiles work...

If I edit tob-backup profile.param: TheOrgBook/tob-backup/openshift/backup-build.chrismajewski.param

And I change to another backup-container repo to debug with: GIT_REPO_URL=https://github.com/chrismajewski/backup-container.git

When I re-(genParams.sh -f -p chrismajewski) should that not be reflected in the template/backup-build.profile.param: TheOrgBook/tob-backup/openshift/templates/backup-build.chrismajewski.param

Right now the base template template: TheOrgBook/tob-backup/openshift/templates/backup-build.json

Hardcodes the repo to: "value": "https://github.com/BCDevOps/backup-container.git"

Meaning my template/backup-build.chrismajewski.param still has: GIT_REPO_URL=https://github.com/BCDevOps/backup-container.git

I'll hardcode the template/backup-build.json to my needs for now but should I not be able to modify sources of these components via profiles to test options in experimental tob-* sub components via changes to GIT_REPO_URL and GIT_REF? My ability to stay up-to-date is at stake ;)

WadeBarnes commented 4 years ago

Do you have a setting.chrismajewski.sh where the GIT_REPO_URL=https://github.com/chrismajewski/backup-container.git is defined?

WadeBarnes commented 4 years ago

This is likely what is stopping the Git ref from updating; export skip_git_overrides="schema-spy-build.json solr-base-build.json backup-build.json" in the main settings.sh file. When you regenerate the param files ((genParams.sh -f -p chrismajewski), it's pulling the Git repo URL from the backup-build.json template and overwriting all your param files.

chrismajewski commented 4 years ago

I have the profile in my working copy.

TheOrgBook/openshift/settings.chrismajewski.sh which specifies export GIT_URI="https://github.com/chrismajewski/TheOrgBook.git"

I'll export over skip_git_overrides in my param file to remove backup-build.json and try again. Sounds promising.

WadeBarnes commented 4 years ago

Normally you would generate the param files using genParams.sh -p chrismajewski and then update the resulting pararm files you suit your needs, before using genBuilds or genDepls.

chrismajewski commented 4 years ago

I think I'm covering it after reading --help on each

initOSProjects.sh -p chrismajewski

genParams.sh -f -p chrismajewski genBuilds.sh -u -p chrismajewski genDepls.sh -u -p chrismajewski

WadeBarnes commented 4 years ago

Between genParams.sh -f -p chrismajewski and genBuilds.sh -u -p chrismajewski you'll need to edit the param files as needed for your environments. They will contain the defaults defined in the templates with a few updates from your settings.sh file like your GIT_URI.

chrismajewski commented 4 years ago

Because I'm looking at it wrong.

genParams isn't meant to regenerate templates from other in place param files, it's meant to create the param files to tweak manually for iterative calls to getBuild. It's more like another form of init really.

Building to that profile later uses the files you've manually tweaked for the next step.

Thanks