Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set the right image for the release #283

Merged

Conversation

friedrichwilken
Copy link
Contributor

@friedrichwilken friedrichwilken commented Jan 10, 2024

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:

  • fix the image value when rendering nats-manger.yaml in a release (Create release ghaw).

Related issue(s)

At the moment in case of an release the image gets set to a default value of image: op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager:<version> in the nats-manager.yaml due to an unset IMG var. This commit changes that by setting the IMG. Also, the script was made more generic by removing references to nats and instead, pass the string nats as a var from the ghaw.
@friedrichwilken friedrichwilken requested a review from a team as a code owner January 10, 2024 09:58
@kyma-bot kyma-bot added area/ci Issues or PRs related to CI related topics size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 10, 2024
marcobebway
marcobebway previously approved these changes Jan 10, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Jan 10, 2024
@friedrichwilken
Copy link
Contributor Author

/cla-recheck

1 similar comment
@friedrichwilken
Copy link
Contributor Author

/cla-recheck

@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. and removed lgtm Looks good to me! labels Jan 10, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Jan 10, 2024
@kyma-bot kyma-bot merged commit 9793908 into kyma-project:main Jan 10, 2024
9 checks passed
@friedrichwilken friedrichwilken deleted the fix-wrong-image-in-release branch January 10, 2024 12:13
friedrichwilken added a commit to friedrichwilken/nats-manager that referenced this pull request Jan 10, 2024
* set the right image for the release

At the moment in case of an release the image gets set to a default value of image: op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager:<version> in the nats-manager.yaml due to an unset IMG var. This commit changes that by setting the IMG. Also, the script was made more generic by removing references to nats and instead, pass the string nats as a var from the ghaw.

* fix comment
kyma-bot pushed a commit that referenced this pull request Jan 10, 2024
* set the right image for the release

At the moment in case of an release the image gets set to a default value of image: op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager:<version> in the nats-manager.yaml due to an unset IMG var. This commit changes that by setting the IMG. Also, the script was made more generic by removing references to nats and instead, pass the string nats as a var from the ghaw.

* fix comment
@friedrichwilken friedrichwilken self-assigned this Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to CI related topics cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants