Skip to content

Conversation

@rajendar38
Copy link
Contributor

GitScanner class. checks that:
The scanner correctly resolves the remote URL of the Git repo.
It resolves the commit SHA for both HEAD and a branch (master here).
It sets the correct branch name in the returned info object.
Essentially, it verifies that GitScanner can correctly fetch Git metadata.

MultiScmEnvAction is a Jenkins Environment-Contributing Action:
Implements EnvironmentContributingAction, which allows Jenkins plugins to inject environment variables into a build (Run) dynamically.
This is commonly used in multi-SCM setups, where a job may check out multiple Git repositories.
In short: this class makes Git info available as environment variables during the build.

<relativePath />
<version>4.88</version>
<relativePath/>
</parent>
Copy link
Contributor

Choose a reason for hiding this comment

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

@rajendar38 is this required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is required.
I tried building 5.17 , but I am unable build it ,

This is a Jenkins plugin using hpi packaging, which is defined by the org.jenkins-ci.plugins:plugin parent POM. Without it, Maven fails with Unknown packaging: hpi.

The empty <relativePath/> is recommended Jenkins practice to ensure the parent is always resolved from Maven repositories and not from a local
filesystem path.
Version 4.88 was chosen as a stable, Java 11+ compatible baseline. Upgrading
to 5.x can be handled separately.

Copy link
Contributor

@panicking panicking Jan 5, 2026

Choose a reason for hiding this comment

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

panicking@panicking:~/work/michael/git-collect$ git diff

diff --git a/pom.xml b/pom.xml
index 3312957..934c825 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.jenkins-ci.plugins</groupId>
         <artifactId>plugin</artifactId>
-        <version>4.88</version>
+        <version>5.17</version>
         <relativePath/>
     </parent>
 
@@ -73,7 +73,6 @@
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
-            <version>3.12.4</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

Copy link
Contributor

Choose a reason for hiding this comment

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

This change seems to work

Copy link
Contributor

@panicking panicking left a comment

Choose a reason for hiding this comment

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

Thank you for your contribuition, I have only one comment now

@panicking
Copy link
Contributor

@rajendar38 merged with changes, basically drop commited file that should not be there and not change 5.17

@panicking panicking closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants