kyma-project / nats-manager

Apache License 2.0
5 stars 13 forks source link

set the right image for the release #283

Closed friedrichwilken closed 10 months ago

friedrichwilken commented 10 months ago

in the release of 1.0.3 on github the image was set to a wrong value:

image: op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager:1.0.3

but it should be:

image: europe-docker.pkg.dev/kyma-project/prod/nats-manager:1.0.3

in the create release ghaw the manifest gets rendered at this step:

      - name: Create and upload nats-manager.yaml and nats-default-cr.yaml
        env:
          KUSTOMIZE_VERSION: "v4.5.6"
        run: |
          ./.github/scripts/render_and_upload_manifests.sh ${{ github.event.inputs.version }} ${{ secrets.GITHUB_TOKEN }}

in the script render_and_upload_manifests.sh the rendering of the manifests happens by calling a make target:

MODULE_VERSION=${RELEASE_TAG} make render-manifest
echo "Generated nats-manager.yaml:"

The make target will automatically generate the image --if it was not set-- to op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager:

IMG_REGISTRY_PORT ?= $(MODULE_REGISTRY_PORT)
IMG_REGISTRY ?= op-skr-registry.localhost:$(IMG_REGISTRY_PORT)/unsigned/manager-images
IMG ?= $(IMG_REGISTRY)/$(MODULE_NAME)-manager:$(MODULE_VERSION)

which is then used to render the manifest:

.PHONY: render-manifest
render-manifest: manifests kustomize
    cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
    $(KUSTOMIZE) build config/default > nats-manager.yaml

This PR fixes this by setting the IMG to the right value.

Description

Changes proposed in this pull request:

Related issue(s)

friedrichwilken commented 10 months ago

/cla-recheck

friedrichwilken commented 10 months ago

/cla-recheck