Creating a release
A Release object informs Konflux that an Application’s
Snapshot is ready to be released, in accordiance
with its associated ReleasePlan.
Creating a Release object
The development team creates a Release object in the developer tenant namespace. The Release object includes a reference to the application snapshot that the development team wants to release, along with release plan that will be used to release the application.
-
You have an existing Development tenant namespace.
-
You have completed the steps listed in the Getting started in the CLI page.
-
You have completed the steps for creating a ReleasePlanAdmission and a matching ReleasePlan.
-
Create a
Release.yamlobject locally.Example
Release.yamlobject for a manually created releaseapiVersion: 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 Releaseobject 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. -
In the development tenant namespace, create the
Releaseobject using thekubectlcommand line:$ kubectl create -f Release.yaml
-
In the Konflux UI, select the Applications tab
-
Click on the application that is being released
-
Click on the Releases tab
-
See the recent releases that have been created for the application.
-
You can find a link to the release pipeline run by clicking on the name of the release that you created.
"Re-triggering" a Release
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.
|
-
Create a new
Release.yamlobject locally, using similar values to the originalReleaseobject.-
Use
kubectlto obtain the data of an existingReleaseobject:$ kubectl get release <release-name> -n <dev-tenant-namespace> -o yaml > Release.yaml -
Alternatively, use kubectl-neat to remove unnecessary fields from the
Releaseobject:$ kubectl neat get release <release-name> -n <dev-tenant-namespace> -o yaml > Release.yaml
-
-
Remove the following fields from the
Release.yamlobject:-
metadatafields:-
annotations -
creationTimestamp -
finalizers -
generation -
name -
ownerReferences -
resourceVersion -
uid
-
-
status- remove entirely or set its value to{}
-
-
Verify that the
Release.yamlobject is valid:Example
Release.yamlobject for a manually created releaseapiVersion: 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 Releaseobject 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. -
Create the new
Releaseobject using the data inRelease.yaml:$ kubectl create -f Release.yaml
-
In the Konflux UI, select the Applications tab
-
Click the released application
-
Click the Releases tab
-
View the recent releases created for the application
-
Click the name of the release to view the results of its release pipeline