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

Fail fast when attempting to run PCT against a release with a missing or nondeterministic tag #499

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

basil
Copy link
Member

@basil basil commented Mar 23, 2023

#496 but filed against the proper origin. See #496 for the description.

@basil
Copy link
Member Author

basil commented Mar 23, 2023

Tested successfully in jenkinsci/bom#1880.

Copy link
Member

@jtnord jtnord left a comment

Choose a reason for hiding this comment

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

does this not break --local-checkout-dir for regular (non multi-modul) plugins?

public void action(@NonNull BeforeCheckoutContext context)
throws PluginSourcesUnavailableException {
Model model = context.getModel();
if (model.getScm().getTag() == null || model.getScm().getTag().equals("HEAD")) {
Copy link
Member

Choose a reason for hiding this comment

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

I have a feeling this breaks --local-checkout-dir for regular (non multi-module) plugins which is a used developer flow to check compatability without having to constantly rebuild a war?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure. --local-checkout-dir doesn't really work for the local development use case anyway since PCT deletes the whole Git repository before cloning: I'd be too afraid to point it to my local directory out of fear of losing all my local branches. And in automation it's not used at all in jenkinsci/bom and used more or less in ignorance of the correct approach in proprietary consumers.

I'm inclined to let it break for now. Once the dust has settled with multimodule support, which I think should include ripping --local-checkout-dir from all automation, I'll look into getting it to work again in an intuitive fashion for the local development use case.

@basil
Copy link
Member Author

basil commented Mar 23, 2023

In the latest revision I have made this run only when --local-checkout-dir is not specified, which should be the case for any proper automation. Anyone using --local-checkout-dir is on their own without this guardrail.

@basil basil merged commit 5a54bfd into master Mar 24, 2023
@basil basil deleted the snapshot branch March 24, 2023 16:46
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