From cc5076f0bf1105200614144c8197afb88bf582f1 Mon Sep 17 00:00:00 2001 From: Maksym Zubrytskyi Date: Tue, 1 Feb 2022 09:28:29 +0200 Subject: [PATCH 1/2] added drone yml file --- .drone.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000000..b8e7c1c54fd --- /dev/null +++ b/.drone.yml @@ -0,0 +1,57 @@ +--- +# This pipeline chain would be used on each open pull request to build new ml_all docker image and validate unit tests +kind: pipeline +name: PR validation build + +platform: + arch: amd64 + os: linux + +clone: + disable: true + +steps: +- name: Build ml_all docker image for pull request + image: plugins/docker + commands: + - git clone https://github.com/logivations/deep_cv.git + - git checkout ${DRONE_PULL_REQUEST} + volumes: + - name: dockersock + path: /var/run/docker.sock + settings: + dockerfile: deep_cv/docker/MlAllDockerfile + context: deep_cv/docker/ + registry: quay.io + repo: quay.io/logivations/ml_all + privileged: true + tags: + - nav2_${DRONE_PULL_REQUEST} + username: + from_secret: DOCKER_QUAY_USERNAME + password: + from_secret: DOCKER_QUAY_PASSWORD + +- name: unit-tests validation + image: quay.io/logivations/ml_all:latest + commands: + - pwd + - cd /data/workspace && git clone https://github.com/logivations/deep_cv.git + - cd /data/workspace/deep_cv && pytest -v --color=yes --forked -n 2 --ignore-glob=**/disabled_tests/* lv/ + environment: + NVIDIA_VISIBLE_DEVICES: all + depends_on: + - Build ml_all docker image for pull request + +trigger: + event: + include: + - pull_request + +volumes: +- name: dockersock + host: + path: /var/run/docker.sock + +image_pull_secrets: +- dockerconfig_prd \ No newline at end of file From b43c96814cba0d3dfabb69f57f5bfc28d79b4305 Mon Sep 17 00:00:00 2001 From: Maksym Zubrytskyi Date: Tue, 1 Feb 2022 09:39:48 +0200 Subject: [PATCH 2/2] more updates to drone yaml file --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b8e7c1c54fd..6777de137f3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,8 +14,8 @@ steps: - name: Build ml_all docker image for pull request image: plugins/docker commands: - - git clone https://github.com/logivations/deep_cv.git - - git checkout ${DRONE_PULL_REQUEST} + - git clone https://github.com/logivations/deep_cv.git -b ${DRONE_PULL_REQUEST} + - sed -i "/ARG NAV2_DEFAULT_BRANCH=/c\ARG NAV2_DEFAULT_BRANCH=${DRONE_PULL_REQUEST}" /deep_cv/docker/MlAllDockerfile volumes: - name: dockersock path: /var/run/docker.sock