Skip to content

Commit 4a03974

Browse files
authored
Merge pull request #264 from NVIDIA/fix-nvidia-ci
[nvidia-ci] drop DIST suffix when looking up image tags
2 parents fab5315 + 24b08b6 commit 4a03974

File tree

3 files changed

+15
-60
lines changed

3 files changed

+15
-60
lines changed

.common-ci.yml

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,6 @@ trigger-pipeline:
6868
allow_failure: false
6969
- when: always
7070

71-
# The .dist- dummy steps set the DIST variable for the targeted distribution.
72-
.dist-ubi9:
73-
variables:
74-
DIST: "ubi9"
75-
CVE_UPDATES: "cyrus-sasl-lib"
76-
77-
.dist-ubuntu20.04:
78-
variables:
79-
DIST: "ubuntu20.04"
80-
CVE_UPDATES: "libsasl2-2 libsasl2-modules-db"
81-
8271
# Define the platform targets
8372
.platform-amd64:
8473
variables:
@@ -108,7 +97,7 @@ trigger-pipeline:
10897
.scan-base:
10998
stage: scan
11099
variables:
111-
IMAGE: "${CI_REGISTRY_IMAGE}/k8s-mig-manager:${CI_COMMIT_SHORT_SHA}-${DIST}"
100+
IMAGE: "${CI_REGISTRY_IMAGE}/k8s-mig-manager:${CI_COMMIT_SHORT_SHA}"
112101
IMAGE_ARCHIVE: "k8s-mig-manager.tar"
113102
except:
114103
variables:
@@ -127,44 +116,25 @@ trigger-pipeline:
127116
- .scan-base
128117

129118
# Define the scan targets
130-
scan-ubuntu20.04-amd64:
131-
extends:
132-
- .scan
133-
- .dist-ubuntu20.04
134-
- .platform-amd64
135-
needs:
136-
- image-ubuntu20.04
137-
138-
scan-ubuntu20.04-arm64:
119+
scan-image-amd64:
139120
extends:
140121
- .scan
141-
- .dist-ubuntu20.04
142-
- .platform-arm64
143-
needs:
144-
- image-ubuntu20.04
145-
- scan-ubuntu20.04-amd64
146-
147-
scan-ubi9-amd64:
148-
extends:
149-
- .scan
150-
- .dist-ubi9
151122
- .platform-amd64
152123
needs:
153-
- image-ubi9
124+
- image-distroless
154125

155-
scan-ubi9-arm64:
126+
scan-image-arm64:
156127
extends:
157128
- .scan
158-
- .dist-ubi9
159129
- .platform-arm64
160130
needs:
161-
- image-ubi9
162-
- scan-ubi9-amd64
131+
- image-distroless
132+
- scan-image-amd64
163133

164134
# Download the regctl binary for use in the release steps
165135
.regctl-setup:
166136
before_script:
167-
- export REGCTL_VERSION=v0.3.10
137+
- export REGCTL_VERSION=v0.9.2
168138
- apk add --no-cache curl
169139
- mkdir -p bin
170140
- curl -sSLo bin/regctl https://github.com/regclient/regclient/releases/download/${REGCTL_VERSION}/regctl-linux-amd64
@@ -201,7 +171,7 @@ scan-ubi9-arm64:
201171

202172
# Since OUT_IMAGE_NAME and OUT_IMAGE_VERSION are set, this will push the CI image to the
203173
# Target
204-
- make -f deployments/container/Makefile push-${DIST}
174+
- make -f deployments/container/Makefile push-image
205175

206176
# Define a staging release step that pushes an image to an internal "staging" repository
207177
# This is triggered for all pipelines (i.e. not only tags) to test the pipeline steps
@@ -215,16 +185,8 @@ scan-ubi9-arm64:
215185
OUT_REGISTRY: "${NGC_REGISTRY}"
216186
OUT_IMAGE_NAME: "${NGC_STAGING_REGISTRY}/k8s-mig-manager"
217187

218-
release:staging-ubi9:
219-
extends:
220-
- .release:staging
221-
- .dist-ubi9
222-
needs:
223-
- image-ubi9
224-
225-
release:staging-ubuntu20.04:
188+
release:staging:
226189
extends:
227190
- .release:staging
228-
- .dist-ubuntu20.04
229191
needs:
230-
- image-ubuntu20.04
192+
- image-distroless

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ include:
2929
- 'echo "Logging in to CI registry ${CI_REGISTRY}"'
3030
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
3131
script:
32-
- make -f deployments/container/Makefile build-${DIST}
32+
- make -f deployments/container/Makefile build-image
3333
needs:
3434
- trigger-pipeline
3535

.nvidia-ci.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,14 @@ variables:
6060
- !reference [.regctl-setup, before_script]
6161
- apk add --no-cache make bash
6262
- >
63-
regctl manifest get ${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}-${DIST} --list > /dev/null && echo "${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}-${DIST}" || ( echo "${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}-${DIST} does not exist" && sleep infinity )
63+
regctl manifest get ${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION} --list > /dev/null && echo "${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}" || ( echo "${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION} does not exist" && sleep infinity )
6464
script:
6565
- regctl registry login "${OUT_REGISTRY}" -u "${OUT_REGISTRY_USER}" -p "${OUT_REGISTRY_TOKEN}"
66-
- make -f deployments/container/Makefile IMAGE=${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}-${DIST} OUT_IMAGE=${OUT_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}-${DIST} push-${DIST}
66+
- make -f deployments/container/Makefile IMAGE=${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION} OUT_IMAGE=${OUT_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA} push-image
6767

68-
image-ubi9:
68+
image-distroless:
6969
extends:
7070
- .image-pull
71-
- .dist-ubi9
72-
73-
image-ubuntu20.04:
74-
extends:
75-
- .image-pull
76-
- .dist-ubuntu20.04
7771

7872
# We skip the integration tests for the internal CI:
7973
.integration:
@@ -118,8 +112,7 @@ image-ubuntu20.04:
118112
.update-nspect:
119113
stage: ngc-publish
120114
needs:
121-
- job: release:staging-ubi9
122-
- job: release:staging-ubuntu20.04
115+
- job: release:staging
123116
extends:
124117
- .ngc-publish-variables
125118
image:

0 commit comments

Comments
 (0)