Azure pipeline not able to access the groovy - azure

I'm working with azure build pipeline to setup middleware application continues build.
I configured self hosted agent inside my ubuntu box and installed groovy using SDK mam.
Below are the as steps configured while installing groovy.
curl -s get.sdkman.io | bash
source "root/.sdkman/bin/sdkman-init.sh"
sdk list groovy
sdk install groovy 2.5.8
groovy --version
Inside the ubuntu vm, when I am executing i can able to list groovy version.
But same thing when I am using same command using Azure pipeline I'm getting error like permission denied, with groovy command not found.
Can you you some one assist me how to make it work groovy inside the azure pipeline task.

Related

How do I run a PowerShell script on an Azure App Service running Linux?

Using SSH to remote into the App Service I'm greeted with this message:
root#05831a60f815:/home# pwsh
-bash: pwsh: command not found
It would appear that Microsoft's new PowerShell Core is not installed on Azure's Linux containers.
Where do I define that I want PowerShell to be installed on my Linux deployment?
We have defined ubuntu-latest as our vmImage in our Azure DevOps CI.
It usually can be done from App Service Extension under Development Tools line. But in this case it doesn't have any option for PowerShell, so I believe you would need to install it manually.
https://learn.microsoft.com/ru-ru/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7

scripting in jenkins for deployment

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

Deploy a package on Windows by Jenkins running on Linux

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.

Is separate set of selenium jar files needed for linux os?

I am using Selenium Webdriver(v 2.47.1) automation tool in windows operating system. I have created one automation script using Eclipse IDE and integrated script with Jenkins CI. In Jenkins I created new job with help of windows batch file. Jenkins job successfully completed.
I have uploaded same set of code(contains src, lib, bin directories..) to Linux server where Jenkins CI is installed and tried to create new work using Jenkins. In Linux OS I have used shell command to build the project. Project not builded successfully..
I don't know where the actual problem is..? Please help me on this
There is few things which can effects scripts in Linux environment
1st is batch file you are using
refer it to resolve it if exist in your case
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Another one is if your using chrome then you need to set chrome binary according to linux
http://chromedriver.storage.googleapis.com/index.html?path=2.16/
Hope it will help you :)
If still you are facing problem then please share the error your get on terminal/Jenkins jobs section

how to configure Jenkins on Unix and deployment in a remote machine windows

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.

Resources