diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85903fa11110c9d8d4f3de27fee90a5e006e6c78..bdea6ebbdd8a342112ca55270f935269dcfb1c72 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 0000000000000000000000000000000000000000..53559743ec12871471758e7db807fb24c175bb81 --- /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 6e56c6bd54a8137cbef5a7f31db82867ec6becf1..8fe98f35cf86cf34e062941aab89cc90bd4bba84 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 0000000000000000000000000000000000000000..aa69c38b1ad2e496ff7d2e33c00d3bf5c3d230df --- /dev/null +++ b/requirements-ai.txt @@ -0,0 +1 @@ +httpx>=0.27.0