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

Fixes #365 #548

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
79ab7d4
Some change to see if it works
mukundsrinivasb Jan 21, 2023
e45e399
Some change to see if it works
mukundsrinivasb Jan 22, 2023
70cc251
Some change to see if it works..??
mukundsrinivasb Jan 22, 2023
1763bc5
Some more commits ...
mukundsrinivasb Jan 22, 2023
4117023
Some more changes just to see if it works
mukundsrinivasb Jan 22, 2023
9a1e81e
My changes work
mukundsrinivasb Jan 22, 2023
61b3f8a
Some changes to see the url for each
mukundsrinivasb Feb 4, 2023
d1fc894
Well just mucking around to see how urlList Works
mukundsrinivasb Feb 4, 2023
d5ed25a
Well just mucking around to see how urlList Works
mukundsrinivasb Feb 4, 2023
8e4385a
Some more mucking around...
mukundsrinivasb Feb 12, 2023
8260627
Merge branch 'jenkinsci:master' into master
mukundsrinivasb Feb 14, 2023
7cbe5c6
Removed the try catch block and verbosing the message directly instead
mukundsrinivasb Feb 20, 2023
f2ad67f
Merge branch 'jenkinsci:master' into master
mukundsrinivasb Feb 26, 2023
91ebc29
Some checking to see if this works
mukundsrinivasb Feb 26, 2023
c172e38
Some debugging from the errors thrown by mvn clean install
mukundsrinivasb Mar 5, 2023
5e30ace
Merge remote-tracking branch 'origin/master'
mukundsrinivasb Mar 5, 2023
d665e7c
Merge branch 'jenkinsci:master' into master
mukundsrinivasb Mar 5, 2023
51284c7
See if these changes build the project
mukundsrinivasb Mar 13, 2023
e3bb6cb
Well some more checkstyle solved
mukundsrinivasb Mar 13, 2023
a83247e
Committed the plugins.yaml file
mukundsrinivasb Mar 16, 2023
9d8e861
Verbose the plugins passed after the -p flag. This does Nothing and I…
mukundsrinivasb Mar 16, 2023
23d4b74
See if printing out works
mukundsrinivasb Mar 17, 2023
da5f363
Check if logVerbose Builds
mukundsrinivasb Mar 17, 2023
16bf0a9
Well does that work
mukundsrinivasb Mar 17, 2023
feeb118
What happens when a .hpi file is supplied
mukundsrinivasb Mar 17, 2023
d8bbd4d
Exception handling for the case that the extension was not a .hpi
mukundsrinivasb Mar 18, 2023
abdb1a8
Some more error logging
mukundsrinivasb Mar 18, 2023
d461373
Some changes to my plugins.yaml file
mukundsrinivasb Mar 18, 2023
049c46d
Recognoze a .hpi , Now have to figure out how to install a local .hpi
mukundsrinivasb Mar 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: mvn install -DskipTests=false


Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package io.jenkins.tools.pluginmanager.cli;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
Expand Down Expand Up @@ -73,7 +72,7 @@ class CliOptions {
handler = BooleanOptionHandler.class)
private boolean showAvailableUpdates;

@Option(name = "--output", usage = "Output format for available updates", aliases = "-o")
@Option(name = "--output", usage = "Output format for available updates", aliases = "-o")
private OutputFormat outputFormat = OutputFormat.STDOUT;

/**
Expand Down Expand Up @@ -155,6 +154,8 @@ class CliOptions {
handler = MultiCredentialsOptionHandler.class)
private List<Credentials> credentials;



/**
* Creates a configuration class with configurations specified from the CLI and/or environment variables.
*
Expand Down Expand Up @@ -272,6 +273,9 @@ private String getJenkinsWar() {
private List<Plugin> getPlugins() {
PluginListParser pluginParser = new PluginListParser(verbose);
List<Plugin> requestedPlugins = new ArrayList<>(pluginParser.parsePluginsFromCliOption(plugins));
for(Plugin plugin:requestedPlugins){
logVerbose(plugin.getName()+" Added By Mukund ");
}

File pluginFile = getPluginFile();
if (pluginFile != null) {
Expand Down Expand Up @@ -427,10 +431,10 @@ private URL getIncrementalsMirror() {
try {
jenkinsIncrementalsRepo = new URL(System.getenv("JENKINS_INCREMENTALS_REPO_MIRROR"));
} catch (MalformedURLException e) {
/* Spotbugs 4.7.0 warns when throwing a runtime exception,
* but the program cannot do anything with a malformed URL.
* Spotbugs warning is ignored.
*/
/* Spotbugs 4.7.0 warns when throwing a runtime exception,
* but the program cannot do anything with a malformed URL.
* Spotbugs warning is ignored.
*/
throw new RuntimeException(e);
}

Expand Down Expand Up @@ -509,6 +513,13 @@ public boolean isShowHelp() {
return showHelp;
}

/**
* Shows if the version was made by mukund
*/
public boolean isVersionMadeBy() {
return true;
}

/**
* Returns the boolean corresponding to if user wants dependencies of plugins with latest version specified to also
* be the latest version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static void main(String[] args) throws IOException {
return;
}


Config cfg = options.setup();
try (PluginManager pm = new PluginManager(cfg)) {
if (options.isShowAvailableUpdates()) {
Expand Down
6 changes: 6 additions & 0 deletions plugin-management-library/plugins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins:
- artifactId: git
source:
url: file:///usr/share/jenkins/ref/plugins/git-4.8.2_CMT.hpi
- artifactId: junit
- artifactId: javadoc
23 changes: 23 additions & 0 deletions plugin-management-library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,29 @@
<artifactId>snakeyaml</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public Plugin(String name, String version, String url, String groupId) {
}
this.version = new VersionNumber(version);
this.url = url;

this.dependencies = new ArrayList<>();
this.parent = this;
this.groupId = groupId;
Expand Down
Loading