Migrate Jenkins job to FlexDeploy

There are two distinct project types in FlexDeploy.

  • Utility projects - used for administrative and/or maintenance type of tasks like start server, stop server, provision environment, install software etc. Utility projects do not have any version and hence do not have any life cycle through environments.
  • Regular projects - used for build and deploy of code/configurations. Jenkins may have many jobs to cater various environments, but in FlexDeploy you will have one project that will be used for build and deploy to all environments for specific piece of code/configurations. For example, Java EAR application or SOA Suite composite are some examples of FlexDeploy projects. Each project has build and deploy workflow appropriate for type of code/configuration being managed.

You need to first figure out type of projects that will be necessary in FlexDeploy.

There are few different types of workflows in FlexDeploy. Workflows are reusable unlike Jenkins are used across many similar types of projects.

  • Utility workflow - used for administrative and/or maintenance type of tasks. This does not deal with artifacts.
  • Build workflow - used for performing build mostly based on source controlled files, but at times can pull files from development environment to perform build. This workflow would be generating artifacts.
  • Deploy workflow - used to deploy artifacts generated by build workflow. Deploy workflow is submitted against specific environment, so there is no need to create workflows per environment, you can have logic to perform environment specific tasks in the workflow.
  • Test definition workflow - mostly available out of box but you can create custom workflows to run tests.

Prepare workflows

  • First determine type of workflows necessary based on above explanation.
  • Optionally, you can create inputs for workflow with necessary Display Name and Initial Values. Workflow inputs are available in plugins and other workflow operations like assign, loop etc.
  • Optionally, you can also create workflow properties which may be defined on topology on project. This is defined as property scope. As workflows are reusable, project level property allows for reuse of workflow by many projects.
  • You can also turn more Jenkins jobs in to one workflow where each job is set of steps in same workflow. Or you can create many workflows and chain them together using Invoke Workflow step as workflows can invoke other workflows.
  • Now you need to replicate steps in Jenkins jobs to FlexDeploy workflow step.
  • You can use generic plugins like Shell, PowerShell, Groovy etc. but there are many powerful plugins available with FlexDeploy. See FlexDeploy Plugin Guides.
  • You can also reference FlexDeploy Variables Guide for reference of available variables. But most importantly you need to understand folder structure of workflow execution. Each workflow execution in FlexDeploy gets a new clean folder which is different than Jenkins. Code is checked out in FD_TEMP_DIR folder which is a variable available in all plugins. You can create other folders as necessary for your process and work with them.
    • If you are using shell script code to invoke ansible in Jenkins, then you can take same script code and put it in FlexDeploy shell plugin. If you are looking to externalize variables in the script code, make them either workflow property or input as appropriate.
    • If you are using ant script to generate Oracle SOA Suite composite jar file, you can just use FlexDeploy SOA - build operation which is available out of box.
    • If you are using WLST to deploy EAR file to WebLogic server, you can use WebLogic - deploy operation which is also available out of box.

Define topology

  • Define environment, instances and endpoints to describe physical topology and provide necessary properties like folder paths, credentials, URL etc.

Prepare projects

  • Note that single project is used to build and deploy to all of your environments. That is different than how Jenkins is generally configured. You will create either regular or utility projects to match Jenkins job. There is advanced capability of partial deployments is also available in FlexDeploy which might be more suitable for some scenarios.
  • Projects need to be configured with source control location(s) and workflows.
  • Utility projects will have utility workflow reference and regular projects will have build and deploy workflow reference.
  • Configure properties necessary at project level.

Now you are ready to perform executions against newly created projects.