代码拉取完成,页面将自动刷新
同步操作将从 第四范式/k8s-device-plugin 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
---
##
## Variables that control the CI artifacts (private registry, for scanning and testing):
## CI_REGISTRY
## CI_REGISTRY_IMAGE
## CI_REGISTRY_USER
## CI_REGISTRY_PASSWORD
##
## Variables that control where NGC release artifacts go:
## NGC_REGISTRY
## NGC_REGISTRY_IMAGE
## NGC_REGISTRY_USER
## NGC_REGISTRY_TOKEN
##
## Variables that control where Docker Hub release artifacts go:
## REGISTRY_TOKEN
## REGISTRY_USER
## DOCKERHUB_REGISTRY_IMAGE
##
default:
image: docker:stable
services:
- docker:stable-dind
tags:
- type/docker
- docker/privileged
- cnt
- container-dev
- os/linux
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
stages:
- build
- test
- scan
- deploy
- release
.builddep_setup: &builddep_setup
- apk add --no-cache bash findutils libmagic curl make git
.testdep_setup: &testdep_setup
- apk add --no-cache bash make perl
.python_setup: &python_setup
- apk add --no-cache python3 python3-dev py3-pip py3-wheel
.dockerlogin_setup: &dockerlogin_setup
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
# tags pulled images with $CI_PROJECT_NAME to work-around issue with contamer's support for local scans.
.pull_images: &pull_images
- docker pull ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}-ubuntu16.04
- docker pull ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}-centos7
- docker pull ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}-ubi8
- docker tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}-ubuntu16.04 ${CI_PROJECT_NAME}:${CI_COMMIT_SHA}-ubuntu16.04
- docker tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}-centos7 ${CI_PROJECT_NAME}:${CI_COMMIT_SHA}-centos7
- docker tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}-ubi8 ${CI_PROJECT_NAME}:${CI_COMMIT_SHA}-ubi8
.ngc_release_login: &ngc_release_login
- 'docker login -u "${NGC_REGISTRY_USER}" -p "${NGC_REGISTRY_TOKEN}" "${NGC_REGISTRY}"'
.dockerhub_login: &dockerhub_login
- 'docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}"'
.build_action: &build_action
- make IMAGE="${CI_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_SHA}" all
- make IMAGE="${CI_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_SHA}" push
.test_action: &test_action
- "true"
.deploy_action: &deploy_action
- make IMAGE="${CI_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_SHA}" push-short
- make IMAGE="${CI_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_SHA}" push-latest
# contamer does not support local scans on images that contain a port number
.scan_action: &scan_action
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab-master.nvidia.com/sectooling/scanning/contamer.git
- cd contamer
- pip3 install -r requirements.txt
- python3 contamer.py -ls --fail-on-non-os ${CONTAMER_SUPPRESS_VULNS:+--suppress-vulns ${CONTAMER_SUPPRESS_VULNS}} -- ${CI_PROJECT_NAME}:${CI_COMMIT_SHA}-ubuntu16.04
- python3 contamer.py -ls --fail-on-non-os ${CONTAMER_SUPPRESS_VULNS:+--suppress-vulns ${CONTAMER_SUPPRESS_VULNS}} -- ${CI_PROJECT_NAME}:${CI_COMMIT_SHA}-centos7
- python3 contamer.py -ls --fail-on-non-os ${CONTAMER_SUPPRESS_VULNS:+--suppress-vulns ${CONTAMER_SUPPRESS_VULNS}} -- ${CI_PROJECT_NAME}:${CI_COMMIT_SHA}-ubi8
.release_action: &release_action
- make IMAGE="${NGC_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" all
- make IMAGE="${NGC_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" push
- make IMAGE="${NGC_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" push-short
- make IMAGE="${NGC_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" push-latest
.dockerhub_release_action: &dockerhub_release_action
- make IMAGE="${DOCKERHUB_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" all
- make IMAGE="${DOCKERHUB_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" push
- make IMAGE="${DOCKERHUB_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" push-short
- make IMAGE="${DOCKERHUB_REGISTRY_IMAGE}" VERSION="${CI_COMMIT_TAG}" push-latest
build:
stage: build
script:
- *builddep_setup
- *dockerlogin_setup
- *build_action
test:
stage: test
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip[ _-]tests?\]/i
- $SKIP_TESTS
script:
- *testdep_setup
- *test_action
scan:
stage: scan
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip[ _-]scans?\]/i
- $SKIP_SCANS
script:
- *builddep_setup
- *python_setup
- *dockerlogin_setup
- *pull_images
- *scan_action
deploy:
stage: deploy
script:
- *builddep_setup
- *dockerlogin_setup
- *pull_images
- *deploy_action
release:ngc:
stage: release
only:
- tags
script:
- 'echo Commit Tag: $CI_COMMIT_TAG ; [[ -n "$CI_COMMIT_TAG" ]] || exit 1'
- *builddep_setup
- *ngc_release_login
- *release_action
release:dockerhub:
stage: release
only:
- tags
script:
- *builddep_setup
- *dockerhub_login
- *dockerhub_release_action
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。