I created nuget task while configuring build definination, so that i can create a package in VSTS(in package feed), but my requirement is to copy that package to local machine while cretaing build.
Thanks in advance.
Assuming you're using a private agent (i.e. you're running builds on a machine or VM you've set up), you can use the Copy Build Artifacts task's "A file share" option in the "Artifact publish location" dropdown.
Related
I have a Jenkins job that gets the code from version control and builds (like what a normal pipeline do), I was doing is that after building the project, I download the build and use FTP to transfer that build to the client's server then I unzip it and then copy the whole build because I copy whole build my application's down time is very high. (I have to use FTP because as a service provider we have some limitations and can't change this policy)
What I wanted to do is that Jenkins know what is changed when it is building so Jenkins will create a package with all the changes and with the correct path where the file should go, and I can download that package and copy that package and just run the package so whatever was changed only that should get updated.
Is that possible? Is there any plugin that I can use?
This really depends on the build tool/language you are using to build you application. I dont think there is a generic jenkins plugin.
Other idea would be to upload your package to a local Nexus server. Download after the next build and the compare the files from old and new build. With this information you can create a patch package for your clienst server.
I am trying to copy war and ear files from windows share path(UNC) to linux target servers where jboss jvm is running and then deploy these files using our custom script. this is for applications that are still not using tfs to do their build. i tried download from file share task in azure devops but that is only copying to the agent location but not to the target server. if anyone has come across this situation and found a solution please do share your thoughts. appreciate it. thanks.
You need to use two tasks/steps to handle this situation.
Copy/download files from windows share path(UNC) to a folder path in build agent machine, such as $(Agent.BuildDirectory)
Copy files from a source folder to a target folder on a remote Linux server machine over SSH.
Since you have successfully download from file share task in Azure DevOps to agent machine. Then you just need to use Copy Files Over SSH task.
Use this task in a build or release pipeline to copy files from a
source folder to a target folder on a remote machine over SSH.
This task allows you to connect to a remote machine using SSH and copy
files matching a set of minimatch patterns from specified source
folder to target folder on the remote machine. Supported protocols for
file transfer are SFTP and SCP via SFTP. In addition to Linux, macOS
is partially supported.
More detail configuration about this task please refer official link here-- Copy Files Over SSH task
Currently my TFS build is creating the workspace in build machine and all my remaining task are performed in a network share in UNIX machine. So i copy my workspace to that network share before proceeding with the build. Is there any way to directly create the workspace in NetworkShare, so that i can stop copying process.
If you mean the UNIX project have dependencies which generated on windows build, I am afraid you have to add a copy task to copy them first, unless you can build the windows and UNIX projects on the same agent, but generally it's not possible.
However if you want to build them on a network shared path, then you just need to deploy a new build agent and set the network path as the working folder. Thus you can directly reference the dependencies on the shared path.
When I tried to use Jenkins as our CI environment to build ASP.NET MVC5 project, I set up to use MSBuild.exe to build project.
But when the cmd run into restore nuget packages, it stucked. The error message is as below:
WARNING: Unable to connect to the remote server
Unable to find version '3.4.1.9004' of package 'Antlr'.
Build step 'Execute Windows batch command' marked build as failure
But if I use windows command line to run the msbuild, it is working and could download the pkg from nuget.org. Error only happened when try to build in Jenkins. And my network is fine, but behind a company proxy/firewall, I am not sure what it is. And I have set to auto restore nuget package in VS2013.
Any idea is much more appreciated.
I finally found out the root cause, it is the Jenkins service has not enough access right. Open windows services and right click on the Jenkins service, in the security tab, change the default user to whom that has enough access right to the Internet.
I want to use existing TFS build scripts but move my code to the TFS cloud.
Can this be done?
Is it as simple as changing the "Source Control Folder" in the Build Definition? (I doubt it).
We have a local build machine which I want to use as it has custom installations required for the build to succeed.
You can. If you install and configure a TF Build Controller locally you can connect it to VSO. Add some agents and you can build hapily locally with all you code safe and secure in the cloud.