From aa291dd7c80973f5978167684ee9af9a29e679e7 Mon Sep 17 00:00:00 2001 From: wang-jing-127 <984259161@qq.com> Date: Wed, 26 Apr 2023 16:07:43 +0800 Subject: [PATCH] =?UTF-8?q?Jenkins=E6=8F=92=E4=BB=B6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=90=88=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../porting-advisor-plugin/pom.xml | 84 ++++++++ .../plugins/devkit/PortingAdvisorBuilder.java | 187 ++++++++++++++++++ .../plugins/devkit/PortingAdvisorInstall.java | 85 ++++++++ .../slavecopy/CopyToSlaveBuildWrapper.java | 134 +++++++++++++ .../plugins/devkit/slavecopy/MyFilePath.java | 162 +++++++++++++++ .../devkit/slavecopy/MyGlobDirScanner.java | 45 +++++ .../plugins/devkit/utils/BashCmdExec.java | 46 +++++ .../plugins/devkit/utils/ParameterFmt.java | 155 +++++++++++++++ .../src/main/resources/index.jelly | 4 + .../plugins/devkit/Messages.properties | 5 + .../plugins/devkit/Messages_de.properties | 5 + .../plugins/devkit/Messages_fr.properties | 5 + .../plugins/devkit/Messages_it.properties | 5 + .../plugins/devkit/Messages_sv.properties | 5 + .../plugins/devkit/Messages_tr.properties | 3 + .../devkit/PortingAdvisorBuilder/config.jelly | 37 ++++ .../PortingAdvisorBuilder/config.properties | 3 + .../config_de.properties | 3 + .../config_fr.properties | 3 + .../config_it.properties | 3 + .../config_sv.properties | 3 + .../config_tr.properties | 3 + .../PortingAdvisorBuilder/help-name.html | 3 + .../PortingAdvisorBuilder/help-name_de.html | 3 + .../PortingAdvisorBuilder/help-name_fr.html | 3 + .../PortingAdvisorBuilder/help-name_it.html | 3 + .../PortingAdvisorBuilder/help-name_sv.html | 3 + .../PortingAdvisorBuilder/help-name_tr.html | 3 + .../PortingAdvisorBuilder/help-useFrench.html | 3 + .../help-useFrench_de.html | 3 + .../help-useFrench_fr.html | 3 + .../help-useFrench_it.html | 3 + .../help-useFrench_sv.html | 3 + .../help-useFrench_tr.html | 3 + .../CopyToSlavebuildWrapper.properties | 1 + .../CopyToSlavebuildWrapper/config.jelly | 66 +++++++ .../CopyToSlavebuildWrapper/config.properties | 32 +++ .../config_fr.properties | 30 +++ .../CopyToSlavebuildWrapper/global.jelly | 42 ++++ .../CopyToSlavebuildWrapper/global.properties | 26 +++ .../help-excludes.html | 30 +++ .../CopyToSlavebuildWrapper/help-flatten.html | 29 +++ .../help-includeAntExcludes.html | 28 +++ .../help-includes.html | 31 +++ .../help-relativeTo.html | 28 +++ .../help-relativeToHomeEnabled.html | 30 +++ .../help-somewhereElseEnabled.html | 32 +++ .../CopyToSlavebuildWrapper/help.html | 35 ++++ 48 files changed, 1461 insertions(+) create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/pom.xml create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorBuilder.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorInstall.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/CopyToSlaveBuildWrapper.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyFilePath.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyGlobDirScanner.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/BashCmdExec.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/ParameterFmt.java create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/index.jelly create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_de.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_fr.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_it.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_sv.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_tr.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.jelly create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_de.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_fr.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_it.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_sv.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_tr.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_de.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_fr.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_it.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_sv.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_tr.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_de.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_fr.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_it.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_sv.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_tr.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.jelly create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config_fr.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.jelly create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.properties create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-excludes.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-flatten.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includeAntExcludes.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includes.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeTo.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeToHomeEnabled.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-somewhereElseEnabled.html create mode 100644 devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help.html diff --git a/devops/jenkins-plugin/porting-advisor-plugin/pom.xml b/devops/jenkins-plugin/porting-advisor-plugin/pom.xml new file mode 100644 index 0000000..3a4dc11 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + + org.jenkins-ci.plugins + plugin + 4.41 + + + porting-advisor-plugin + 1.0-0-alpha + hpi + + 2.332.4 + + porting-advisor Plugin + porting-advisor-plugin + https://wiki.jenkins-ci.org/display/JENKINS/TODO+Plugin + + + + MIT License + http://opensource.org/licenses/MIT + + + + + org.jenkins-ci.plugins + structs + 1.7 + + + org.jenkins-ci + symbol-annotation + + + + + org.jenkins-ci.plugins.workflow + workflow-step-api + 2.12 + test + + + org.jenkins-ci.plugins.workflow + workflow-cps + 2.39 + test + + + org.jenkins-ci.plugins.workflow + workflow-job + 2.11.2 + test + + + org.jenkins-ci.plugins.workflow + workflow-basic-steps + 2.6 + test + + + org.jenkins-ci.plugins.workflow + workflow-durable-task-step + 2.13 + test + + + org.jenkins-ci.plugins.workflow + workflow-api + 2.20 + test + + + org.jenkins-ci.plugins.workflow + workflow-support + 2.14 + test + + + + compile + + diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorBuilder.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorBuilder.java new file mode 100644 index 0000000..05a0fd8 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorBuilder.java @@ -0,0 +1,187 @@ +package io.jenkins.plugins.devkit; + +import edu.umd.cs.findbugs.annotations.NonNull; +import hudson.*; +import hudson.model.*; +import hudson.remoting.VirtualChannel; +import hudson.tasks.BuildStepDescriptor; +import hudson.tasks.Builder; +import hudson.util.FormValidation; + + +import io.jenkins.plugins.devkit.utils.BashCmdExec; +import jenkins.tasks.SimpleBuildStep; + +import org.jenkinsci.Symbol; +import org.kohsuke.stapler.DataBoundConstructor; +import org.kohsuke.stapler.QueryParameter; + +import java.io.File; +import java.io.IOException; +import java.io.Serializable; + +import javax.servlet.ServletException; + +import io.jenkins.plugins.devkit.utils.ParameterFmt; +import io.jenkins.plugins.devkit.slavecopy.CopyToSlaveBuildWrapper; + +public class PortingAdvisorBuilder extends Builder implements SimpleBuildStep, Serializable { + private static final long serialVersionUID = 1L; + private final String prefix; + private final String command; + private final String hardwareArchitecture; + private final String scantype; + private final String scanpath; + private final String compiler; + private final String cmd; + private final String targetos; + private final String extendedparameter; + private String newCommand; + private ParameterFmt parameterFmt = new ParameterFmt(); + + @DataBoundConstructor + public PortingAdvisorBuilder(String command, String hardwareArchitecture, String scantype, String scanpath, + String compiler, String cmd, String targetos, String extendedparameter, String prefix) { + this.prefix = prefix.trim(); + this.scantype = scantype.trim(); + this.scanpath = scanpath.trim(); + this.compiler = compiler.trim(); + this.cmd = cmd.trim(); + this.targetos = targetos.trim(); + this.extendedparameter = extendedparameter.trim(); + this.hardwareArchitecture = hardwareArchitecture; + this.parameterFmt.ParameterFmt(command, this.hardwareArchitecture, this.scantype, this.scanpath, + this.compiler, this.cmd, this.targetos, this.extendedparameter, this.prefix); + this.command = command; + } + + public String initCmd(TaskListener listener) { + return this.parameterFmt.toStringCmd(listener); + } + public static long getSerialVersionUID() { + return serialVersionUID; + } + public String getHardwareArchitecture() { + return hardwareArchitecture; + } + + public String getScantype() { + return scantype; + } + + public String getScanpath() { + return scanpath; + } + + public String getCompiler() { + return compiler; + } + + public String getCmd() { + return cmd; + } + + public String getTargetos() { + return targetos; + } + + public String getExtendedparameter() { + return extendedparameter; + } + public String getPrefix() { + return prefix; + } + + @Override + public void perform(@NonNull Run run, @NonNull FilePath workspace, @NonNull EnvVars env, Launcher launcher, + @NonNull TaskListener listener) throws InterruptedException, IOException { + listener.getLogger().println("workspace value= " + workspace); + + this.newCommand = this.parameterFmt.toStringCmd(listener); + VirtualChannel channel = launcher.getChannel(); + assert channel != null; + try { + listener.getLogger().println("start to copyToSlave"); + new CopyToSlaveBuildWrapper().copyToSlave(run, launcher, listener, new FilePath(new File(this.prefix))); + channel.call( + new CommandMasterToSlaveCallable(this.newCommand, listener, workspace.getParent(), this.prefix)); + } catch (IOException e ) { + listener.getLogger().println("[error]" + e); + Util.displayIOException(e, listener); + run.setResult(Result.FAILURE); + } + } + + private class CommandMasterToSlaveCallable extends jenkins.security.MasterToSlaveCallable + implements Serializable { + private static final long serialVersionUID = 1L; + private Job project; + private String prefix; + private String command; + private TaskListener listener; + private FilePath workspace; + + CommandMasterToSlaveCallable(String command, TaskListener listener, + FilePath workspace, String prefix) { + this.command =command.trim(); + this.listener = listener; + this.prefix = prefix.trim(); + this.workspace = workspace; + } + + + + @Override + public Void call() throws IOException { + try { + // 在执行命令前,判断文件是否存在,不存在则进行copy处理 + listener.getLogger().println("[install] Installing package ..."); + PortingAdvisorInstall PAInstall = new PortingAdvisorInstall(); + FilePath installTarget; + if (this.prefix.length() == 0) { + listener.getLogger().println("[INFO] Prefix is empty. will be installed in the /opt"); + } + installTarget = this.prefix.length() > 0 ? new FilePath(new File(this.prefix)) : new FilePath(new File("/opt")); + listener.getLogger().println("[workspace] is " + workspace); + listener.getLogger().println("installTarget is: " + installTarget); + PAInstall.install(listener, parameterFmt.getHardwareArchitectures(), workspace, installTarget); + BashCmdExec.callProcessBuilder(this.command, listener); + }catch (Exception e) { + throw new IOException(e.getMessage()); + } + return null; + } + } + + @Extension + @Symbol("porting_advisor") + public static class DescriptorImpl extends BuildStepDescriptor { + + public FormValidation doCheckName(@QueryParameter String value, @QueryParameter boolean useFrench) + throws IOException, ServletException { + if (value.length() == 0) { + return FormValidation.error(Messages.PortingAdvisorBuilder_DescriptorImpl_errors_missingName()); + } + if (value.length() < 4) { + return FormValidation.warning(Messages.PortingAdvisorBuilder_DescriptorImpl_warnings_tooShort()); + } + if (!useFrench && value.matches(".*[éáàç].*")) { + return FormValidation.warning(Messages.PortingAdvisorBuilder_DescriptorImpl_warnings_reallyFrench()); + } + return FormValidation.ok(); + } + + @Override + public boolean isApplicable(Class aClass) { + return true; + } + + @Override + public String getDisplayName() { + return Messages.PortingAdvisorBuilder_DescriptorImpl_DisplayName(); + } + + } + + +} diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorInstall.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorInstall.java new file mode 100644 index 0000000..6366198 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/PortingAdvisorInstall.java @@ -0,0 +1,85 @@ +package io.jenkins.plugins.devkit; + +import hudson.FilePath; +import hudson.model.TaskListener; +import io.jenkins.plugins.devkit.utils.BashCmdExec; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class PortingAdvisorInstall{ + private static String installPath = "/opt/portadv/tools/cmd/bin/porting-advisor"; + private static final String x86Package = "Porting-advisor_23.0.RC1_linux-x86-64.tar.gz"; + private static final String armPackage = "Porting-advisor_23.0.RC1_linux-Kunpeng.tar.gz"; + private static final String pluginPackage = "porting-advisor-plugin.jar"; + + private static final String x86Url = ""; + private static final String armUrl = ""; + + private void downloadPackage(String url, String outPath) { + } + + private String getX86PackageDir() { + return x86Package.split(".tar")[0]; + } + + private String getArmPackageDir() { + return armPackage.split(".tar")[0]; + } + + private void getJenkinsPluginPackage(TaskListener listener) { + List cmds = new ArrayList<>(); + try { + String jenkinsClassPath = this.getClass().getClassLoader().getResource("").getPath(); + listener.getLogger().println("jenkinsClassPath is: " + jenkinsClassPath); + + String packagePath = "../../../plugins/porting-advisor-plugin/WEB-INF/lib/" + pluginPackage; + cmds.add("mkdir -p /opt/tmp/install ; cd " + jenkinsClassPath + " ; cp -r " + packagePath + "/opt/tmp/install"); + cmds.add("cd /opt/tmp/install ; unzip " + pluginPackage); + + for (String cmd : cmds) { + BashCmdExec.callProcessBuilder(cmd, listener); + listener.getLogger().println("cmd: " + cmd); + } + } catch (NullPointerException e) { + e.printStackTrace(); + listener.getLogger().println("[ERROR]: " + e); + } + } + + private String getInstallCommand(String hardwareArchitecture, FilePath workspace, FilePath prefix) { + String packageName = hardwareArchitecture.equals("x86") ? x86Package : armPackage; + String packageDir = hardwareArchitecture.equals("x86") ? this.getX86PackageDir() : this.getArmPackageDir(); + + return "mkdir -p " + prefix + File.separator + "/install; cd " + workspace + ";" + + " tar --no-same-owner -zxvf " + packageName + " -C " + prefix + File.separator + "install; " + + "cd " + prefix + File.separator + "install" + File.separator + packageDir + "; " + + "echo Y | bash runtime_env_check.sh;" + + "echo " + prefix + " | ./install cmd"; + } + + private boolean isInstalled() { + File file = new File(installPath); + return file.exists(); + } + + private boolean exists(String path) { + return new File(path).exists(); + } + + public void install(TaskListener listener,String hardwareArchitecture, FilePath workspace, FilePath prefix) + throws IOException, InterruptedException { + String packageName = hardwareArchitecture.equals("x86") ? x86Package : armPackage; + + File file = new File(prefix + File.separator + "portadv/tools/cmd/bin/porting-advisor"); + if (file.exists()) { + listener.getLogger().println("[INFO] The " + packageName + " has installed"); + } else { + listener.getLogger().println("[start install]PortingAdvisor start install"); + BashCmdExec.callProcessBuilder(this.getInstallCommand(hardwareArchitecture, workspace, prefix), listener); + BashCmdExec.callProcessBuilder("rm -rf " + prefix + "/install", listener); + } + } +} \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/CopyToSlaveBuildWrapper.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/CopyToSlaveBuildWrapper.java new file mode 100644 index 0000000..09e5e2b --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/CopyToSlaveBuildWrapper.java @@ -0,0 +1,134 @@ +package io.jenkins.plugins.devkit.slavecopy; + +import hudson.EnvVars; +import hudson.Extension; +import hudson.FilePath; +import hudson.Launcher; +import hudson.model.*; +import hudson.remoting.VirtualChannel; +import hudson.tasks.BuildWrapper; +import hudson.tasks.BuildWrapperDescriptor; +import jenkins.model.Jenkins; + +import org.jenkinsci.Symbol; +import org.jenkinsci.remoting.RoleChecker; +import org.jvnet.localizer.Localizable; +import org.jvnet.localizer.ResourceBundleHolder; +import org.kohsuke.stapler.DataBoundConstructor; + +import java.io.File; +import java.io.IOException; +import java.util.StringTokenizer; + +/** + * The CopyToSlaveBuildSrapper + * + * @author d00345476 + * @version [dependencyAnalysis 1.0, 2023/3/13] + * @since 2023/3/13 + */ +public class CopyToSlaveBuildWrapper extends BuildWrapper { + private FilePath prefix; + private String includes; + + private boolean flatten; + + private String packageName = "Porting-advisor_23.0.RC1_linux-Kunpeng.tar.gz"; + @DataBoundConstructor + public CopyToSlaveBuildWrapper() { + this.includes = packageName; + this.flatten = flatten; + this.prefix = prefix; + } + + @Override + public Environment setUp(AbstractBuild build, final Launcher launcher, BuildListener listener) + throws IOException, InterruptedException { + String files = "Porting-advisor_23.0.RC1_linux-Kunpeng.tar.gz,Porting-advisor_23.0.RC1_linux-x86-64.tar.gz"; + StringTokenizer tokens = new StringTokenizer(files, ","); + EnvVars env = build.getEnvironment(listener); + env.overrideAll(build.getBuildVariables()); + FilePath projectWorkspaceOnSlave = build.getWorkspace().getParent(); + listener.getLogger().println("projectWorkspaceOnSlave is " + projectWorkspaceOnSlave); + if (Computer.currentComputer() instanceof Jenkins.MasterComputer) { + //主节点,从prefix 拷贝至workspace进行安装 + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken().trim(); +// listener.getLogger().println("token is " + token); + String packagePath = this.prefix.toString() + File.separator + token; +// listener.getLogger().println("packagePath is " + packagePath); + if (new File(packagePath).exists()) { + listener.getLogger().println("[copy-to-slave] Trying to copy files: " + token + " from " + prefix + + " on the master to the workspace :" + projectWorkspaceOnSlave ); + MyFilePath.copyTo(this.prefix, token, flatten, projectWorkspaceOnSlave); + } else { + listener.getLogger().println("[error]" + token + "] Not exist on " + prefix); +// build.setResult(Result.FAILURE); + } + } + return null; + } else { + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken().trim(); + // 判断文件是否存在 + String path= projectWorkspaceOnSlave.getRemote() + File.separator + token; + boolean isExistOnSlave = checkSlaveFile(prefix, path); + if (!isExistOnSlave) { + // 不存在,则从master上拷贝 + listener.getLogger().println("[COPY] Copy " + token + " to " + projectWorkspaceOnSlave); + MyFilePath.copyTo(prefix, token, flatten, projectWorkspaceOnSlave); + } else { + listener.getLogger().println("[" + token + "] exist . [" + path + "]"); + } + } + } + + return new Environment() { + @Override + public boolean tearDown(AbstractBuild build, BuildListener listener) + throws IOException, InterruptedException { + return true; + } + }; + } + + private boolean checkSlaveFile(FilePath source, String target) throws IOException, InterruptedException { + return new FilePath.FileCallable() { + @Override + public void checkRoles(RoleChecker checker) throws SecurityException { + } + + @Override + public Boolean invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { + return new File(target).exists(); + } + }.invoke(new File(source.getRemote()), FilePath.localChannel); + } + + public Environment copyToSlave(Run build, Launcher launcher, TaskListener listener, FilePath prefix) + throws IOException, InterruptedException { + this.prefix = prefix; + AbstractBuild currentBuild = (AbstractBuild) build; +// listener.getLogger().println("start to setup"); + return setUp(currentBuild, launcher, (BuildListener) listener); + } + + @Override + public DescriptorImpl getDescriptor() { + return (DescriptorImpl) super.getDescriptor(); + } + + @Symbol("copy2slave") + @Extension + public static class DescriptorImpl extends BuildWrapperDescriptor { + @Override + public java.lang.String getDisplayName() { + return new Localizable(ResourceBundleHolder.get(CopyToSlaveBuildWrapper.class), "DisplayName").toString(); + } + @Override + public boolean isApplicable(AbstractProject item) { + return true; + } + } + +} diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyFilePath.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyFilePath.java new file mode 100644 index 0000000..c3b5593 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyFilePath.java @@ -0,0 +1,162 @@ +package io.jenkins.plugins.devkit.slavecopy; + +import hudson.FilePath; +import hudson.Util; +import hudson.remoting.Future; +import hudson.remoting.Pipe; +import hudson.remoting.VirtualChannel; +import hudson.util.IOUtils; +import hudson.util.io.Archiver; +import hudson.util.io.ArchiverFactory; + +import org.apache.commons.lang.StringUtils; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.Copy; +import org.apache.tools.ant.types.FileSet; +import org.apache.tools.tar.TarEntry; +import org.apache.tools.tar.TarInputStream; +import org.jenkinsci.remoting.RoleChecker; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Serializable; +import java.util.concurrent.ExecutionException; + +/** + * The MyFilePath + * + * + * + * + */ +public class MyFilePath implements Serializable { + private static final long serialVersionUID = 1L; + + public static int copyTo(final FilePath source, final String includes, final boolean flatten, final FilePath target) + throws IOException, InterruptedException { + if (source.getChannel() == target.getChannel()) { + // --- local -->local copy --- + return new FilePath.FileCallable() { + @Override + public void checkRoles(RoleChecker checker) throws SecurityException { + } + + @Override + public Integer invoke(File sourceBaseDir, VirtualChannel channel) + throws IOException, InterruptedException { + if (!sourceBaseDir.exists()) { + return 0; + } + try { + class CopyImpl extends Copy { + private int copySize; + + CopyImpl() { + setProject(new Project()); + } + + @Override + protected void doFileOperations() { + copySize = super.fileCopyMap.size(); + super.doFileOperations(); + } + + public int getNumCopied() { + return copySize; + } + } + FileSet fs = Util.createFileSet(sourceBaseDir, includes); + + CopyImpl copyTask = new CopyImpl(); + copyTask.setTodir(new File(target.getRemote())); + copyTask.addFileset(fs); + copyTask.setOverwrite(false); + copyTask.setIncludeEmptyDirs(false); + copyTask.setFlatten(flatten); + + copyTask.execute(); + return copyTask.getNumCopied(); + } catch (BuildException e) { + throw new IOException("Failed to copy from " + sourceBaseDir + " to " + target, e); + } + } + } .invoke(new File(source.getRemote()), FilePath.localChannel); + }else { + // local --> remote copy + final Pipe pipe = Pipe.createLocalToRemote(); + + Future future = target.actAsync(new FilePath.FileCallable() { + private static final long serialVersionUID = 1L; + + @Override + public Void invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { + try { + readFromTar(f, flatten, FilePath.TarCompression.GZIP.extract(pipe.getIn())); + return null; + } finally { + pipe.getIn().close(); + } + } + + @Override + public void checkRoles(RoleChecker checker) throws SecurityException { + } + + }); + int r = writeToTar(new File(source.getRemote()), includes, + FilePath.TarCompression.GZIP.compress(pipe.getOut())); + try { + future.get(); + } catch (ExecutionException e) { + throw new IOException(e); + } + return r; + } + } + + private static void readFromTar(File baseDir, boolean flatten, InputStream in) throws IOException { + TarInputStream t = new TarInputStream(in); + try { + TarEntry tarEntry; + while ((tarEntry = t.getNextEntry()) != null) { + File f = null; + if (!flatten || (!tarEntry.getName().contains("/") && !tarEntry.getName().contains("\\"))) { + f = new File(baseDir, tarEntry.getName()); + } else { + String fileName = StringUtils.substringAfterLast(tarEntry.getName(), "/"); + if (StringUtils.isBlank(fileName)) { + fileName = StringUtils.substringAfterLast(tarEntry.getName(), "\\"); + } + f = new File(baseDir, fileName); + } + if (!flatten && tarEntry.isDirectory()) { + f.mkdirs(); + } else { + if (!flatten && f.getParentFile() != null) { + f.getParentFile().mkdirs(); + } + + IOUtils.copy(t, f); + //未设置读写权限 + } + } + } catch (IOException e) { + throw new IOException("Failed to extract to " + baseDir.getAbsolutePath(), e); + } finally { + t.close(); + } + } + + private static Integer writeToTar(File baseDir, String includes, OutputStream out) throws IOException { + Archiver tw = ArchiverFactory.TAR.create(out); + try { + new MyGlobDirScanner(includes).scan(baseDir, tw); + } finally { + tw.close(); + } + return tw.countEntries(); + } +} diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyGlobDirScanner.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyGlobDirScanner.java new file mode 100644 index 0000000..6803dbb --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/slavecopy/MyGlobDirScanner.java @@ -0,0 +1,45 @@ +package io.jenkins.plugins.devkit.slavecopy; + +import hudson.Util; +import hudson.util.DirScanner; +import hudson.util.FileVisitor; + +import org.apache.tools.ant.DirectoryScanner; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.types.FileSet; + +import java.io.File; +import java.io.IOException; + + +/** + * Modified copy of Hudson's {@link DirScanner.Glob} to modify the {@code scan()} + * method so that it takes into account Ant's default excludes (cf. HUDSON-7999). + */ +public class MyGlobDirScanner extends DirScanner { + + private final String includes; + + MyGlobDirScanner(final String includes) { + this.includes = includes; + } + + public void scan(File dir, FileVisitor visitor) throws IOException { + if(Util.fixEmpty(includes)==null) { + // optimization + new Full().scan(dir, visitor); + return; + } + + FileSet fs = Util.createFileSet(dir,includes); + + if(dir.exists()) { + DirectoryScanner ds = fs.getDirectoryScanner(new Project()); + for(String f : ds.getIncludedFiles()) { + File file = new File(dir, f); + visitor.visit(file,f); + } + } + } + +} \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/BashCmdExec.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/BashCmdExec.java new file mode 100644 index 0000000..ef62f2d --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/BashCmdExec.java @@ -0,0 +1,46 @@ +package io.jenkins.plugins.devkit.utils; + +import hudson.model.TaskListener; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + +public class BashCmdExec { + public static void callProcessBuilder(String userCommand, TaskListener listener) { + List command = new ArrayList<>(); + command.add("sh"); + command.add("-c"); + command.add(userCommand); + listener.getLogger().println("command is: " + command); + ProcessBuilder processBuilder = new ProcessBuilder(); + processBuilder.command(command); + // 将标准输入流和错误输入流合并,通过标准输入流读取信息 + processBuilder.redirectErrorStream(true); + try { + //启动进程 + Process start = processBuilder.start(); + //获取输入流 + InputStream inputStream = start.getInputStream(); + //转成字符输入流 + InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8"); + int len = -1; + char[] c = new char[1024]; + StringBuffer outputString = new StringBuffer(); + //读取进程输入流中的内容 + while ((len = inputStreamReader.read(c)) != -1) { + String s = new String(c, 0, len); + outputString.append(s); + listener.getLogger().println(s); + } + inputStreamReader.close(); + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + listener.getLogger().println("[ERROR]: " + e); + } + } + +} diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/ParameterFmt.java b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/ParameterFmt.java new file mode 100644 index 0000000..6a96ec9 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/java/io/jenkins/plugins/devkit/utils/ParameterFmt.java @@ -0,0 +1,155 @@ +package io.jenkins.plugins.devkit.utils; + +import hudson.FilePath; +import hudson.model.TaskListener; +import org.apache.tools.ant.util.StringUtils; + +import java.io.File; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class ParameterFmt implements Serializable { + + private String commands; + private String hardwareArchitectures; + private String scantype; + private String scanpath; + private String compiler; + private String cmd; + private String targetos; + private String extendedparameter; + private String prefix; + + public void ParameterFmt(String command, String hardwareArchitecture, String scantype, String scanpath, + String compiler, String cmd, String targetos, String extendedparameter, String prefix) { + this.setCommands(command); + this.setHardwareArchitectures(hardwareArchitecture); + this.setScantype(scantype); + this.setScanpath(scanpath); + this.setCompiler(compiler); + this.setCmd(cmd); + this.setTargetos(targetos); + this.setExtendedparameter(extendedparameter); + this.setPrefix(prefix); + } + + public String getPrefix() { + return prefix; + } + + private void setPrefix(String prefix) { + this.prefix = prefix; + } + public String getCommands() { + return commands; + } + private void setCommands(String commands) { + this.commands = commands; + } + + public String getHardwareArchitectures() { + return hardwareArchitectures; + } + + private void setHardwareArchitectures(String hardwareArchitectures) { + this.hardwareArchitectures = hardwareArchitectures; + } + + public String getScantype() { + return scantype; + } + + private void setScantype(String scantype) { + this.scantype = scantype; + } + + public String getScanpath() { + return scanpath; + } + + private void setScanpath(String scanpath) { + this.scanpath = scanpath; + } + + public String getCompiler() { + return compiler; + } + + private void setCompiler(String compiler) { + this.compiler = compiler; + } + public String getCmd() { + return cmd; + } + private void setCmd(String cmd) { + this.cmd = cmd; + } + public String getTargetos() { + return targetos; + } + + private void setTargetos(String targetos) { + this.targetos = targetos; + } + + public String getExtendedparameter() { + return extendedparameter; + } + + private void setExtendedparameter(String extendedparameter) { + this.extendedparameter = extendedparameter; + } + + + public String toStringCmd(TaskListener listener) { + List params = new ArrayList(); +// listener.getLogger().println("[INFO]generate command"); + prefix = prefix.length() > 0 ? prefix : "/opt"; + String toolHome = prefix.trim() + File.separator + "portadv/tools/cmd/bin/porting-advisor"; +// listener.getLogger().println("[INFO]toolHome: "+ toolHome); + params.add(toolHome); + params.add(this.paramStrFmt(scantype, null)); +// listener.getLogger().println("[INFO]scantype: "+ scantype); + params.add(scanpath); +// listener.getLogger().println("[INFO]scanpath: "+ scanpath); + if (compiler.length() > 0) { + params.add(this.paramStrFmt("compiler", compiler)); + } +// listener.getLogger().println("[INFO]compiler: "+ compiler); + if (cmd.length() > 0) { + params.add(this.paramStrFmt("cmd", cmd)); + } +// listener.getLogger().println("[INFO]cmd: "+ cmd); + params.add(this.paramStrFmt("targetos", targetos)); +// listener.getLogger().println("[INFO]targetos: "+ targetos); + if (extendedparameter.length() > 0) { + params.add(extendedparameter); + } +// listener.getLogger().println("[INFO]extendedparameter: "+ extendedparameter); + return StringUtils.join(params, " "); + } + + public String paramStrFmt(String paramKey, String paramValue) { + String fmtStr = null; + switch (paramKey) { + case "sourcecode": + fmtStr = "-S"; + break; + case "binarypackage": + fmtStr = "-P "; + break; + case "targetos": + fmtStr = "--tos " + paramValue; + break; + case "compiler": + fmtStr = "-C " + paramValue; + break; + case "cmd": + fmtStr = "--cmd " + paramValue; + break; + } + return fmtStr; + } + +} diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/index.jelly b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/index.jelly new file mode 100644 index 0000000..e0caba2 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/index.jelly @@ -0,0 +1,4 @@ + +
+ porting-advisor-plugin demo +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages.properties new file mode 100644 index 0000000..4a245af --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages.properties @@ -0,0 +1,5 @@ +PortingAdvisorBuilder.DescriptorImpl.errors.missingName=Please set a name +PortingAdvisorBuilder.DescriptorImpl.warnings.tooShort=Isn't the name too short? +PortingAdvisorBuilder.DescriptorImpl.warnings.reallyFrench=Are you actually French? + +PortingAdvisorBuilder.DescriptorImpl.DisplayName=PortingAdvisor \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_de.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_de.properties new file mode 100644 index 0000000..35423d4 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_de.properties @@ -0,0 +1,5 @@ +PortingAdvisorBuilder.DescriptorImpl.errors.missingName=Bitte geben Sie einen Namen an +PortingAdvisorBuilder.DescriptorImpl.warnings.tooShort=Der Name ist zu kurz. +PortingAdvisorBuilder.DescriptorImpl.warnings.reallyFrench=Sind Sie wirklich franz\u00F6sisch? + +PortingAdvisorBuilder.DescriptorImpl.DisplayName=Porting Advisor \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_fr.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_fr.properties new file mode 100644 index 0000000..a86657e --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_fr.properties @@ -0,0 +1,5 @@ +PortingAdvisorBuilder.DescriptorImpl.errors.missingName=Veuillez saisir un nom +PortingAdvisorBuilder.DescriptorImpl.warnings.tooShort=Le nom n'est-il pas trop court ? +PortingAdvisorBuilder.DescriptorImpl.warnings.reallyFrench=\u00CAtes vous vraiment fran\u00E7ais ? + +PortingAdvisorBuilder.DescriptorImpl.DisplayName=PortingAdvisor diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_it.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_it.properties new file mode 100644 index 0000000..5a0489e --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_it.properties @@ -0,0 +1,5 @@ +PortingAdvisorBuilder.DescriptorImpl.errors.missingName=Nome \u00E8 richiesto +PortingAdvisorBuilder.DescriptorImpl.warnings.tooShort=Nome dev'essere al meno 4 charatteri +PortingAdvisorBuilder.DescriptorImpl.warnings.reallyFrench=Vuole mostrare il messagio in francese? + +PortingAdvisorBuilder.DescriptorImpl.DisplayName=PortingAdvisor diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_sv.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_sv.properties new file mode 100644 index 0000000..a0efe33 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_sv.properties @@ -0,0 +1,5 @@ +PortingAdvisorBuilder.DescriptorImpl.errors.missingName=Ange ett namn +PortingAdvisorBuilder.DescriptorImpl.warnings.tooShort=\u00C4r inte namnet lite f\u00F6r kort? +PortingAdvisorBuilder.DescriptorImpl.warnings.reallyFrench=\u00C4r du egentligen Fransk? + +PortingAdvisorBuilder.DescriptorImpl.DisplayName=PortingAdvisor diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_tr.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_tr.properties new file mode 100644 index 0000000..d60ccb3 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/Messages_tr.properties @@ -0,0 +1,3 @@ +PortingAdvisorBuilder.DescriptorImpl.errors.missingName=Please set a name +PortingAdvisorBuilder.DescriptorImpl.warnings.tooShort=Isn't the name too short? + diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.jelly b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.jelly new file mode 100644 index 0000000..12e0332 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.jelly @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.properties new file mode 100644 index 0000000..7ffda73 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config.properties @@ -0,0 +1,3 @@ +Name=Name +French=French +FrenchDescr=Check if we should say hello in French \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_de.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_de.properties new file mode 100644 index 0000000..02dd5b3 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_de.properties @@ -0,0 +1,3 @@ +Name=Name +French=Franz\u00F6sisch +FrenchDescr=Markieren f\u00FCr Begr\u00FC\u00DFung auf franz\u00F6sisch \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_fr.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_fr.properties new file mode 100644 index 0000000..cde52fd --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_fr.properties @@ -0,0 +1,3 @@ +Name=Nom +French=Fran\u00e7ais +FrenchDescr=V\u00e9rifie qu'on dit bien hello en fran\u00e7ais diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_it.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_it.properties new file mode 100644 index 0000000..818773e --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_it.properties @@ -0,0 +1,3 @@ +Name=Nome +French=Francese +FrenchDescr=Mostra il messagio in francese diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_sv.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_sv.properties new file mode 100644 index 0000000..a35fb82 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_sv.properties @@ -0,0 +1,3 @@ +Name=Namn +French=Franska +FrenchDescr=S\u00E4tt om vi ska s\u00E4ga hej p\u00E5 Franska \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_tr.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_tr.properties new file mode 100644 index 0000000..bcdf888 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/config_tr.properties @@ -0,0 +1,3 @@ +Name=\u0130sim +French=Frans\u0131zca +FrenchDescr=Frans\u0131zca olarak merhaba demeliyim diye sor \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name.html new file mode 100644 index 0000000..0442b09 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name.html @@ -0,0 +1,3 @@ +
+ Your name. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_de.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_de.html new file mode 100644 index 0000000..846cf5e --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_de.html @@ -0,0 +1,3 @@ +
+ Geben Sie Ihren Namen ein. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_fr.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_fr.html new file mode 100644 index 0000000..c1a7406 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_fr.html @@ -0,0 +1,3 @@ +
+ Votre nom. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_it.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_it.html new file mode 100644 index 0000000..367b691 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_it.html @@ -0,0 +1,3 @@ +
+ Nome di mostrare. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_sv.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_sv.html new file mode 100644 index 0000000..54fb6ee --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_sv.html @@ -0,0 +1,3 @@ +
+ Ditt namn. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_tr.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_tr.html new file mode 100644 index 0000000..d241f30 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-name_tr.html @@ -0,0 +1,3 @@ +
+ İsmin. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench.html new file mode 100644 index 0000000..dde47ed --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench.html @@ -0,0 +1,3 @@ +
+ Use French? +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_de.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_de.html new file mode 100644 index 0000000..f9ca2c6 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_de.html @@ -0,0 +1,3 @@ +
+ Ob die Begrüßung auf französisch angegeben werden soll. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_fr.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_fr.html new file mode 100644 index 0000000..15c398c --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_fr.html @@ -0,0 +1,3 @@ +
+ Utiliser le français ? +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_it.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_it.html new file mode 100644 index 0000000..4bc66a1 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_it.html @@ -0,0 +1,3 @@ +
+ Mostrare il messagio in francese. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_sv.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_sv.html new file mode 100644 index 0000000..cb658b8 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_sv.html @@ -0,0 +1,3 @@ +
+ Använda Franska? +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_tr.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_tr.html new file mode 100644 index 0000000..3f7fe5e --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/PortingAdvisorBuilder/help-useFrench_tr.html @@ -0,0 +1,3 @@ +
+ Fransızca göster? +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper.properties new file mode 100644 index 0000000..0d16260 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper.properties @@ -0,0 +1 @@ +DisplayName=Copy master''s files into the job''s workspace before building \ No newline at end of file diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.jelly b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.jelly new file mode 100644 index 0000000..bff199a --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.jelly @@ -0,0 +1,66 @@ + + + + + + + + +
+ + +
+
+ + +
+
+ + +
+ + + + + + + + + + + + + +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.properties new file mode 100644 index 0000000..0fc6087 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config.properties @@ -0,0 +1,32 @@ +# The MIT License +# +# Copyright (c) 2009-2012, Manufacture Fran\u00e7aise des Pneumatiques Michelin, Romain Seguy +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +Excludes=Files to exclude from the copy +Flatten=Flatten directories +HomeRelative=$JENKINS_HOME (not advised) +Includes=Files to copy +IncludeAntExcludes=Include Ant''s default excludes +RelativeTo=Paths are relative to +SomewhereElseBeginning= +SomewhereElseEnd= +UserContentRelative=$JENKINS_HOME/userContent +WorkspaceRelative=This job''s workspace on the master (not advised) diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config_fr.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config_fr.properties new file mode 100644 index 0000000..d98eda4 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/config_fr.properties @@ -0,0 +1,30 @@ +# The MIT License +# +# Copyright (c) 2009-2012, Manufacture Fran\u00e7aise des Pneumatiques Michelin, Romain Seguy +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +Excludes=Fichiers à exclure de la copie +Flatten=Applatir les répertoires +HomeRelative=$JENKINS_HOME (à éviter) +Includes=Fichiers à copier +IncludeAntExcludes=Inclure les exclusions par défaut de Ant +RelativeTo=Les chemins spécifiées sont relatifs à +UserContentRelative=$JENKINS_HOME/userContent +WorkspaceRelative=Le workspace de ce job sur le noeud maître (à éviter) diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.jelly b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.jelly new file mode 100644 index 0000000..8c5e5a3 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.jelly @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.properties b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.properties new file mode 100644 index 0000000..7c88df2 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/global.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright (c) 2012, Manufacture Fran\u00e7aise des Pneumatiques Michelin, Romain Seguy +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +CopyToSlaveConfiguration=Copy To Slave Options +EnableHomeRelative=Enable the "Paths are relative to $JENKINS_HOME" option +EnableSomewhereElse=Define an additional "Paths are relative to" option +SomewhereElsePath=Path diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-excludes.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-excludes.html new file mode 100644 index 0000000..dc41e60 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-excludes.html @@ -0,0 +1,30 @@ + + +
+ Optionally specify the + 'excludes' pattern, such as "**/TEST-*.xml". A file that matches this + mask will not be copied, even if it matches the mask specified in the 'files + to copy' field. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-flatten.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-flatten.html new file mode 100644 index 0000000..c8e8a38 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-flatten.html @@ -0,0 +1,29 @@ + + +
+ Normally directory structure is preserved when files are copied. If you want + to copy all files directly into the root of the job's workspace, enable this + option. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includeAntExcludes.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includeAntExcludes.html new file mode 100644 index 0000000..146e490 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includeAntExcludes.html @@ -0,0 +1,28 @@ + + +
+ Ant has some default + excludes. If you want to copy them anyway, enable this option. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includes.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includes.html new file mode 100644 index 0000000..3abdaf9 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-includes.html @@ -0,0 +1,31 @@ + + +
+ Comma-separated list of patterns of files/directories to be copied. + See the @includes + of Ant fileset for the exact format. The base directory is defined by + the Paths are relative to field.
+ E.g.: *.xml,**/*.properties +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeTo.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeTo.html new file mode 100644 index 0000000..d09ef73 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeTo.html @@ -0,0 +1,28 @@ + + +
+ Specify the base location for the paths that are specified in the + Includes and Excludes fields. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeToHomeEnabled.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeToHomeEnabled.html new file mode 100644 index 0000000..8b8e0b7 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-relativeToHomeEnabled.html @@ -0,0 +1,30 @@ + + +
+ If this option is enabled, then users will be able to select + $JENKINS_HOME as a possible base location for copy to slave + operations, thus exposing the whole Hudson/Jenkins folder. As such, + enabling this option is highly discouraged. +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-somewhereElseEnabled.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-somewhereElseEnabled.html new file mode 100644 index 0000000..d89f696 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help-somewhereElseEnabled.html @@ -0,0 +1,32 @@ + + +
+ Optionally specify an additional entry which will be choosable as the base + location for copy to slave operations (in addition to + $JENKINS_HOME/userContent, the job workspace and, if enabled, + $JENKINS_HOME). The specified path has to be relative to the + filesystem root directory. You can use environment variables + (JENKINS_HOME, etc.). +
diff --git a/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help.html b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help.html new file mode 100644 index 0000000..b07a6d0 --- /dev/null +++ b/devops/jenkins-plugin/porting-advisor-plugin/src/main/resources/io/jenkins/plugins/devkit/slavecopy/CopyToSlavebuildWrapper/help.html @@ -0,0 +1,35 @@ + + +
+ Copies a set of files located somewhere on the master node (cf. the Paths + are relative to field) into the workspace of the corresponding job on + the node performing the build (whether it is a slave node or the master + node itself).
+ This is useful, for example, when some files required for the build to take + place are not present in the SCM, but are located in one of the three + following locations: $JENKINS_HOME/userContent, + $JENKINS_HOME, or directly in the project's + workspace (on the master node). +
-- Gitee