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.
Related
I have a Jenkins CI host server running on Linux machine and a Jenkins build node running on a Windows server. I'd like to start use the Docker containers for building, testing, packaging, and related artifact generation.
However, at the end of the day, I need to generate Windows binaries. Is it possible to create Windows Docker containers on a Windows server and connect to them on a Linux server?
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 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.
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.