I have a script that checks whether all application modules are up and returning the result correctly, but need to test the upload .xlsx and .zip files.
I'm developing in CasperJS
and desire to integrate with Jenkins
(which I'm still learning about).
My question is: How do I access these .xlsx files and zip when integrating with Jenkins?
Just put in the Jenkins workspace directory and access or is something more complex than having to use Parameterized Trigger Plugin? There's another solution? (may be one that doesn't use Jenkins and CasperJS)
The parameterized trigger won't do what you need; its purpose is to pass parameters/variables from a job to the jobs it is triggering.
You are on the right track with putting the files in the workspace, but you need a good way of getting them there: You should store the xlsx and zip files on a server accessible to the build slave and retrieve them on-demand before the CasperJS tests run.
The Copy To Slave Plugin might be what you're after. From their description:
This plugin allows to copy a set of files, from a location somewhere on the master node, to jobs' workspaces.
To use it, you would copy your xlsx/zip files onto the Jenkins master, say:
$JENKINS_HOME/userContent/casperjs/testZip.zip
$JENKINS_HOME/userContent/casperjs/testXL.xlsx
In the build job, you would check the box for Copy files into the job's workspace before building and, for files to copy, you would put casperjs/**
. Your CasperJS tests could then refer to them as casperjs/testZip.zip
and casperjs/testXL.xlsx
.
You could use other techniques (scp
and curl
come to mind), but the Copy to Slave is probably the most "Jenkinsy" way of doing it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With