I am switching from google scripts to Script Lab (I have to !). I prefer Google script up to now but I have a lot of scripts on Google script that I will have to replicate on Script Lab. Seems possible.
Oen thing I can not find on Script Lab that will be important is Triggers. I used to run my scripts on Google script every 10 min. Any idea how to trigger automatically by time scrips on Script Lab (in Excel) ?
Related
I have a job running perfectly in Jenkins called 'MyBuild'. The Source Code is from my Azure Repo and builds everything and even creates Artifacts for me. Perfect up to that point.
The Files that are generated by this 'MyBuild' job come with a default config from the azure repo. So I have a batch script called 'devscript.cmd' on the same PC/server where Jenkins is running. This script makes a few changes to the configs files in the last successful Build. After making those changes it should begin a dotnet run on my application.
So far What I tried is: created another freestyle Job in Jenkins called 'Development_Run'. I left all the configs as default and added the build steps of Execute Windows Batch Commands.
So the Job runs well since it just navigates to that path and Executes the script.
The Problem is. All what the Script is supposed to Do, doesn't happen. NB:// I test the script in the PC first and it runs well before starting the build process in the 'Development_Run' Job. So the Script is executed but in actual sense the contents of the script don't get executed.
Illustration below
Where I could I be going wrong? Or someone help by giving an alternative so as to achieve what I am doing.
The reason for all this is automation. I could do this manually every time but since the development is ongoing I need to have this automated.
I have a shell script in my git which downloads huge android workspace (takes 90 minutes) & performs some operations & refines it & then I trigger some checks on another tool(via same shell script).
So until now I have configured the jenkins where it checkouts the shell script & runs it.
This shell script takes 90 minutes to download such a huge repo IN TO THE SAME WORKSPACE & then triggers some check on other tool(via its api).
But problem is if i just do minor improvements to the shell script & re run the job the entire workspace with previously refined sources gets wiped out & again I have to wait 90 minutes to perform this check.
Is there any way to optimize it so that i can retain the previously refined sources & only update the shell script in the workspace
I am looking to automating in jenkins But being a novice I am stuck how to do it.
Any help would be helpful thanks
Try to download all the stuff to different folder, run 'chown' on the folder to make user 'jenkins' owner of the repo. Set your script to check the folder.
For the test purpose it will work.
I'm new in this kind of subject.
I'm trying to use Jenkins to run my Protractor automation.
My question is - When I create a new job, which build step should I choose? (execute batch command, execute shell, etc)
And what should be happen in the Protractor's side?
If there are any more critic details about the configuration I should know - Please write them.
* I'm using WINDOWS*
The choice between batch or shell depends on you. You can use the one you are more comfortable with. Sounds like it is window, so you can start with batch.
Jenkins will run automatically the workflow that you decided to implement. So you need to know how will your full workflow look like in command-line.
Usually it is something like that:
pull the sources
build it
run the tests (unit-test, integration, regression, etc.)
send the report
For the protractor, from the official doc, to run the configured tests:
protractor conf.js
https://www.protractortest.org/#/
As it is your first time doing this, just keep in mind that anything that you qre able to do with command-line, you will be able to do it as well with Jenkins.
Right now sorting out a good workflow using Jenkinsfiles is a bit slow since I have to create a job, and run it from the UI in order to get feedback on whether or not it works.
I was wondering if there was a way to place a breakpoint inside of a Jenkinsfile that way I could toy around and get a feel for the libraries / methods / variables that are available.
Is this something that is possible? Or do I have to stick to my current process of editing a Jenkinsfile in the Jenkins UI and then re-running the build?
--Edit--
I've found a workflow that works a little faster than making changes through the UI. The SSH server within Jenkins exposes a command called declarative-linter and one called replay-pipeline. Now I just develop the script locally and rerun these commands after I make an edit.
So basically, my workflow is like this:
Edit the script to my liking
Run the lint check. I have jenkins setup in my ssh config file, so basically I run this using Powershell:
gc Jenkinsfile | ssh jenkins declarative-linter
Run the newly changed script by replaying a pipeline build:
gc Jenkinsfile | ssh jenkins replay-pipeline <name of my job with branch name>
Run the console command to tail the logs:
ssh jenkins console <name of my job with branch name>
All I did was wrap these lines into a PowerShell function and after I edit the script locally I run one command to perform all this to validate the change. It's definitely more complicated, but the turn around time is a bit faster than it was using the Jenkins UI, plus I get to edit the script using my favorite editor. Hopefully, in the future, there will be better tooling around debugging Jenkinsfiles.
This is the only way currently. Although I know that there requests for future additions in this direction (Pipeline debugger). Probably there are some options to debug this directly from Java, but this is not a trivial setup to be done.
Add an user input
input message: "Continue?"
pipeline input step,
Read interactive input in Jenkins pipeline to a variable
Developed few scripts using GATLING tool
Able to execute those scripts as a standalone basis
Execution done through GATLING provided .bat file
Triggering of the batch file will ask for user inputs during run time to
select which scenario to simulate
Trying to integrate these scripts and trigger via JENKINS -
As parameterizing the argument does not support the GATLING provided bat
file
Configuring the GATLING provided bat file results in failure of build -
as it requires a user input during run time
Please anyone can provide a step wise approach to integrate GATLING scripts in JENKINS
Gatling support passing parameter : http://gatling.io/docs/current/cookbook/passing_parameters/
Gatling seems a Java tool and execute script by a .bat/.sh file, so that you can inspect what command and parameters it used in backgounnd sence with some tool's help. like 'processhacker' is a enhancement of Windows Task Management. with it you can see the whole command to help you find out how to pass scenario you want to run in command line. If 'processhacker' can't help that, you need to read the souce code of Gatling or send support mail to its company to ask help.