Compare commits

...

2 commits

Author SHA1 Message Date
f
fd95af3266 bulk builder
Some checks failed
continuous-integration/drone the build failed
2021-09-29 16:53:53 -03:00
f
ed4f2dbb8d platform 2021-09-29 16:53:31 -03:00
2 changed files with 29 additions and 0 deletions

View file

@ -3,6 +3,7 @@ ARG ALPINE_VERSION=3.13.6
FROM ${BASE_IMAGE}:${ALPINE_VERSION} FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
ENV PLATFORM=x86_64-linux-musl
ENV GEM=none ENV GEM=none
ENV VERSION=0 ENV VERSION=0
ENV SUTTY=sutty.nl ENV SUTTY=sutty.nl
@ -18,6 +19,7 @@ RUN gem install --no-user-install --no-document --source https://rubygems.org ge
COPY ./gem-compiler.sh /usr/local/bin/gem-compiler COPY ./gem-compiler.sh /usr/local/bin/gem-compiler
COPY ./bootstrap.sh /usr/local/bin/bootstrap COPY ./bootstrap.sh /usr/local/bin/bootstrap
COPY ./bulk-compiler.sh /usr/local/bin/bulk-compiler
RUN install -dm 2750 -o builder -g builder /srv/gems RUN install -dm 2750 -o builder -g builder /srv/gems
VOLUME /srv/gems VOLUME /srv/gems

27
bulk-compiler.sh Normal file
View file

@ -0,0 +1,27 @@
#!/bin/sh
set -e
test -n "${HTTP_BASIC_USER}"
test -n "${HTTP_BASIC_PASSWORD}"
test -n "${SUTTY}"
test -n "${PLATFORM}"
find build/ -type f |
sed -re "s|^build/([^/]+)/(.*)|&\tbuilt/${ALPINE_VERSION}/\1/\2\t\1\t\2|" |
while read BUILD BUILT GEM_NAME GEM_VERSION; do
test -f "${BUILT}" && continue
source "${BUILD}"
HTTP_BASIC_USER="${HTTP_BASIC_USER}" \
HTTP_BASIC_PASSWORD="${HTTP_BASIC_PASSWORD}" \
SUTTY="${SUTTY}" \
PLATFORM="${PLATFORM}" \
GEM_NAME="${GEM_NAME}" \
GEM_VERSION="${GEM_VERSION}" \
EXTRA_PKGS="${EXTRA_PKGS}" \
/usr/local/bin/bootstrap
dirname "${BUILT}" | xargs mkdir -p
touch "${BUILT}"
done