当前位置: 动力学知识库 > 问答 > 编程问答 >

gradle ignores --no-daemon sometimes when running from Jenkins gradle plugin

问题描述:

I'm running different gradle tasks from Jenkins gradle plugin and using invoke gradle and with --no-daemon switch. I noticed that sometimes gradle ignores the no daemon switch and start the it anyway (which causes builds to hang).

my environment is:

  • Jenkins core 1.565.3
  • gradle plugin 1.22
  • gradle version used 2.13

EDIT:

also when trying from command line with --no-daemon, the daemon still starts:

-bash-4.1$ ps -ef | grep gradle

11831 26400 1920 19 15:33 pts/1 00:00:03 /opt/jdk1.7.0_10//bin/java -Dorg.gradle.appname=gradle -classpath /DATA/maas_slave/tools/hudson.plugins.gradle.GradleInstallation/gradle-2.13-rc-1/lib/gradle-launcher-2.13-rc-1.jar org.gradle.launcher.GradleMain --no-daemon zipAlign

11831 26440 26400 20 15:33 pts/1 00:00:03 /opt/jdk1.7.0_10/bin/java -Xmx2048M -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /DATA/maas_slave/tools/hudson.plugins.gradle.GradleInstallation/gradle-2.13-rc-1/lib/gradle-launcher-2.13-rc-1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.13-rc-1

and also with -Dorg.gradle.daemon=false in GRADLE_OPTS

-bash-4.1$ ps -ef | grep gradle

11831 1918 1920 26 15:50 pts/1 00:00:02 /opt/jdk1.7.0_10//bin/java -Dorg.gradle.daemon=false -Dorg.gradle.appname=gradle -classpath /DATA/maas_slave/tools/hudson.plugins.gradle.GradleInstallation/gradle-2.13-rc-1/lib/gradle-launcher-2.13-rc-1.jar org.gradle.launcher.GradleMain zipAlign

11831 1962 1918 29 15:50 pts/1 00:00:02 /opt/jdk1.7.0_10/bin/java -Xmx2048M -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /DATA/maas_slave/tools/hudson.plugins.gradle.GradleInstallation/gradle-2.13-rc-1/lib/gradle-launcher-2.13-rc-1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.13-rc-1

any idea how to ensure that daemon would not start?

分享给朋友:
您可能感兴趣的文章:
随机阅读: