kubernetes-management icon indicating copy to clipboard operation
kubernetes-management copied to clipboard

Run only `Jenkinsfile_updatecli` if `updatecli` is the only folder updated

Open lemeurherve opened this issue 1 year ago • 4 comments

What feature do you want to see added?

Similar to https://github.com/jenkins-infra/docker-jenkins-weekly and using a script like https://github.com/jenkins-infra/docker-jenkins-weekly/blob/main/bin/select-target-from-modified-files.sh, I propose to run only updatecli and not Jenkinsfile_k8s if only the updatecli folder is updated.

Super low priority, but could be a nice little QoL improvement.

Upstream changes

No response

lemeurherve avatar Jan 23 '24 11:01 lemeurherve

At first sight, -1 from me.

If we change the content of the repository, updatecli must always be run even if the manifest is not updated to ensure its target has not been changed and are still valid.

As such, there is no reason to "optimize" in this case (which is different than the build itself)

dduportal avatar Jan 23 '24 11:01 dduportal

If we change the content of the repository, updatecli must always be run even if the manifest is not updated to ensure its target has not been changed and are still valid.

I agree, that's the contrary I'm proposing here 🙂

If only the updatecli folder has been changed, there is (IMO) no need to run the complete kubernetes-management pipeline, just the updatecli one.

lemeurherve avatar Jan 23 '24 13:01 lemeurherve

If we change the content of the repository, updatecli must always be run even if the manifest is not updated to ensure its target has not been changed and are still valid.

I agree, that's the contrary I'm proposing here 🙂

If only the updatecli folder has been changed, there is (IMO) no need to run the complete kubernetes-management pipeline, just the updatecli one.

my bad, it makes sense then.

I'm not sure about the branch protection though: I'm not aware of branch protection rules which should be conditional though

dduportal avatar Jan 23 '24 13:01 dduportal

The main pipeline could just return a success with a message like "INFO: the only folder modified is updatecli, skiping." in that case, WDYT?

lemeurherve avatar Jan 23 '24 13:01 lemeurherve