Adds an arch builder environment

This commit is contained in:
zontreck 2024-10-05 19:52:25 -07:00
parent e051a81384
commit e99f725971
13 changed files with 128 additions and 16 deletions

View file

@ -8,7 +8,7 @@ RUN curl -sO https://dl.google.com/android/repository/commandlinetools-linux-${A
RUN unzip -qq /commandlinetools-linux-${ANDROID_SDK_VER}_latest.zip -d $ANDROID_SDK_ROOT
RUN rm -v /commandlinetools-linux-${ANDROID_SDK_VER}_latest.zip
ADD packages.txt /
FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild
@ -32,7 +32,7 @@ WORKDIR /root
RUN curl -s "https://get.sdkman.io" | bash
ADD packages.txt $HOME
COPY --from=ADK /packages.txt $HOME/packages.txt
# Use SDK Manager to install necessary components
RUN $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --update \

18
ArchAgent/Dockerfile Normal file
View file

@ -0,0 +1,18 @@
FROM git.zontreck.com/ariascreations/buildenvironments:archdev
WORKDIR /root/.gradle
ADD ./secret/gradle.properties ./gradle.properties
WORKDIR /root/.ssh
ADD ./secret/id_rsa ./id_rsa
ADD ./secret/id_rsa.pub ./id_rsa.pub
RUN chmod 0600 id_rsa
WORKDIR /
ADD ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/bin/bash", "/entrypoint.sh" ]

5
ArchAgent/entrypoint.sh Normal file
View file

@ -0,0 +1,5 @@
#!/bin/bash
echo $PUB | dart pub token add https://git.zontreck.com/api/packages/AriasCreations/pub
java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -jar /agent.jar -url "https://ci.zontreck.com" -secret "$ARCHAGENT" -name "Arch" -workDir "/builder"

View file

@ -6,8 +6,17 @@ LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
SHELL [ "/bin/bash", "-c" ]
ENV HOME /root
ENV DOCKER 1
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
USER root
WORKDIR /
RUN echo yes | pacman -Syu
RUN echo yes | pacman -S rsync zip unzip file
RUN pacman --noconfirm -Syu
RUN pacman --noconfirm -S rsync zip unzip file
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" >> /etc/locale.conf
RUN pacman --noconfirm -S locales
RUN locale-gen en_US.UTF-8

25
ArchBuilder/Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM git.zontreck.com/ariascreations/buildenvironments:arch
RUN pacman --noconfirm -S base-devel gcc nasm git curl wget make cmake automake autoconf archiso squashfs-tools file
RUN pacman --noconfirm -S ninja jdk17-openjdk sudo
RUN useradd -m yay
RUN usermod -a yay -G wheel
RUN echo "yay ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
WORKDIR /tmp
RUN git clone https://aur.archlinux.org/yay.git
RUN chown -R yay:yay /tmp/yay
WORKDIR /tmp/yay
RUN su - yay -c "cd /tmp/yay && makepkg --noconfirm -si"
WORKDIR /
RUN pacman --noconfirm -S python3 python-pip
RUN python3 -m pip config set global.break-system-packages true
RUN python3 -m pip install --upgrade pip
RUN yay --noconfirm -S pkg-config lldb cargo gradle mercurial

View file

@ -3,7 +3,7 @@ FROM git.zontreck.com/ariascreations/buildenvironments:debian
ENV GRADLE_VERSION 8.3
RUN apt-get install -y build-essential
RUN apt-get install -y cmake ninja-build openjdk-17-jdk nasm git curl wget openjdk-17-jre clang pkg-config libgtk-3-dev lldb libglu1-mesa libpulse0 cargo python3-dev libffi-dev libssl-dev apt-utils fonts-liberation libgtk-4-1 libgbm1 libu2f-udev libvulkan1 xdg-utils gradle nasm
RUN apt-get install -y cmake ninja-build openjdk-17-jdk nasm git curl wget openjdk-17-jre clang pkg-config libgtk-3-dev lldb libglu1-mesa libpulse0 cargo python3-dev libffi-dev libssl-dev apt-utils fonts-liberation libgtk-4-1 libgbm1 libu2f-udev libvulkan1 xdg-utils gradle nasm mercurial
WORKDIR /root/.ssh

34
Jenkinsfile vendored
View file

@ -181,6 +181,40 @@ pipeline {
}
}
stage("Build Arch Base") {
agent {
label "dockermain"
}
steps {
script {
sh '''
#!/bin/bash
docker build -t git.zontreck.com/ariascreations/buildenvironments:arch ArchBase
docker push git.zontreck.com/ariascreations/buildenvironments:arch
'''
}
}
}
stage("Build Arch Develop") {
agent {
label "dockermain"
}
steps {
script {
sh '''
#!/bin/bash
docker build -t git.zontreck.com/ariascreations/buildenvironments:archdev ArchBuilder
docker push git.zontreck.com/ariascreations/buildenvironments:archdev
'''
}
}
}
stage("Clean Up Caches") {
agent {
label "dockermain"

View file

@ -1,11 +1,5 @@
FROM git.zontreck.com/ariascreations/buildenvironments:arch
RUN echo yes | pacman -S python3 python-pip
RUN python3 -m pip config set global.break-system-packages true
RUN python3 -m pip install --upgrade pip
RUN pip install llbase autobuild llsd
FROM git.zontreck.com/ariascreations/buildenvironments:archdev
ADD fmodstudioapi20223linux.tar.gz /fmod.tar.gz
RUN echo yes | pacman -S base-devel cmake git
RUN pip install llbase autobuild

View file

@ -21,3 +21,13 @@ docker push git.zontreck.com/ariascreations/buildenvironments:linuxfs
docker build -t git.zontreck.com/ariascreations/buildenvironments:linux LinuxGeneralCompiler
docker push git.zontreck.com/ariascreations/buildenvironments:linux
docker build -t git.zontreck.com/ariascreations/buildenvironments:arch ArchBase
docker push git.zontreck.com/ariascreations/buildenvironments:arch
docker build -t git.zontreck.com/ariascreations/buildenvironments:archdev ArchBuilder
docker push git.zontreck.com/ariascreations/buildenvironments:archdev
docker build -t git.zontreck.com/ariascreations/buildenvironments:archmegapahit Megapahit/arch
docker push git.zontreck.com/ariascreations/buildenvironments:archmegapahit

View file

@ -26,5 +26,8 @@ docker push git.zontreck.com/ariascreations/buildenvironments:linux
docker build -t git.zontreck.com/ariascreations/buildenvironments:arch ArchBase
docker push git.zontreck.com/ariascreations/buildenvironments:arch
docker build -t git.zontreck.com/ariascreations/buildenvironments:archdev ArchBuilder
docker push git.zontreck.com/ariascreations/buildenvironments:archdev
docker build -t git.zontreck.com/ariascreations/buildenvironments:archmegapahit Megapahit/arch
docker push git.zontreck.com/ariascreations/buildenvironments:archmegapahit

View file

@ -15,6 +15,13 @@ services:
env_file: .env
networks:
- buildenv
arch:
image: git.zontreck.com/ariascreations/buildenvironments:archagent
container_name: arch
restart: unless-stopped
env_file: .env
networks:
- buildenv
networks:
buildenv:

View file

@ -9,4 +9,5 @@ docker build -t git.zontreck.com/ariascreations/buildenvironments:linuxfs Firest
docker build -t git.zontreck.com/ariascreations/buildenvironments:linux LinuxGeneralCompiler
docker build -t git.zontreck.com/ariascreations/buildenvironments:arch ArchBase
docker build -t git.zontreck.com/ariascreations/buildenvironments:archdev ArchBuilder
docker build -t git.zontreck.com/ariascreations/buildenvironments:archmegapahit Megapahit/arch

8
run.sh
View file

@ -14,9 +14,15 @@ cp "$PRIVKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa
cp "$PUBKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa.pub
cp "$GRADLEPROP" LinuxGeneralCompiler/FinalStage/secret/gradle.properties
cp -rv LinuxGeneralCompiler/FinalStage/secret ArchAgent/secret
echo -ne "\nARCHAGENT=" >> .env
cat "$ARCHAGENT" >> .env
docker build -t linuxagent LinuxGeneralCompiler/FinalStage
docker build -t archagent ArchAgent
rm -rf LinuxGeneralCompiler/FinalStage/secret
rm -rf ArchAgent/secret
docker-compose up -d