support multiple ruby versions
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2022-06-04 15:27:25 -03:00
parent 2cebac5f7c
commit 5694d1b1b4
2 changed files with 24 additions and 12 deletions

View file

@ -7,10 +7,12 @@ pipeline:
repo: registry.nulo.in/sutty/containers-gem-compiler repo: registry.nulo.in/sutty/containers-gem-compiler
cache_from: registry.nulo.in/sutty/containers-gem-compiler cache_from: registry.nulo.in/sutty/containers-gem-compiler
tags: tags:
- ${ALPINE_VERSION} - ${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
- latest - latest
build_args: build_args:
- ALPINE_VERSION=${ALPINE_VERSION} - ALPINE_VERSION=${ALPINE_VERSION}
- RUBY_VERSION=${RUBY_VERSION}
- RUBY_PATCH=${RUBY_PATCH}
- BASE_IMAGE=registry.nulo.in/sutty/containers-sdk-ruby - BASE_IMAGE=registry.nulo.in/sutty/containers-sdk-ruby
secrets: secrets:
- docker_password - docker_password
@ -18,8 +20,19 @@ pipeline:
branch: antifascista branch: antifascista
event: push event: push
matrix: matrix:
ALPINE_VERSION: include:
- 3.16.0 - ALPINE_VERSION: 3.16.0
- 3.15.4 RUBY_VERSION: 3.1
- 3.14.6 RUBY_PATCH: 2
- 3.13.10 - ALPINE_VERSION: 3.15.4
RUBY_VERSION: 3.0
RUBY_PATCH: 4
- ALPINE_VERSION: 3.14.6
RUBY_VERSION: 2.7
RUBY_PATCH: 6
- ALPINE_VERSION: 3.13.10
RUBY_VERSION: 2.7
RUBY_PATCH: 6
- ALPINE_VERSION: 3.13.6
RUBY_VERSION: 2.7
RUBY_PATCH: 6

View file

@ -1,6 +1,8 @@
ARG ALPINE_VERSION=3.13.6 ARG RUBY_VERSION=2.7
ARG BASE_IMAGE=sutty/sdk-ruby ARG RUBY_PATCH=6
FROM ${BASE_IMAGE}:${ALPINE_VERSION} ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/sdk-ruby
FROM ${BASE_IMAGE}:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
ENV PLATFORM=x86_64-linux-musl ENV PLATFORM=x86_64-linux-musl
@ -12,9 +14,6 @@ ENV HTTP_BASIC_PASSWORD=gibberish
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1 ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1
ENV EXTRA_PKGS='' ENV EXTRA_PKGS=''
RUN id
RUN gem env
RUN ls -hal /usr/lib/ruby/gems/2.7.0
RUN gem install --no-user-install --no-document --source https://rubygems.org geminabox gem-compiler RUN gem install --no-user-install --no-document --source https://rubygems.org geminabox gem-compiler
COPY ./gem-compiler.sh /usr/local/bin/gem-compiler COPY ./gem-compiler.sh /usr/local/bin/gem-compiler