From 40641489c4e2976969c9250925b6b2ab29e5652c Mon Sep 17 00:00:00 2001 From: steel <mael.acier@ensiie.fr> Date: Fri, 19 Jul 2024 00:05:20 +0200 Subject: [PATCH] initial commit --- .gitlab-ci.yml | 17 +++++++++++++++++ Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++ files/entrypoint.sh | 6 ++++++ files/hosts | 3 +++ files/sources.list | 4 ++++ renovate.json | 11 +++++++++++ 6 files changed, 83 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile create mode 100755 files/entrypoint.sh create mode 100644 files/hosts create mode 100644 files/sources.list create mode 100644 renovate.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..398def6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +stages: + - build + +variables: + IMAGE_TAG_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA + +build: + image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/docker:27.0.3 + stage: build + tags: + - dind + services: + - docker:27.0.3-dind + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build -t $IMAGE_TAG_SHA . + - docker push $IMAGE_TAG_SHA diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..de4d89d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,42 @@ +FROM debian:stable + +COPY files/sources.list /etc/apt/sources.list + +ARG DEBIAN_FRONTEND=noninteractive + +ENV http_proxy="http://proxy.runner.iiens.net:3128" +ENV https_proxy="http://proxy.runner.iiens.net:3128" +ENV HTTP_PROXY="http://proxy.runner.iiens.net:3128" +ENV HTTPS_PROXY="http://proxy.runner.iiens.net:3128" + +RUN apt-get update +RUN apt-get install -y apt-utils +RUN apt-get upgrade -y +RUN apt-get install -y make autoconf qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libavutil-dev libavcodec-dev libavformat-dev libmpv-dev cmake clang clang-format gcc g++ libomp-dev libsdl2-dev libsdl2-image-dev xxd mkvtoolnix libcurl4-openssl-dev libsqlite3-dev manpages build-essential man-db python3 python3-pip php wget ca-certificates curl gnupg openssh-client git iputils-ping qt6-base-dev qt6-declarative-dev qt6-multimedia-dev lsb-release + +# Node +RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - +RUN apt-get install -y nodejs +# https://github.com/nodejs/corepack/issues/447 +RUN npm install -g corepack@0.24.1 +RUN corepack enable +RUN yarn config set proxy http://proxy.runner.iiens.net:3128 +RUN yarn config set https-proxy http://proxy.runner.iiens.net:3128 + +ENV RUSTUP_HOME=/opt/rust +ENV CARGO_HOME=/opt/rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh +RUN chmod +x ./rustup.sh +RUN ./rustup.sh -y --no-modify-path + +COPY files/hosts /etc/hosts + +# SSH +# Network is unreachable, commented +RUN mkdir -p ~/.ssh +RUN ssh-keyscan -t rsa deploy.runner.iiens.net >> ~/.ssh/known_hosts +RUN ssh-keyscan -t rsa perso3.runner.iiens.net >> ~/.ssh/known_hosts + +# Entrypoint, where we can source wanted environment variables / scripts +COPY files/entrypoint.sh /root/entrypoint.sh +ENTRYPOINT /root/entrypoint.sh \ No newline at end of file diff --git a/files/entrypoint.sh b/files/entrypoint.sh new file mode 100755 index 0000000..1f72b2f --- /dev/null +++ b/files/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +export RUSTUP_HOME=/opt/rust +export CARGO_HOME=/opt/rust +source $CARGO_HOME/env +exec /bin/bash diff --git a/files/hosts b/files/hosts new file mode 100644 index 0000000..99d4eba --- /dev/null +++ b/files/hosts @@ -0,0 +1,3 @@ +10.42.200.4 http-proxy.iiens.net +10.42.200.17 debian.iiens.net +10.42.200.17 security.debian.iiens.net diff --git a/files/sources.list b/files/sources.list new file mode 100644 index 0000000..ee8f5fd --- /dev/null +++ b/files/sources.list @@ -0,0 +1,4 @@ +deb http://debian.apt.iiens.net/debian/ bookworm main contrib non-free non-free-firmware +deb http://debian.apt.iiens.net/debian/ bookworm-updates main contrib non-free non-free-firmware +deb http://debian.apt.iiens.net/debian/ bookworm-backports main contrib non-free non-free-firmware +deb http://security.debian.apt.iiens.net/debian-security/ bookworm-security main contrib non-free non-free-firmware diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..90b5b3a --- /dev/null +++ b/renovate.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "ignoreTests": true, + "patch": { + "automerge": true, + "automergeType": "branch" + } +} \ No newline at end of file -- GitLab