I have a Jenkins installed on a Linux build server and I need a project to be deployed on a Windows machine. Jenkins builds a simple zip package that contains an executable. The package can be uploaded with FTP.
But how to deploy that package after uploading? Call a batch script for example. For Linux servers I just use "Publish Over SSH Plugin" plugin.
Using Jenkins ver. 1.638.
You need to know some powershell and use the Jenkins powershell plugin.
But i propose your to Dockerize the project and deploy like that.
Related
I tried to configure jenkins that is mounted on a server with linux, is it possible to install msbuild.exe to compile a .NET application? or is it necessary for Jenkins to be on a windows server?
The .NET Core SDK can be installed on Linux and comes with a tool called dotnet which can work pretty similar to MSBuild when you run it as dotnet build.
It depends on what purpose. If it is to study, I recommend installing Jenkins on a Windows Server, then installing the .Net Framework SDK that you want to use.
If it is a productive environment, I recommend installing Jenkins Master on Linux Server and a Slave on Windows Server, then installing the .Net Framework SDK that you want to use. So you do not overload the Jenkins as you compile.
If you look at the version of the .Net Framework SDK, because if any font needs something specific, you will have to install the Microsoft Windows SDK.
For configuration see this link.
I have my jenkins installed on windows server, configured with git.
Currently using deploy to container plugin to deploy build to remote hosts. now instead of deploying using plugin, i want to write a shell script which will deploy war in post build action. my remote machine is linux machine (Centos).
gone through link
Run batch scripts on a remote server (windows) from jenkins
but not a great help.
any help will be appreciated.
Thanks
I want to automate deployment of my project from Jenkins on a Linux server to a Windows server. As I have read, there are some tools to scp from linux to windows. Is there a tool that I can use to push the build from linux using a script?
One solution should be to install a Jenkins slave agent on the Windows machine.
With this solution, you can create a dedicated job and launch it on the Windows node.
This job can get the artefact (or the build result) from the Linux server with the Copy Artifact plugin.
In company i have 3 servers, 2 linux servers and 1 windows server. I build .war on Linux server and i want to deploy it on second linux and windows server, for linux i use deploy plugin and it doesn't support version of tomcat8, and also it doesn't have option deploy war on windows server.
So my idea is to deploy war to samba directory then use copy script to obtain .war file. For windows i can use samba folder and in tomcat configuration use a deploy Application from a Local Path. Is there some more gentle solution of this problem ? If there some risk from using that solution ?
Edit:
In case when I try to use mounted directory, i use docBase="//ip/directory" and path="directory" i obtain error with The main resource set specified [\ip\directory] is not valid. I'm curious is even possible to do this ?
So if someone will face the same problem that is the solution:
On Jenkins server install plugin to execute shell scripts. That allow us to run cURL command.
To deploy .war on Windows server use command with cURL, example:
curl -T /var/lib/jenkins/jobs/(Path to war ) http://user:password#ip:port/manager/text/deploy?path=/(nameOfWar)&update=true
Also add role manager-script to your Tomcat user.
For deploy on Linux servers I use plugin Deploy war/ear to a container. So it's all in Jenkins and Tomcat.
I have an issue about Jenkins.I used a freestyle project not a maven project because it's a nodeJS project.
The Workflow is as below :
Jenkins trigger from GitLab Acceptation Merge Event.
Jenkins execute the build for testing integration.
execute shell command (linux) in actual linux OS.
Jenkins deploy the project after test success to a remote Windows Machine.
So what i want is how to deploy to a remote windows machine
Jenkins and Git are in the same machine (linux).
and deployment in a remote machine Windows.
You can plan to use a deployment automation solution like Xebialabs XL Deploy/IBM udeploy/CA Nolio as they are specialised products that will take care of a lot of the use cases related to deployment out of box and you do not have to create a scripted solution in Jenkins.
you can use gitDeploy framework, that always does the job
AFAIK, you can not deploy to a windows remote machine only using Jenkins. There is a Jenkins plugin https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+CIFS+Plugin which might be worth looking, but I doubt if it will solve all the requirements. As it is for copying files to WINS share.
I would suggest you to have a look at Ansible (http://docs.ansible.com/ansible/intro_windows.html), you can install the ansible controller on the Linux along with Git & Jenkins and configure jenkins to trigger the ansible deploy on to the target windows machine.