In my case after build completes zip file will be created .Is there any way to provide a direct link inside build (For ex : at left side where we see 'Console Output' in that location) so that on click it takes to download location or downloads directly.(So that user need not to go to location and download explicitly)
You can archive your zip file firstly.
Then you get it either inside the build page or from the last successful build page which is in the main job page.
https://xxxx/job/hello/lastSuccessfulBuild/artifact/
Related
I am trying to automate printing a list of PDF files in a folder and renaming the newly printed copies with a different name.
Workflow.
Drop all pdf files into folder
Loop through all files doing the following:
A "Print to PDF"
B Name new file when "Save Print Output As" window opens
I have created the following steps (see image below). The issue is that I cannot find a way to call the current item's name and input it into the file name and save it. What ends up happening is at the end of the execution of the flow, I get all the Save Output windows at once and I am not sure which one is what.
enter image description here
I have a pipeline job in Jenkins. Once it finishes , it archives some files. I need to display a particular file from the archived folder.
Example file is D:/1234/errorLog.txt
If job is failed , this path should be provided in the email. How can I achieve this ?
It should be able to access that folder from email, by clicking that link.
All files that are archived can be accessed via the Jenkins URL. So, for example if I had an archived errorLog.txt, I would be able to access it like this:
JENKINS_URL/job/JOB_NAME/BUILD_NUMBER/artifact/path/to/file/errorLog.txt
So if you were sending an email, the email would have to contain the formatted string with the Jenkins URL, Job name, and build number set.
You can also do this with folders. If you were to go to the artifacts root folder:
JENKINS_URL/job/JOB_NAME/BUILD_NUMBER/artifact
You would see the archived folders listed out:
So anyone clicking on the list would have the page open up in their browser.
I use Electron to build my app.
I want to load data from zip unpack it to folder file and show it to user.
I decompress data and then open window since its html it should work fine.
However i see that app.getAppPath() on dev mode is giving me example path D:\elektron but when i build up path is different D:elektron\resources\app how to solve this ?
During the the "input step", I need to make a binary file available for the user to download and validate.
Ideally as a clickable link directly in the input-step dialog if that is possible somehow?
"archive artifact" does not work, since the artifact only becomes visible after the job has finished.
A link directly to the file in workspace would be ideal, but there does not seem to exist a way for groovy to find out the URL to the workspace.
The html publisher might work. But the problem of linking to it from the input-step dialog remains.
you can try to copy your file to $JENKINS_HOME/userContent and then access it via https://YourJenkinsHost.com/jenkins/userContent/YourFileName
I have a ajax download functionality in my MVC webapp.
User can select a criteria and click on export button. Internally it will fetch data and return an Excel file. up to this functionality is working fine.
But the issue occurs, While one download process is running and now user changes the filter criteria and again click on export button. Now two download processes are running. Whichever process completes first will return file to download. Now the user can see Open, save, cancel option to download first file. As this stage when second download request is also completed and returns file to download. When I opens one file the another file download option is also lost.
Initially I thought it might because both the files are having same name. So I made changes to set unique file name for every request. But It still gives only single file to download.
Can anyone help me on this?
edited :
On other pages where I have two different types of files to download, the above functionality works successfully.
In none ajax requests, page can only be waiting for one response.
In order to solve that problem and wait for multiple responses you should use target attribute with value "new" as the following code depicts:
Your download Text
The above code makes each response to be downloaded in a new tab.