Re-trigger a release manually

Release objects create workloads with a finite lifecycle. Once created, a Release object’s spec field cannot be modified. To "re-trigger" a release, create a new instance of the desired Release object using the same values in the spec field.

Creating multiple Release objects for the same snapshot can result in duplicate actions taken during the release process. Consult with the team managing the release pipeline before creating a new Release object for a given snapshot.
Procedures
  1. Create a new Release.yaml object locally, using similar values to the original Release object.

    1. Use kubectl to obtain the data of an existing Release object:

      $ kubectl get release <release-name> -n <dev-tenant-namespace> -o yaml > Release.yaml
    2. Alternatively, use kubectl-neat to remove unnecessary fields from the Release object:

      $ kubectl neat get release <release-name> -n <dev-tenant-namespace> -o yaml > Release.yaml
  2. Remove the following fields from the Release.yaml object:

    1. metadata fields:

      1. annotations

      2. creationTimestamp

      3. finalizers

      4. generation

      5. name

      6. ownerReferences

      7. resourceVersion

      8. uid

    2. status - remove entirely or set its value to {}

  3. Verify that the Release.yaml object is valid:

    Example Release.yaml object for a manually created release

    apiVersion: appstudio.redhat.com/v1alpha1
    kind: Release
    metadata:
     generateName: <name-of-this-release-prefix> (1)
     namespace: dev-tenant-namespace (2)
     labels:
       release.appstudio.openshift.io/automated: "false" (3)
       release.appstudio.openshift.io/author: my-userid (4)
    spec:
     releasePlan: <release-plan-name> (5)
     snapshot: <application-snapshot-name> (6)
     data: <key> (7)
    1 The prefix of the release’s name. Konflux will append a unique suffix when the Release object is created.
    2 The development team’s tenant namespace.
    3 Label indicating that the release was not automatically created by Konflux. This value must be set to "false" using quotation marks.
    4 The ID of the user who created the release. This is required for manually created releases.
    5 The name of the release plan specifying the pipeline to run.
    6 The name of the application snapshot that you want to release.
    7 Optional: An unstructured key used for providing data for the managed release Pipeline.
  4. Create the new Release object using the data in Release.yaml:

    $ kubectl create -f Release.yaml
Verification
  1. In the Konflux UI, select the Applications tab

  2. Click the released application

  3. Click the Releases tab

  4. View the recent releases created for the application

  5. Click the name of the release to view the results of its release pipeline