最近由于项目自动化构建的需要,研究了下gradle调用脚本并传参的用法,在此作个总结. Pre build.gradle中定义了$jenkinsJobName $jenkinsBuild两个Jenkins变量,意图将gradle中的这两个值传到shell/python脚本中去用 def jenkinsBuild = System.getenv("BUILD_NUMBER") ?: "0" println "jenkinsBuild is set to $j
复制指定文件cpp.sh: [root@localhost soft]# vim cpp.sh#!/bin/bash name="$1"\cp /home/soft/test/${name} /opt/echo "co ok"~~ java: public class YY { public static void main(String[] args) throws IOException { System.out.println("java linux