-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: environment configuration for mintmaker in preview mode #5342
base: main
Are you sure you want to change the base?
fix: environment configuration for mintmaker in preview mode #5342
Conversation
hack/preview.sh
Outdated
if [[ -n "${MINTMAKER_PR_OWNER}" && "${MINTMAKER_PR_SHA}" ]] | ||
then | ||
yq -i e "(.resources[] | select(. ==\"*github.com/konflux-ci/mintmaker/config/default*\")) |= | ||
\"https://github.com/${MINTMAKER_PR_OWNER}/mintmaker/config/default?ref=${MINTMAKER_PR_SHA}\" | ||
" $ROOT/components/mintmaker/development/kustomization.yaml | ||
yq -i e "(.resources[] | select(. ==\"*github.com/konflux-ci/mintmaker/config/renovate*\")) |= | ||
\"https://github.com/${MINTMAKER_PR_OWNER}/mintmaker/config/renovate?ref=${MINTMAKER_PR_SHA}\" | ||
" $ROOT/components/mintmaker/development/kustomization.yaml | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you can just modify it to:
[[ -n "${MINTMAKER_PR_OWNER}" && "${MINTMAKER_PR_SHA}" ]] && yq -i "(.resources[] | select(contains(\"konflux-ci/mintmaker\"))) |= (sub(\"konflux-ci/mintmaker\", \"${MINTMAKER_PR_OWNER}\") | sub(\"ref=.*\", \"ref=${MINTMAKER_PR_SHA}\"))" $ROOT/components/mintmaker/development/kustomization.yaml
then it will still work if we add new resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
5f14cc8
to
1fe5d89
Compare
mintmaker/development/kustomization.yaml accumulates both konflux-ci/mintmaker/config/default and konflux-ci/mintmaker/config/renovate. The original code results in the config/renovate is lost and config/default is accumulated twice incorrectly.
1fe5d89
to
856638f
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: qixiang, tkdchen The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
mintmaker/development/kustomization.yaml accumulates both konflux-ci/mintmaker/config/default and
konflux-ci/mintmaker/config/renovate. The original code results in the config/renovate is lost and config/default is accumulated twice incorrectly.