bulk builder
Some checks failed
continuous-integration/drone the build failed

This commit is contained in:
f 2021-09-29 16:53:53 -03:00
parent ed4f2dbb8d
commit fd95af3266
2 changed files with 28 additions and 0 deletions

View file

@ -19,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 ./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
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