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 bundling of eddsa #935

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
843 changes: 608 additions & 235 deletions pom.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class MavenReleaseWrapper extends BuildWrapper {
private boolean useReleaseBranch;

private List<String> mavenModules = new ArrayList<String>();
private final String POM_NAME = "pom.xml";
private static final String POM_NAME = "pom.xml";

@DataBoundConstructor
public MavenReleaseWrapper(String releaseBranchPrefix, String tagPrefix, String targetRemoteName, String alternativeGoals,
Expand Down
29 changes: 16 additions & 13 deletions src/main/java/org/jfrog/hudson/release/scm/perforce/P4Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import com.perforce.p4java.server.IOptionsServer;
import hudson.EnvVars;
import hudson.model.AbstractBuild;
import hudson.model.Item;
import hudson.model.TaskListener;
import hudson.scm.SCM;

import org.apache.commons.lang3.StringUtils;
import org.jenkinsci.plugins.p4.PerforceScm;
import org.jenkinsci.plugins.p4.client.ClientHelper;
import org.jenkinsci.plugins.p4.client.ConnectionFactory;
import org.jenkinsci.plugins.p4.client.ConnectionHelper;
import org.jenkinsci.plugins.p4.workspace.Workspace;
import org.jfrog.build.vcs.perforce.PerforceClient;

import java.nio.charset.StandardCharsets;
Expand All @@ -36,12 +40,12 @@ public void prepare() {
PerforceScm perforceScm = getJenkinsScm();
String credentials = perforceScm.getCredential();

ConnectionHelper connection = new ConnectionHelper(credentials, buildListener);
IOptionsServer server = ConnectionFactory.getConnection();
try {
String clientString = getClientString();
if (connection.isClient(clientString)) {
ClientHelper perforceClient = new ClientHelper(credentials, buildListener, clientString, StandardCharsets.UTF_8.toString());
ConnectionHelper connection = new ConnectionHelper(build, credentials, buildListener);
IOptionsServer server = ConnectionFactory.getConnection();
Workspace clientString = getClientWorkspace();
if (connection.isClient(clientString.getName())) {
ClientHelper perforceClient = new ClientHelper((Item)this.build.getProject(), credentials, buildListener, clientString);
IClient client = perforceClient.getClient();
try {
this.perforce = new PerforceClient(server, client);
Expand All @@ -64,14 +68,13 @@ public PerforceClient establishConnection() throws Exception {
return this.perforce;
}

private String getClientString() {
String client = StringUtils.EMPTY;
try {
EnvVars envVars = build.getEnvironment(buildListener);
client = envVars.get("P4_CLIENT");
} catch (Exception e) {
logger.log(Level.FINE, "P4: Unable to read P4_CLIENT");
private Workspace getClientWorkspace() {
SCM scm = this.build.getProject().getScm();
if (scm instanceof PerforceScm) {
PerforceScm p4scm = (PerforceScm)scm;
return p4scm.getWorkspace();
}
return client;
logger.log(Level.FINE, "Unable to determine P4 workspace");
return null;
}
}
1 change: 1 addition & 0 deletions src/main/resources/index.jelly
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<!--
This view is used to render the plugin list page.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:f="/lib/form"
xmlns:st="jelly:stapler"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:r="/lib/jfrog" xmlns:st="jelly:stapler">
<j:set var="uniqueId" value="${h.generateId()}"/>
<f:dropdownList name="deployerDetails" title="${%Artifactory server}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:t="/lib/hudson">
<t:summary icon="${it.iconFileName}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:t="/lib/hudson">
<t:summary icon="${it.iconFileName}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"
xmlns:r="/lib/jfrog" xmlns:st="jelly:stapler">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<!--suppress XmlUnusedNamespaceDeclaration -->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:r="/lib/jfrog">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<!--suppress XmlUnusedNamespaceDeclaration -->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:r="/lib/jfrog" xmlns:c="/lib/credentials">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:f="/lib/form"
xmlns:r="/lib/jfrog"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<!--
~ Copyright (C) 2010 JFrog Ltd.
~
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:r="/lib/jfrog" xmlns:st="jelly:stapler">
<j:set var="uniqueId" value="${h.generateId()}"/>
<f:dropdownList name="resolverDetails" title="${%Artifactory server}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<!--
~ Copyright (C) 2010 JFrog Ltd.
~
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
<l:layout title="Gradle Artifacts">
<st:include it="${it.build}" page="sidepanel.jelly"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:t="/lib/hudson">
<j:if test="${!empty it.deployedArtifacts}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
<l:layout title="Maven Artifacts">
<st:include it="${it.build}" page="sidepanel.jelly"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:t="/lib/hudson">
<j:if test="${!empty it.deployedArtifacts}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">
<j:choose>
<j:when test="${it.hasPromotionPermission()}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:layout norefresh="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<!-- displays a form to choose the next release and development version and re-schedules a build -->
<!--suppress XmlUnusedNamespaceDeclaration -->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- displays a form to choose the next release and development version and re-schedules a build -->
<!--suppress XmlUnusedNamespaceDeclaration -->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:layout title="">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!--suppress XmlUnusedNamespaceDeclaration -->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry field="tagPrefix" title="VCS tags name/base URL"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:dropdownList name="details" title="${%Artifactory server}">
<j:forEach var="s" items="${instance.jfrogInstances ?: descriptor.jfrogInstances}" varStatus="loop">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:dropdownList name="details" title="${%Artifactory server}">
<j:forEach var="s" items="${instance.jfrogInstances ?: descriptor.jfrogInstances}" varStatus="loop">
Expand Down
Loading