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

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.

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
Contributor

@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
@tkdchen tkdchen force-pushed the fix-env-config-for-mintmaker branch from 1fe5d89 to 856638f Compare January 22, 2025 08:34
@qixiang
Copy link
Contributor

qixiang commented Jan 22, 2025

/lgtm

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.
@tkdchen tkdchen force-pushed the fix-env-config-for-mintmaker branch from 856638f to b368950 Compare March 6, 2025 03:47
@openshift-ci openshift-ci bot removed the lgtm label Mar 6, 2025
@tkdchen
Copy link
Contributor Author

tkdchen commented Mar 6, 2025

Rebased on main branch.

Copy link
Member

@mmorhun mmorhun left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Mar 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mmorhun, qixiang, tkdchen

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved label Mar 7, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 6f1c664 into redhat-appstudio:main Mar 7, 2025
6 checks passed
@tkdchen tkdchen deleted the fix-env-config-for-mintmaker branch March 10, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants