update argocd updater/test to use new flags#103
Conversation
| dev_dir = rendered/environments/aws.dev | ||
| qa_dir = rendered/environments/aws.qa | ||
| logs_dir = rendered/environments/aws.logs | ||
| prod_dir = rendered/environments/aws.prod |
There was a problem hiding this comment.
It might be good to filter on app and env the same way make k8s/tanka/generate does it (using tk env list --names). In fact, we could probably pull that out into a "list with filters" common script.
Using that, you wouldn't need to filter by app in argocd-image-updater-tester; you could just pass in a list of directories:
@bin/argocd-image-updater-tester --dirs "$$(list_with_filters.sh --app '$(app)' --env '$(env)' | paste -d, -)"
|
|
||
| ## Test argocd-image-updater annotations | ||
| updater/test: check-prereq-variables | ||
| updater/test: check-prereq-variables get-dirs |
There was a problem hiding this comment.
I think this module should sit under k8s/argocd which is then more consistent with our other helpers.
I also think updater is a bit too generic so would suggest image-updater-tester (using the app name as a reference)
So you would end up with
make k8s/argocd/image-updater-tester/...
| @rm -d bin | ||
|
|
||
| check-prereq-variables: | ||
| @[ "${GITLAB_SECRET}" ] || ( echo -e "ERROR: GITLAB_SECRET environment variable is not defined. Set the variable before running.\nexport GITLAB_SECRET=\"<gitlab_username>:<gitlab_token>\"\nhttps://argocd-image-updater.readthedocs.io/en/stable/basics/authentication/#using-an-environment-variable"; exit 1 ) |
There was a problem hiding this comment.
This is a little painful (creating/exporting this var). Would it not be better to bundle this as a docker image instead - that would typically mean we don't have to re-auth each time since.
No description provided.