Skip to content

Commit

Permalink
ansible: add Alpine Linux 20 and 21
Browse files Browse the repository at this point in the history
Closes: #3988
  • Loading branch information
targos committed Dec 22, 2024
1 parent 8b6d1f8 commit 911da1f
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
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 }}

0 comments on commit 911da1f

Please sign in to comment.