Closed DerekRoberts closed 5 months ago
I am trying to understand how it works.
I have a question.
I see the parameter "PROMOTE" is set to PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}
.
And another parameter "REGISTRY" is set to value: ghcr.io
And the ImageStream tag is from: "${REGISTRY}/${PROMOTE}"
tags:
- name: ${ZONE}-api
from:
kind: DockerImage
name: ${REGISTRY}/${PROMOTE}
So at the end is the Image that we want to use from ImageStream is: "${REGISTRY}/${PROMOTE}" = "ghcr.io/ghcr.io/${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}" (that has double ghcr.io in the path, or maybe my understanding is wrong)?
@ianliuwk1019
ImageStreams are using the PROMOTE and GHCR REGISTRY vars to import using: ${REGISTRY}/${PROMOTE}
.
CronJobs are using those imported images from image-registry.apps.silver.devops.gov.bc.ca/${OC_NAMESPACE}/${NAME}-${ZONE}-${COMPONENT}:${ZONE}-api
.
Keep the questions coming! :)
Thanks @DerekRoberts, now I get the imageStream import part. My question is, is this correct when string get substituted for the import path ("ghcr.io/ghcr.io/${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}")? Or, maybe it indeed needs double "ghcr.io/"?
@ianliuwk1019 Good catch! Yes, totally unnessary and removed. :)
@ianliuwk1019 Good catch! Yes, totally unnessary and removed. :)
Hi Derek, seem there are some "ghcr.io" left over at "PROMOTE" in merge-demo.yml and merge-main.yml.
@ianliuwk1019 Done! Those were not introduced by this PR, but more than easy enough to roll in. Does anything else come to mind?
Hi Derek, I wonder if we still need pr #564? Cause that's just changing when we add "prod" tag. But if both api and cron job point to the Openshift image stream, maybe we don't need the changes? It's still fine to use the latest test tag image?
@MCatherine1994 @ianliuwk1019 The two PRs address separate issues. This one is for image registry consistency, fixing nothing. The other is for the API and cronjob image mismatch.
PR https://github.com/bcgov/nr-fom/pull/564 is getting rolled into this one.
Resolves https://github.com/bcgov/nr-fom/issues/567.
Update: Also resolves https://github.com/bcgov/nr-fom/issues/562.
Thanks for the PR!
Any successful deployments (not always required) will be available below.
Once merged, code will be promoted and handed off to following workflow run.