Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuring the Plugin to work with FlexDeploy

  1. In your Jenkins project configuration, scroll down to the "Post-Build Actions" section, and click "Add Post-Build Action". 

    Info

    Make sure that you use the "Archive the artifacts" step before using the FlexDeploy plugin, so the plugin can find the proper artifacts.


  2. Choose "Build FlexDeploy Project" from the menu.


  3. Once you've added the Build FlexDeploy Project step, you should see a configuration page like this.

...

  1. Image Added
        1. FlexDeploy URL - This is the URL to FlexDeploy on your server.
        2. Qualified Project Path - I left this blank, because it will most likely be set at the individual project level.
        3. Environment Code - This is the environment we will be building in. I chose to use my development environment in this example, but this could be any environment code you want.
        4. Credentials - The credentials Jenkins should use to connect to FlexDeploy with. Can be stored using the Credentials plugin, or you can enter a username and password.
        5. Stream Name - This is the stream to build your FlexDeploy project in. Note that this will almost always be the default stream name, as the build workflow will probably not actually need to use it. The default value is trunk, but it should be changed to match the stream name setting in your Project Defaults configuration in FlexDeploy.
        6. Wait for FlexDeploy - Check this box to make the plugin remain in a 'Running' state until the FlexDeploy workflow completes, then mark the Jenkins build as failure or success based on the FlexDeploy workflow status. If workflow execution takes longer than 15 minutes, the plugin will stop polling and report success.
        7. Test Connection Button - This button can verify that your FlexDeploy URL and Credentials are valid.

        8. Inputs - This section is where you would define any workflow inputs you have configured.
        9. Input Code - The code of the workflow input to pass in.
        10. Value - The value to be passed in with the workflow input. You can use environment variables (Like BUILD_IDNUMBER) to pass in values.

          Info
          For a full list of available variables, take a look at this page.


        11. FlexFields - This section is where you would define any build FlexFields that need to be passed in for your build

FlexDeploy Configuration

  1. After uploading the FlexDeploy Jenkins Plugin to FlexDeploy, go to your Environment/Instance configuration for the Environment and Instance you plan to run this plugin in. You should see a page like this:
    Image Added
        1. Jenkins Username - The username to connect to Jenkins as.
        2. Jenkins Password - The password for the Jenkins User
        3. Jenkins URL - The URL of the Jenkins server to connect to.

  2. Once your Environment/Instance is configured, you're ready to use the Jenkins plugin in a workflow. Create a new workflow for your project to use, and add the retrieveArtifacts step from the Jenkins Plugin.
    Image Added
      1. Create a workflow input called inpBuildNumber.
        Image Added


      2. Drag in the plugin step, change the input type to script, and enter the name of the input we just created.
        Image Added

  3. Now, create the FlexDeploy project that Jenkins will execute. Once you choose the Build Workflow we just created, you should be able to see a project property called "Jenkins Job Name". Enter the name of your Jenkins job/project here.
    Image Added

  4. Once you've configured the workflow and the project property, you should be set up to do a build!

    Info
    If you want to use FlexDeploy to deploy an artifact build in Jenkins, simply set up a Post Build Trigger on your FlexDeploy project, and choose the Environment and Stream Name that you're using from Jenkins, then configure a deploy workflow to deploy a file from the FlexDeploy artifact repository.


Project Execution

  1. Go to your Jenkins server where you configured a project using the FlexDeploy plugin.
  2. Click "Build Now" and you should see the project start to execute.
  3. Now go back to your FlexDeploy server and navigate to the project you set up to get an artifact from Jenkins. Once the Jenkins build is finished, you should see FlexDeploy start building the project.
  4. From there you can use any of FlexDeploy's many plugins to manage the artifacts.