Skip to content

Commit

Permalink
add sys-filesystem gem into runtime for all builds. Add centos8 build
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaleta committed Sep 17, 2020
1 parent 828913b commit b80325c
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 18 deletions.
27 changes: 18 additions & 9 deletions .bonsai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ builds:
- "entity.system.arch == 'amd64'"
- "entity.system.platform == 'alpine'"
- "entity.system.platform_version.split('.')[0] == '3'"
- platform: "centos"
arch: "amd64"
asset_filename: "#{repo}_#{version}_ruby-2.4.4_centos_linux_amd64.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
- "entity.system.arch == 'amd64'"
- "entity.system.platform_family == 'rhel'"
- "parseInt(entity.system.platform_version.split('.')[0]) > 6"
- platform: "debian"
arch: "amd64"
asset_filename: "#{repo}_#{version}_ruby-2.4.4_debian_linux_amd64.tar.gz"
Expand All @@ -36,3 +27,21 @@ builds:
- "entity.system.arch == 'amd64'"
- "entity.system.platform_family == 'rhel'"
- "parseInt(entity.system.platform_version.split('.')[0]) == 6"
- platform: "centos7"
arch: "amd64"
asset_filename: "#{repo}_#{version}_ruby-2.4.4_centos7_linux_amd64.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
- "entity.system.arch == 'amd64'"
- "entity.system.platform_family == 'rhel'"
- "parseInt(entity.system.platform_version.split('.')[0]) == 7"
- platform: "centos8"
arch: "amd64"
asset_filename: "#{repo}_#{version}_ruby-2.4.4_centos8_linux_amd64.tar.gz"
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
filter:
- "entity.system.os == 'linux'"
- "entity.system.arch == 'amd64'"
- "entity.system.platform_family == 'rhel'"
- "parseInt(entity.system.platform_version.split('.')[0]) == 8"
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic
Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased
## [0.0.11] - 2020-09-17

### Added
- Add Centos8 build

### Fixed
- add libc6-compat libraries to Alpine builds
- add sys-filesystem gem based test

## [0.0.4] - 2019-01-16

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
cd ruby-install-0.7.0/ && \
make install && \
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem

RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.centos6
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
cd ruby-install-0.7.0/ && \
make install && \
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem

RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
cd ruby-install-0.7.0/ && \
make install && \
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem

RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile.centos8
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM centos:8

ARG RUBY_VERSION=2.4.4
ARG ASSET_VERSION=local_build
ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)'


RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl

RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \
tar -xzvf ruby-install-0.7.0.tar.gz && \
cd ruby-install-0.7.0/ && \
make install && \
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem

RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done

RUN mkdir /assets/ && \
export SENSU_ASSET="/assets/sensu-ruby-runtime_${ASSET_VERSION}_ruby-${RUBY_VERSION}_$(source /etc/os-release && echo $ID$VERSION_ID)_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \
tar -czf $SENSU_ASSET -C /opt/rubies/ruby-${RUBY_VERSION}/ .

ENV PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
cd ruby-install-0.7.0/ && \
make install && \
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem

RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debian9
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
cd ruby-install-0.7.0/ && \
make install && \
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi sys-filesystem

RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
Expand Down
16 changes: 12 additions & 4 deletions build_platforms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ mkdir -p scripts


# Debian platform
platform="debian" test_platforms="debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 centos:7" ./build_and_test_platform.sh
platform="debian" test_platforms="debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 centos:7 centos:8" ./build_and_test_platform.sh
retval=$?
if [[ retval -ne 0 ]]; then
exit $retval
fi
platform="debian9" test_platforms="debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 centos:7" ./build_and_test_platform.sh
platform="debian9" test_platforms="debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 centos:7 centos:8" ./build_and_test_platform.sh
retval=$?
if [[ retval -ne 0 ]]; then
exit $retval
Expand All @@ -31,12 +31,20 @@ if [[ retval -ne 0 ]]; then
fi

# CentOS platform
platform="centos" test_platforms="centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh
platform="centos" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh
retval=$?
if [[ retval -ne 0 ]]; then
exit $retval
fi
platform="centos7" test_platforms="centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh
# CentOS 7 platform
platform="centos7" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh
retval=$?
if [[ retval -ne 0 ]]; then
exit $retval
fi

# CentOS 8 platform
platform="centos8" test_platforms="centos:8 centos:7 debian:8 debian:9 debian:10 ubuntu:14.04 ubuntu:16.04 ubuntu:18.04" ./build_and_test_platform.sh
retval=$?
if [[ retval -ne 0 ]]; then
exit $retval
Expand Down

0 comments on commit b80325c

Please sign in to comment.