Skip to main content
Version: Release 24.3

OpenShift Container Plugin

The OpenShift container plugin allows you to automate the deployment and management of containerized applications on OpenShift.

note

In the release flow editor, container tasks have a blue border.

Prerequisites

  • OpenShift server running and accessible via HTTP(s)
  • Remote runner setup to run the container tasks

Set up Connection to OpenShift Server

  1. From the navigation pane, under CONFIGURATION, click Connections.
  2. Under HTTP server connections, next to OpenShift Configuration (Container), click add button. The New OpenShift Configuration (Container) page opens.
  3. In the Title field, enter the name of the configuration. This name will display in OpenShift tasks.
  4. In the URL field, enter the URL to access the server.
  5. In the Access Token field, enter the user token.
  6. If required, enter the proxy details.
  7. To test the connection, click Test.
  8. To save the configuration, click Save.

Create OpenShift Configuration

Create Resource (Container)

The Create Resource task automates the creation of OpenShift resources, such as pods, services, deployments, and other Kubernetes objects, to support the deployment and management of applications.

  1. In the release flow tab of a Release template, add a task of type OpenShift > Create Resource (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This helps you to route jobs to that particular Runner.
  4. In the Server field, select the configured server.
  5. In the OpenShift Project field, enter the project name. It uses the default project if it's not mentioned in the configuration file.
  6. In the Configuration location dropdown, select the location. The possible values are TaskInput or Git. The other fields are populated based on the selected location.

Create resource

Delete Resource (Container)

The Delete Resource task automates the deletion of OpenShift resources, such as pods, services, deployments, and other Kubernetes objects that are already created.

  1. In the release flow tab of a Release template, add a task of type OpenShift > Delete Resource (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This helps you to route jobs to that particular Runner.
  4. In the Server field, select the configured server.
  5. In the OpenShift Project field, enter the project name. It uses the default project if it's not mentioned in the configuration file.
  6. In the Configuration location dropdown, select the location. The possible values are TaskInput or Git. The other fields are populated based on the selected location.

Delete resource

Start Build (Container)

The Start Build task triggers a new build process for a specified application, compiling the source code and creating container images to be deployed on OpenShift.

  1. In the release flow tab of a Release template, add a task of type OpenShift > Start Build (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This helps you to route jobs to that particular Runner.
  4. In the Server field, select the configured server.
  5. In the OpenShift Project field, enter the project that is in the build configuration.
  6. In the Build config name field, enter the name of the build config from which the build needed to be started.
  7. In the Wait Timeout field, enter or select the maximum duration to wait in seconds for the build to complete. If the build does not finish within this time frame, it will abort with an error.

Start build

Image Tag (Container)

The Image Tag tags a specific container image with a new version or identifier, making it easier to manage and deploy different versions of the application on OpenShift.

  1. In the release flow tab of a Release template, add a task of type OpenShift > Image Tag (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This helps you to route jobs to that particular Runner.
  4. In the Server field, select the configured server.
  5. In the Source Project Name field, enter the project where the source image is.
  6. In the Source Image field, enter the image and tag name in the format <image_name>:<tag_name>. For example, alpine:latest.
  7. In the Target Project Name field, enter the project where the target image will be created. If you leave this field empty, the source project will be used.
  8. In the Target Image field, enter the image and tag name in the format <image_name>:<tag_name>. For example, alpine:latest.

Image tag

Update Deployment (Container)

The Update Deployment task modifies an existing deployment configuration, enabling updates to the application's container images, environment variables, and other settings, ensuring the deployment reflects the latest changes.

  1. In the release flow tab of a Release template, add a task of type OpenShift > Update Deployment (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This helps you to route jobs to that particular Runner.
  4. In the Server field, select the configured server.
  5. In the OpenShift Project field, enter the project where the deployment is.
  6. In the Deployment Name field, enter the name of the deployment from which build needed to be updated.
  7. In the Wait Timeout field, enter or select the maximum duration to wait in seconds for the build to complete. If the build does not finish within this time frame, it will abort with an error.

Update deployment