0

I am creating a CI/CD pipeline. I am trying to create a groovy function in order to deploy a build to udeploy.

I know I will need to pass the parameters used in to the function such as: udeployServer, component, artifactDirectory, version, deployApplication, environment and deployProcess.

I was wondering has anyone tried to implement this or has anyone any idea how I should approach this?

Thanks

user2730471
  • 37
  • 2
  • 7

1 Answers1

0

I don't know anything about udeploy servers but I do know there is no pipeline plugin for udeploy, which means that you will not have a function such as :

udeploy: server=yourserver component=yourcomponent artifactDirectory=...

However Jenkins allow you to use shell commands inside your groovy pipeline, so you should be able to do pretty much everything you need. So I guess the real question is how do you usually deploy a build to udeploy ? Do you do it via a REST API, do you push a file via FTP, ... ?

Jenkins build will be pretty straightforward, have a look at how to checkout and build using Jenkins pipeline.

An example pipeline could look like :

{
  stage 'Build'
  def mvnHome = tool 'M3'
  sh "${mvnHome}/bin/mvn clean install"

  //... Some other stages as needed...

  stage 'Deploy'
  sh "execute sh deploy script here..."
}

... where you deploy stage could use other plugins to copy files to your server, run REST API requests, etc. While writing a pipeline, have a look at Pipeline Syntax link for a Snippet Generator giving more detailed information about existing plugins.

Pom12
  • 7,622
  • 5
  • 50
  • 69