From 4acbca171cdfa9923ffcc09ffd96710d78d0036e Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Wed, 18 Mar 2026 14:00:56 +0530 Subject: [PATCH] Add docker image for ai review repo --- .gitlab-ci.yml | 14 ++++++++++++++ Dockerfile.ai | 11 +++++++++++ README.md | 5 ++++- requirements-ai.txt | 1 + 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.ai create mode 100644 requirements-ai.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85903fa..bdea6eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,3 +55,17 @@ build_chromium: docker tag $CI_REGISTRY_IMAGE:chromium-master $CI_REGISTRY_IMAGE:chromium-latest; docker push $CI_REGISTRY_IMAGE:chromium-latest; fi + +build_ai: + stage: build + tags: + - generic_privileged + script: + - docker pull $CI_REGISTRY_IMAGE:ai-latest || true + - docker build --cache-from $CI_REGISTRY_IMAGE:ai-latest -t $CI_REGISTRY_IMAGE:ai-$CI_COMMIT_REF_NAME -f Dockerfile.ai . + - docker push $CI_REGISTRY_IMAGE:ai-$CI_COMMIT_REF_NAME + - | + if [ "$CI_COMMIT_REF_NAME" = "master" ]; then + docker tag $CI_REGISTRY_IMAGE:ai-master $CI_REGISTRY_IMAGE:ai-latest; + docker push $CI_REGISTRY_IMAGE:ai-latest; + fi diff --git a/Dockerfile.ai b/Dockerfile.ai new file mode 100644 index 0000000..5355974 --- /dev/null +++ b/Dockerfile.ai @@ -0,0 +1,11 @@ +FROM python:3.13-slim + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get -qq update && \ + apt-get install -qqy --no-install-recommends \ + git nodejs npm openssh-client + +RUN npm install -g @openai/codex + +COPY requirements-ai.txt /tmp/requirements-ai.txt +RUN pip install --root-user-action=ignore -q -r /tmp/requirements-ai.txt diff --git a/README.md b/README.md index 6e56c6b..8fe98f3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ docker-android-apps-cicd is an open-source fork of [gitlab-ci-android](https://g ## How to add docker images to projects -This repo contains 3 images slim, full and chromium. +This repo contains 4 images slim, full, chromium and ai. The slim image is small in size and can be used for tasks like updating projects from upstream, running rsync tasks, etc. As those tasks doesn't need many packages therefore slim docker image can be used @@ -16,12 +16,15 @@ The full image is used to build android apps. So it contains packages like pytho The chromium image is used to build our browser. +The ai image is used to setup an environment for ai-review pipeline job + To add it to the project for use add one of the following changes according to requirements to .gitlab-ci.yml file ``` image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:slim-latest image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:chromium-latest +image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:ai-latest ``` To use changes which are not from master branch change latest to branch name or use commit sha diff --git a/requirements-ai.txt b/requirements-ai.txt new file mode 100644 index 0000000..aa69c38 --- /dev/null +++ b/requirements-ai.txt @@ -0,0 +1 @@ +httpx>=0.27.0 -- GitLab