How to serve build archived artifact in jenkins - jenkins

I am using Jenkins Archive the Artifact build post action to archive my build results. I am looking for a way to directly allow developers to download the archived artifacts from jenkins.
Is there any plugin support that?
Or is there any way to serve static resources through jenkins?

There is no plugins to install for that. When using "Archive the Artifact", every build will generate a package so if developers need to download the artifacts they just need to go the concerned build on Jenkins then look at the "Build Artifacts" section and click to the artifact link that will propose them to download it.
For this to work, developers must have access to the Jenkins interface at least as read only mode.

Related

TFS - Build and Release, configuration file provider

Is there any similar plugin like this
https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin
in TFS Build & Release
I want to provide configuration.json file which is not included in git source.
Unfortunately, there is no such extension in TFS/VSTS Build & Release.
According to your tag tfs2013, seems you are working with XAML build.
Just like you need a workspace on your dev machine to develop your app, you must specify the workspace that the build agent uses to build and test your app. Then we get/pull source files from TFS server side. It's not able to achieve below similar features in TFS UI:
Adds the ability to provide configuration files (i.e., settings.xml
for maven, XML, groovy, custom files, etc.) loaded through the Jenkins
UI which will be copied to the job's workspace.
As a workaround, you could try to put configuration.json files in a ftp server instead of git source and then use a PowerShell solution to down the files in build agent workspace. If create a PowerShell to over FTP you can have it called by the build template(customize workflow).

How to keep artifacts directory during the multi-configuration build in TFS?

I have a solution with multiple projects where some are web apps. I have set up a multi-configuration build in TFS vNext that builds the single app, creates an MSDeploy package, gets the proper staging configuration files and add or replaces the files in the package archive file.
I'd like to use the deployment files created as artifacts to be used in a Release Management pipeline. The problem is that the artifacts directory is purged before each build (i.e. build of a web application). At the end, only the artefacts of the last app that was built are left there.
I can certainly configure the step to copy the artifacts somewhere else, but then the question is how to delete it only at the very start of the build (and by that I mean the build of all projects).
Is there a way how to disable purging of the artefacts directory or how to perform an operation only at the beginning of the build? Has anyone similar experience?
Use the "Publish Artifacts" task to store the artifacts in a UNC location or in TFS itself so they're available for release.

Jenkins switch build folder

I'm not even sure if I'm thinking about this correctly so I'm having difficulty googling it. I've got Jenkins set up and building a site and correctly sending the build artifacts over SSH to the live server.
My ideal workflow would be to ssh into the server, drop the new assets into a build folder, copy the old build files to a backup directory and drop all the new build files where the old build files used to be.
Not sure if that even makes sense or if there is a better way to do this. To be clear, I'm not talking about a single .war file or anything. I'm talking about a package of PHP files, images, CSS and other stuff.
I'm new to Jenkins in general so any help pointing me in the right direction is greatly appreciated.
See the ArtifactDeployer Plugin:
ArtifactDeployer plugin enables you to archive build artifacts to any remote locations such as to a separate file server.
...
ArtifactDeployer is a complete alternative to the built-in Jenkins feature "Archiving artefacts' and it is aimed at providing an uniform deployment mechanism.
Add it to your project's config with Post-build Actions → Add post-build action → [ArtifactDeployer] - Deploy the artifacts from build workspace to remote locations.
or the Flexible Publish Plugin:
...
[Send build artifacts over SSH]
...
Add it to your project's config with Post-build Actions → Add post-build action → Flexible publish.
or an idea I haven't tried myself yet, so no guarantees:
Configure your live server to be Jenkins slave node, create a project that is bound to this slave and use the Copy Artifact Plugin therein:
Adds a build step to copy artifacts from another project.
Add it to this project's config with Build → Add build step → Copy artifacts from another project.

How to promote builds to repository in jenkins multiple branch project

I need to promote debian packages build in jenkins to the repo (aptly.. maybe artifactory). However, the available plugins seem to be broken for multiple branch projects. Has anybody found a solution to get around this?
You can use Artifactory Jenkins plugin for that. Define the deb files you want to upload (metadata will be generated by Artifactory for you).
Please note that you need to attach some properties to the uploaded files. From Jenkins you don't need to craft the URL, instead add the properties in the "Deployment properties" textfield.

Cloud I access builds directory from Jenkins/Hudson?

I use Jenkins to run Clover, I can see the HTML report on Jenkins' web GUI, but I also want to download clover.pdf. It's created under workspace directory (only newest version) and builds directory like Jenkins\jobs\Job_test\builds\2013-02-19_17-12-25.
Is there any solution to access Jenkins\jobs\Job_test\builds\2013-02-19_17-12-25 from web ?
Archive the artifact that you require. All the archived artifacts will be stored in Jenkins server and can be accessed from web.
The link to the artifact will look like below
/jenkins/view/Test/job/jobname/lastSuccessfulBuild/artifact/path/to/mypdf.pdf
This can be achieved though the post build step "archive the artifacts":

Resources