Set external release jobs to use Staging image construction #594
Set external release jobs to use Staging image construction #594JunAr7112 wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
7bc461b to
fa38475
Compare
Makefile
Outdated
|
|
||
| OUT_DIST ?= $(DIST) | ||
| OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(OUT_DIST) | ||
| OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(DIST) |
There was a problem hiding this comment.
we should not be dropping the use of $OUT_DIST here. It is needed for for the rhel driver image tags
There was a problem hiding this comment.
Earlier, when we publishing we would just use the rhel8/rhel9 tags in Staging jobs with tags. This change would still use the OUT_DIST for building the publishing template. Do we also want to use the OUT_DIST for the Staging?
I changed it to be more consistent with the practice in the other projects + the pre publishing changes format.
There was a problem hiding this comment.
I updated this to continue using the OUT_DIST. We will instead use the OUT_DIST for the source_version. I think this format might be simpler than the initial changes
.common-ci.yml
Outdated
| - if [[ "${PRECOMPILED}" == "true" ]]; then ./scripts/precompiled.sh push; else make push-${DIST}-${DRIVER_VERSION}; fi | ||
| - mkdir -p build-info | ||
| - echo "${CI_COMMIT_SHORT_SHA}-${DRIVER_VERSION}-${DIST} ${DRIVER_VERSION}-${OUT_DIST}" > build-info/${CI_PIPELINE_ID}-${DRIVER_VERSION}-${OUT_DIST}.txt | ||
| - echo "${VERSION}-${DRIVER_VERSION}-${DIST} ${DRIVER_VERSION}-${OUT_DIST}" > build-info/${CI_PIPELINE_ID}-${DRIVER_VERSION}-${OUT_DIST}.txt |
There was a problem hiding this comment.
Is this change necessary? Isn't VERSION already set to CI_COMMIT_SHORT_SHA?
There was a problem hiding this comment.
This change is not strictly needed, but makes testing easier with the NSPECT job (in case we are building an image with a different VERSION than CI_COMMIT_SHORT_SHA
There was a problem hiding this comment.
Then this change is not exactly relevant to what the PR wants to achieve. I'd prefer if we continued referencing CI_COMMIT_SHORT_SHA like before
98ffeb9 to
3b78728
Compare
| - .release | ||
| rules: | ||
| - if: $CI_COMMIT_TAG | ||
| variables: |
There was a problem hiding this comment.
Why do we need to remove this?
There was a problem hiding this comment.
I removed it to align with the Makefile rules we are aiming for:
ifeq ($(OUT_VERSION),)
OUT_IMAGE_VERSION = (DRIVER_TAG)
else
OUT_IMAGE_VERSION = (OUT_VERSION)-(DRIVER_TAG)
endif
OUT_DIST ?= (DIST)
OUT_IMAGE_TAG = (OUT_IMAGE_VERSION)-(OUT_DIST)
OUT_IMAGE = (OUT_IMAGE_NAME):(OUT_IMAGE_TAG)
That way we will push images of form (CI_COMMIT_SHORT_SHA)-(TAG)-(OUT_DIST)
rajathagasthya
left a comment
There was a problem hiding this comment.
This looks okay to me. I'd like someone else to also approve this before merging.
.common-ci.yml
Outdated
| - if [[ "${PRECOMPILED}" == "true" ]]; then ./scripts/precompiled.sh push; else make push-${DIST}-${DRIVER_VERSION}; fi | ||
| - mkdir -p build-info | ||
| - echo "${CI_COMMIT_SHORT_SHA}-${DRIVER_VERSION}-${DIST} ${DRIVER_VERSION}-${OUT_DIST}" > build-info/${CI_PIPELINE_ID}-${DRIVER_VERSION}-${OUT_DIST}.txt | ||
| - echo "${VERSION}-${DRIVER_VERSION}-${OUT_DIST} ${DRIVER_VERSION}-${OUT_DIST}" > build-info/${CI_PIPELINE_ID}-${DRIVER_VERSION}-${OUT_DIST}.txt |
There was a problem hiding this comment.
Is this change really needed? It seems to me that ${VERSION} and ${CI_COMMIT_SHORT_SHA} are already the same, so I'd prefer to keep it how it was initially. It's more intuitive. Same for ${DIST} and ${OUT_DIST}
There was a problem hiding this comment.
I think it's because Makefile constructs the source image tag from VERSION and not CI_COMMIT_SHORT_SHA directly. They are the same in the default case, but VERSION can be overridden and then it wouldn't match.
There was a problem hiding this comment.
This line just populates the build-info file though.
There was a problem hiding this comment.
@tariq1890 I can revert VERSION to CI_COMMIT_SHORT_SHA if that's preferred. However, OUT_DIST would definitely need to be referenced directly - it might not necessarily be equivalent to DIST.
release:ngc-rhcos4.17:
extends:
- .release:ngc
- .dist-rhel9
variables:
OUT_DIST: "rhcos4.17"
Signed-off-by: Arjun <agadiyar@nvidia.com>
No description provided.