脚本

How can I call a groovy script from a Jenkins file?

匿名 (未验证) 提交于 2019-12-03 08:50:26
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to separate out the contents from a Jenkinsfile into a groovy script to make. But it fails to call these scripts: Here is the code: file.groovy Looks like the Jenkinsfile is able to call file1.groovy but always gives me an error: java . lang . NullPointerException : Cannot invoke method firstTest () on null object 回答1: If you want to have methods available in your Jenkinsfile from an external file you need to do the following In your file1.groovy , return references to the methods def firstTest () { // stuff here } def

Running 1 of 1 custom shell scripts freeze

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm building a framework, while trying to compile the framework for production with custom shell script code, it freeze's on this step. This is the custom shell script code: # define output folder environment variable UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal # Step 1. Build Device and Simulator versions xcodebuild -target SomeSDK ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" xcodebuild -target SomeSDK -configuration ${CONFIGURATION} -sdk

Run multiple commands in multiple Terminal windows with a single bash line

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Here's an interesting problem: Using the AppleScript method to launch a new command in a Terminal window fails if Terminal is "busy"; more precisely, it will open a new window but fail to run the command. For example, try copy+pasting this line in: osascript -e 'tell application "Terminal" to do script "foo"'; osascript -e 'tell application "Terminal" to do script "bar"'; osascript -e 'tell application "Terminal" to do script "baz"'; When I run this (I'm on Snow Leopard), I get three windows: In the first, the command foo is run, as expected

Can you define an entry point in your Plone product to run a script as if it was called by bin/instance run

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a batch job that I need to run occasionally against my Plone instance. It needs access to the code in my Plone product and other Plone code and to query the catalog. I've included the script in my Plone product and currently run it via bin/instance run <path to script in eggs directory> Obviously if a new version of my product comes along I need to change the path to point to the new version of the egg. What I'd like to do is define any entry point for the script in my product's setup.py and then use the buildout recipe like zc.recipe

.selectpicker is not a function

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use bootstrap-select and reference it from javascript, but I always get an error: .selectpicker is not a function Everything I've read about this error says I have a dependency missing or not loaded at the right time, but I'm at a loss as to what I'm missing. Also, I get the same error when I try $('.selectpicker').selectpicker(); from the console, which tells me that it's not an issue with my javascript running before everything's loaded. Here's the relevant portions of my page: <link href="/Content/bootstrap.css" rel=

iOS frame by frame animation, by script

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: There are a few SO questions regarding frame by frame animation (such as frame by frame animation and other similar questions), however I feel mine is different so here goes. This is partially a design question from someone with very little ios experience. I'm not sure "frame by frame" is the correct description of what I want to do so let me describe that. Basically, I have a "script" of an animated movie and I'd like to play this script. This script is a json file which describes a set of scenes. In each scene there are a few

Lua Sandbox with special functions which leak

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use How can I create a secure Lua sandbox? to build my own leaky sandbox. I am trying to create a Lua sandbox where some Lua functions can access some other Lua functions outside the sandbox. For example I want my sandbox to have a special "display" function which can call "print" but not have "print" in the sandbox too. The main problem is that I am trying to build a sandbox within an already large codebase, so I cannot nil away functions. How is this possible? The solution has to be a pure Lua function due to no fault of

PBS script -o file to multiple locations

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Sometimes when I run jobs on a PBS cluster, I'd really like the joblog (-o file) in two places. One in the $PBS_O_WORKDIR for keeping everthing together and one ${HOME}/jobOuts/ for greping/awking/etc... Doing a test from the command line works with tee : echo "hello" | qsub -o `tee $HOME/out1.o $HOME/out2.o $HOME/out3.o` But once I try to put this in my PBS script, it does not work if I put it in a PBS script and qsub ####Parameterized PBS Script #### #PBS -S /bin/bash #PBS -l nodes=1 #PBS -l walltime=0:01:00 #PBS -j oe #PBS -o `tee TEE

Restart an Application in JavaFx

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to close and then restart a already running application (automatically) that I am making, by clicking a button or something like that, I want to do that for the purpose of re-launching the application in an other language, I'm new to JavaFx and Java in general, please can you give me a solution for this problem ? 回答1: This question lacks details. You did mention a JavaFX application but it is important to know how that application is being deployed. Is it running in the web browser, as a java webstart application, a stand

How to kill a running php script in windows

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a php script running in an infinite loop that I need killed without restarting apache. I have access to the server via remote desktop. Please advise. 回答1: Find the running scripts you want to kill: tasklist / v | find "php" Make note of the process ID, kill it with: taskkill / PID 3776 Same as doing: ps aux | grep php kill 3776 回答2: Have you tried: Windows task manager->Processes->apache ? It should be there, simply end the process. EDIT - Just saw that you don't want to kill apache. I'm not sure that's possible, as PHP runs