Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tkdchen
Copy link
Contributor

@tkdchen tkdchen commented Jan 22, 2025

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.

hack/preview.sh Outdated
Comment on lines 214 to 222
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
Copy link
Collaborator

@qixiang qixiang Jan 22, 2025

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@tkdchen tkdchen force-pushed the fix-env-config-for-mintmaker branch from 5f14cc8 to 1fe5d89 Compare January 22, 2025 08:29
@tkdchen tkdchen requested a review from qixiang January 22, 2025 08:30
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.
@tkdchen tkdchen force-pushed the fix-env-config-for-mintmaker branch from 1fe5d89 to 856638f Compare January 22, 2025 08:34
@qixiang
Copy link
Collaborator

qixiang commented Jan 22, 2025

/lgtm

Copy link

openshift-ci bot commented Jan 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: qixiang, tkdchen
Once this PR has been reviewed and has the lgtm label, please assign ksprinkl for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants