Maintaining valid image references before a release

When images are released they will usually be copied to another image repository. If any build-time image references are used within component (for example, OLM bundles) any references will be invalid after releasing. To surmount this, Konflux enables your component nudges to be updated with image references which will be valid after release.

Configuring nudges for the released image repository targets

Procedure
  1. Configure your release plan admission for a release pipeline which will copy the images to a new repository.

  2. In the spec.data.mapping.components create a list of component mappings to the target repository

    Example partial ReleasePlanAdmission.yaml object

    apiVersion: appstudio.redhat.com/v1alpha1
    kind: ReleasePlanAdmission
    spec:
     applications:
      - demo-app (1)
     data:
       mapping:
         components: (2)
           - name: demo-component-1
             repository: target-image-repository-1
           - name: demo-component-2
             repository: target-image-repository-2
     origin: <dev-workspace> (3)
    1 A list of applications that will contain components to be released.
    2 A list containing the target repository for each component
    3 The development team workspace where the applications and components are defined.
  3. Using your preferred text editor, in the git repo for your nudged component, open the file that contains the pullspecs. In that file, update the image references to all images that will be released to the target repository from the RPA (the sha digests should remain unchanged). Commit this change.

    Once this change is merged, the nudged component will contain invalid references until all referenced images are released. In order to test the image in an environment, you will need to use a registry mirror like an ImageDigestMirrorSet.
Verification
  1. Commit a change to a nudging component, triggering a push event.

  2. After the build is completed, a pull request should be opened against your nudged component’s git repository.