mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Merge branch 'trigger-ci-on-mrs-only' into 'main'
Add workflow rule to only trigger on MRs See merge request nvidia/container-toolkit/container-toolkit!342
This commit is contained in:
commit
a082413d09
@ -34,6 +34,14 @@ stages:
|
|||||||
- scan
|
- scan
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "web"
|
||||||
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
- if: $CI_COMMIT_BRANCH =~ /^release-.*$/
|
||||||
|
- if: $CI_COMMIT_TAG && $CI_COMMIT_TAG != ""
|
||||||
|
|
||||||
.main-or-manual:
|
.main-or-manual:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
@ -22,6 +22,11 @@ build-dev-image:
|
|||||||
- make .build-image
|
- make .build-image
|
||||||
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
|
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
|
||||||
- make .push-build-image
|
- make .push-build-image
|
||||||
|
rules:
|
||||||
|
- !reference [.main-or-manual, rules]
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
when: manual
|
||||||
|
- when: always
|
||||||
|
|
||||||
.requires-build-image:
|
.requires-build-image:
|
||||||
image: "${BUILDIMAGE}"
|
image: "${BUILDIMAGE}"
|
||||||
|
@ -62,8 +62,10 @@ echo "LIBNVIDIA_CONTAINER_PACKAGE_VERSION=${libnvidia_container_version_tag//\~/
|
|||||||
echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}"
|
echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}"
|
||||||
echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}"
|
echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}"
|
||||||
echo "NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION=${nvidia_container_toolkit_version_tag//\~/-}"
|
echo "NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION=${nvidia_container_toolkit_version_tag//\~/-}"
|
||||||
if [[ "${libnvidia_container_version_tag}" != "${nvidia_container_toolkit_version_tag}" ]]; then
|
if [[ "${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}" != "${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}" ]]; then
|
||||||
>&2 echo "WARNING: The libnvidia-container and nvidia-container-toolkit versions do not match"
|
>&2 echo "WARNING: The libnvidia-container and nvidia-container-toolkit versions do not match"
|
||||||
|
>&2 echo "WARNING: lib: ${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}"
|
||||||
|
>&2 echo "WARNING: toolkit: ${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}"
|
||||||
fi
|
fi
|
||||||
echo "NVIDIA_CONTAINER_RUNTIME_VERSION=${nvidia_container_runtime_version}"
|
echo "NVIDIA_CONTAINER_RUNTIME_VERSION=${nvidia_container_runtime_version}"
|
||||||
echo "NVIDIA_CONTAINER_RUNTIME_TAG=${nvidia_container_runtime_tag}"
|
echo "NVIDIA_CONTAINER_RUNTIME_TAG=${nvidia_container_runtime_tag}"
|
||||||
|
Loading…
Reference in New Issue
Block a user