Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: add Alpine Linux 20 and 21 #3989

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions ansible/roles/docker/templates/alpine320.Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM alpine:3.20

ENV LC_ALL C
ENV USER {{ server_user }}
ENV JOBS {{ server_jobs | default(ansible_processor_vcpus) }}
ENV SHELL /bin/bash
ENV HOME /home/{{ server_user }}
ENV PATH /usr/local/venv/bin:/usr/lib/ccache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV NODE_COMMON_PIPE /home/{{ server_user }}/test.pipe
ENV NODE_TEST_DIR /home/{{ server_user }}/tmp
ENV OSTYPE linux-gnu
ENV OSVARIANT docker
ENV DESTCPU {{ arch }}
ENV ARCH {{ arch }}

RUN apk add --no-cache --upgrade apk-tools

RUN apk add --no-cache libstdc++

RUN apk add --no-cache --virtual .build-deps \
shadow \
binutils-gold \
curl \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python3 \
tar \
ccache \
openjdk21 \
git \
procps \
openssh-client-default \
py3-pip \
bash \
automake \
libtool \
autoconf

RUN python3 -m venv /usr/local/venv
RUN pip3 install tap2junit=={{ tap2junit_version }}

RUN addgroup -g {{ server_user_gid.stdout_lines[0] }} {{ server_user }}

RUN adduser -G {{ server_user }} -D -u {{ server_user_uid.stdout_lines[0] }} {{ server_user }}

VOLUME /home/{{ server_user }}/ /home/{{ server_user }}/.ccache

USER iojs:iojs

ENV CCACHE_TEMPDIR /home/iojs/.ccache/{{ item.name }}

CMD cd /home/iojs \
&& curl https://ci.nodejs.org/jnlpJars/agent.jar -O \
&& java -Xmx{{ server_ram|default('128m') }} \
-jar /home/{{ server_user }}/agent.jar \
-url {{ jenkins_url }} \
-name {{ item.name }} \
-secret {{ item.secret }}
62 changes: 62 additions & 0 deletions ansible/roles/docker/templates/alpine321.Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM alpine:3.21

ENV LC_ALL C
ENV USER {{ server_user }}
ENV JOBS {{ server_jobs | default(ansible_processor_vcpus) }}
ENV SHELL /bin/bash
ENV HOME /home/{{ server_user }}
ENV PATH /usr/local/venv/bin:/usr/lib/ccache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV NODE_COMMON_PIPE /home/{{ server_user }}/test.pipe
ENV NODE_TEST_DIR /home/{{ server_user }}/tmp
ENV OSTYPE linux-gnu
ENV OSVARIANT docker
ENV DESTCPU {{ arch }}
ENV ARCH {{ arch }}

RUN apk add --no-cache --upgrade apk-tools

RUN apk add --no-cache libstdc++

RUN apk add --no-cache --virtual .build-deps \
shadow \
binutils-gold \
curl \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python3 \
tar \
ccache \
openjdk21 \
git \
procps \
openssh-client-default \
py3-pip \
bash \
automake \
libtool \
autoconf

RUN python3 -m venv /usr/local/venv
RUN pip3 install tap2junit=={{ tap2junit_version }}

RUN addgroup -g {{ server_user_gid.stdout_lines[0] }} {{ server_user }}

RUN adduser -G {{ server_user }} -D -u {{ server_user_uid.stdout_lines[0] }} {{ server_user }}

VOLUME /home/{{ server_user }}/ /home/{{ server_user }}/.ccache

USER iojs:iojs

ENV CCACHE_TEMPDIR /home/iojs/.ccache/{{ item.name }}

CMD cd /home/iojs \
&& curl https://ci.nodejs.org/jnlpJars/agent.jar -O \
&& java -Xmx{{ server_ram|default('128m') }} \
-jar /home/{{ server_user }}/agent.jar \
-url {{ jenkins_url }} \
-name {{ item.name }} \
-secret {{ item.secret }}
2 changes: 2 additions & 0 deletions ansible/roles/docker/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ common_packages: [
packages: {
ubuntu2404: [
'docker.io',
'docker-buildx',
],
ubuntu2204: [
'docker.io',
'docker-buildx',
],
ubuntu2004: [
'docker.io',
Expand Down