I don't know if this is possible but this is what I'm trying to achieve.
I use a lot of scripts in InDesign. Every time I run a script I have to go to the pannel and double click on the script.
If I can call on a script via a grep style I would have a real time feature that can execute scripts while building.
Please let me know if you have an idea!
Related
In my Jenkins Console logs it says:
Obtained jenkins/some.jenkinsfile from git ssh://mygitserver.myorg.com/my/git/repo.git
so I have to copy / paste / edit to get that repo then click about to the Jenkinsfile in your browser.
When you're doing this multiple times every day it becomes a major headache.
Is there anyway to get a simple clickable link?
I would suggest crafting an output that would then become clickable. i.e. declare the link then specify the file using a variable.
script { println("https://yourRepoUrl.com/jenkins/${downloadFile}) }
Alternatively, you could download the file from within the pipeline. See here for details
Is there a way to overwrite a value contained within a config.properties file via Jenkins?
I have the following config.properties file contained within my automation framework:
browser=chrome
url=http//www.example.com
If the value of chrome get changed to firefox then all tests will now execute within firefox browser.
I can manually change this value by directly accessing the config.properties file but can the value get altered via jenkins?
I use the Pipeline Utility Steps plugin to read properties files, and it looks like it can write a few other types of files, but not properties files.
It seems to me that you want to make this change in this file so you can run some tests first in one browser, then in another. If this is the case, I think a better way to handle this is to try to get your tests to point to different files. This is a little cleaner, and allows things like parallel execution and when you find that another thing needs to change in the future, you won't be writing so many things to the file in a script, which gets a little error prone.
If you can't make your tests execute against a different properties file, you could have a copy of each file you need, and then copy them to them appropriate filename to execute your tests.
But maybe I made poor assumptions as to your setup here. ;)
Yes.
You can create a build parameter as $browser to accept the value say "firefox" and using sed inside "execute shell", replace the value in config.properties.
Once done, execute your scripts.
This is just overview as you have not posted details about your config.properties file, its location, if you are using Jenkins jobs or jenkinsfile/pipeline etc.
I have a Python code that when running, creates multiple other terminal windows, in addition to the one I was already running from.
subprocess.call(["gnome-terminal", "-e", "..."])
This opens multiple other terminals that runs the same program with different parameters.
In Jenkins, in a "Freestyle project", when I run the same script from the "Execute shell", the result is not the same (as I was expecting).
./python_file.py -p $MY_PARAMETER
The main console output is working fine, but the other windows terminal that were supposed to open, just don't execute. I want to be able to see the output of those terminals in the Jenkins console (or elsewhere ?)
Should I use another kind of project ? Or just add a new Plugin ? Is there an option in the project that I should checked ? I don't want to run the project on multiple nodes. I just need to see multiple terminals.
This is the error text :
Failed to parse arguments: Cannot open display:
It is not a common problem I supposed, but thanks for input!
I am not sure if a multiple windows output exists in Jenkins but I think that you can bypass this issue.
Instead of running one project in multiple console, I will modify my Python Script so that multiple projects will run one console at a time. Like that it will be easier to control which parameters I want to every single projects and what the outputs are for every single one of them also.
There is a couple way to do that ("multi-configuration project", multiple "freestyle project").
I want to print a hyperlink to a file I created while running a pipeline job. This simple .txt file should be opened after hitting the link. I found this wiki entry but there is no example implementation. Is there a way to perform this? I dont know how to trigger the 'explorer' call. (this is for windows use only)
I used : '<file://link/to/folder/>' and its working ;)
I'm new to JMeter and Ant and my web searches have not been fruitful so I'm posing a question here: Is it possible to start and stop a JMeter script using Ant?
Here's what I'm trying to do:
I have a JMeter test plan with a loop in it that is to simulate a user (or several users) sitting on a page for an indeterminate amount of time after a page refresh. In JMeter GUI mode, I can schedule the thread group to spin up users at a specified time and continue doing so for a specified duration. I'd ideally run this script for 45 minutes or so, stop the script and analyze the results. I would like to automate the running of this script and Ant seemed like the way to go. I did not see an appropriate property to specify a start time or a duration when running the script. Does such a thing exist? Is there a suitable workaround? Any help that can be offered is greatly appreciated.
There is a JMeter Ant Task available. You can kick off your Test Plan using this Task according to documentation.
For 45 minutes test duration I would go for the following:
<jmeter
jmeterhome="/path/to/your/JMeter/installation"
testplan="/path/to/your/test/plan.jmx"
resultlog="/path/to/your/test/results.jtl">
<property name="duration" value="2700"/>
</jmeter>
And put ${__P(duration,)} into Thread Group Scheduler's "Duration" input field
Once you start Ant JMeter will pick up that "duration" property and ask threads to stop when 2700 seconds (45 minutes) pass. Remember that in case of high number of threads shut down process may not be immediate as JMeter might need some time to gracefully shut down all the test threads.
For detailed explanation on using JMeter Ant Task and few more options of running tests in non-GUI mode see 5 Ways To Launch a JMeter Test without Using the JMeter GUI guide.
From what have you written I think you want to schedule a test from non-gui mode and control the parameters also. I am not sure about ant but we have workaround.
For this you can use JMeter non-gui features
If you want to start a test then you can use
Jmeter.bat/.sh -n -t
You can stop the test using stoptest.bat/.sh and shutdown.bat/.sh at any time (Maybe a wrapper shell/batch script can help you to automate this)
For specifying parameters you can override the existing parameters by specifying them from command line as properties local/global like,
-D[prop_name]=[value] - defines a java system property value
-J[prop name]=[value] - defines a local JMeter property
and use these properties in your test plan so that you can pass values while running the test for a specific amount of time or infinitely and stop the test in between (like you said after 45 min) using stoptest.bat/.sh
Example,
In Thread Group set Number of Threads to ${__property(users,,)} and specify it from command line as,
jmeter -Jusers=50 -n -t Test_Plan.jmx
Remember this local property and not global.
For using properties and non-gui mode you can refer this, Jmeter Manual