From 9295fc20783ef10bf2fe9a02a2daef330cc74fdd Mon Sep 17 00:00:00 2001 From: light7734 Date: Mon, 14 Oct 2024 12:57:37 +0330 Subject: [PATCH] cicd: add dockerfile image --- .drone.yml | 22 ++++++++++------------ tools/docker/linux_amd64 | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 tools/docker/linux_amd64 diff --git a/.drone.yml b/.drone.yml index 778ab94..b102aab 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,23 +10,21 @@ workspace: path: /opt steps: - - name: install_dependencies - image: ubuntu:latest + - name: setup_image + image: docker:latest commands: - - apt update - - apt-get install -y build-essential cmake clang clang-tidy gcc g++ python3 python3-pip python3.12-venv + - docker build -t ubuntu_amd64 -f ./tools/docker/linux_amd64 . - name: setup_conan - image: ubuntu:latest + image: ubuntu_amd64 environment: CONAN_REVISIONS_ENABLED: "1" commands: - - python3 -m venv /opt/venv - . /opt/venv/bin/activate - pip install conan==2.5.0 - name: echo_info - image: ubuntu:latest + image: ubuntu_amd64 commands: - pip --version - python --version @@ -39,7 +37,7 @@ steps: - clang-format --version - name: build_gcc - image: ubuntu:latest + image: ubuntu_amd64 commands: - rm -rv ./build - export CC=$(which gcc) @@ -53,7 +51,7 @@ steps: - ./build/Release/modules/light/light - name: build_clang - image: ubuntu:latest + image: ubuntu_amd64 commands: - rm -rv ./build - export CC=$(which clang) @@ -67,16 +65,16 @@ steps: - ./build/Release/modules/light/light - name: static_analysis - image: ubuntu:latest + image: ubuntu_amd64 commands: - echo "[TODO] Implement static analysis" - name: run_tests - image: ubuntu:latest + image: ubuntu_amd64 commands: - echp "[TODO] Implement tests" - name: report_coverage - image: ubuntu:latest + image: ubuntu_amd64 commands: - echp "[TODO] Implement coverage report" diff --git a/tools/docker/linux_amd64 b/tools/docker/linux_amd64 new file mode 100644 index 0000000..e3d206e --- /dev/null +++ b/tools/docker/linux_amd64 @@ -0,0 +1,15 @@ +FROM ubuntu:latest + +RUN apt update +RUN apt-get install -y \ + build-essential \ + cmake \ + clang \ + clang-tidy \ + gcc \ + g++ \ + python3 \ + python3-pip \ + python3.12-venv + +RUN python3 -m venv /opt/venv