Skip to content
Closed

4.0 #190

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/openshift-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
issue_comment:
types:
- created
jobs:
openshift-tests:
# This job only runs for '[test] pull request comments by owner, member
name: "RHEL9 tests: imagestream ${{ matrix.version }}"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
version: [ "2.5-ubi8", "3.1-ubi8", "3.0-ubi9", "3.1-ubi9", "3.3-ubi8", "3.3-ubi9" ]

if: |
github.event.issue.pull_request
&& contains(github.event.comment.body, '[test]')
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
steps:
- uses: sclorg/testing-farm-as-github-action@main
with:
api_key: ${{ secrets.TF_INTERNAL_API_KEY }}
compose: "RHEL-9.4.0-Nightly"
git_url: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
git_ref: "master"
tf_scope: "private"
tmt_plan_regex: "rhel9-openshift-pytest"
update_pull_request_status: true
pull_request_status_name: "RHEL9-OpenShift-4 - imagestream test ${{ matrix.version }}"
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.issue.number }};OS=rhel9;SINGLE_VERSION=${{ matrix.version }};TEST_NAME=test-openshift-pytest"
22 changes: 3 additions & 19 deletions .s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ echo "---> Building your Ruby application from source ..."
if [ -f Gemfile ]; then
ADDTL_BUNDLE_ARGS="--retry 2"
if [ -f Gemfile.lock ]; then
# This is new in version 3.0
# [DEPRECATED] The `--deployment` flag is deprecated because it relies
# on being remembered across bundler invocations,
# which bundler will no longer do in future versions.
# Instead please use `bundle config set --local deployment 'true'`,
# and stop using this flag
bundle config --local deployment 'true'
bundle config set --local deployment 'true'
fi

if [[ "$RAILS_ENV" == "development" || "$RACK_ENV" == "development" ]]; then
Expand All @@ -26,21 +20,11 @@ if [ -f Gemfile ]; then
fi

if [ -n "$BUNDLE_WITHOUT" ]; then
# [DEPRECATED] The `--without` flag is deprecated because
# it relies on being remembered across bundler invocations,
# which bundler will no longer do in future versions.
# Instead please use `bundle config set --local without ''test''`,
# and stop using this flag
bundle config --local without "$BUNDLE_WITHOUT"
bundle config set --local without "$BUNDLE_WITHOUT"
fi

echo "---> Running 'bundle install ${ADDTL_BUNDLE_ARGS}' ..."
# [DEPRECATED] The `--path` flag is deprecated because
# it relies on being remembered across bundler invocations,
# which bundler will no longer do in future versions.
# Instead please use `bundle config set --local path './bundle'`,
# and stop using this flag
bundle config --local path './bundle'
bundle config set --local path './bundle'
bundle install ${ADDTL_BUNDLE_ARGS}

echo "---> Cleaning up unused ruby gems ..."
Expand Down
15 changes: 13 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end


# 4.0 made these non-default
gem 'logger'
gem 'bigdecimal'
gem 'ostruct'
gem 'tsort'
gem 'mutex_m'
gem 'benchmark'
gem 'base64'
# Rubyzip 3.0 will introduce breaking changes, pin it
gem 'rubyzip', '~> 2.3.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6'
# Support postgresql as a database for Active Record
gem 'pg', '~> 1.2.0'
gem 'pg'
# Support sqlite3 as a database for Active Record
gem 'sqlite3'
# Support redis as a key-value store for Action Cable
Expand All @@ -18,6 +27,8 @@ gem 'redis'
gem 'puma'
# Use SCSS for stylesheets
gem 'sass-rails'
# To prevent https://github.com/sass/sassc-ruby/issues/146
gem "sassc", "~> 2.1", "< 2.2"
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# See https://github.com/rails/execjs#readme for more supported runtimes
Expand Down
47 changes: 32 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ GEM
zeitwerk (~> 2.3)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (4.0.1)
bindex (0.8.1)
builder (3.2.4)
byebug (11.1.3)
Expand All @@ -81,7 +84,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
digest (3.1.1)
Expand All @@ -99,6 +102,7 @@ GEM
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -111,8 +115,9 @@ GEM
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.15.0)
mini_portile2 (2.8.9)
minitest (5.26.2)
mutex_m (0.3.0)
net-imap (0.2.2)
digest
net-protocol
Expand All @@ -127,14 +132,15 @@ GEM
net-protocol
timeout
nio4r (2.7.0)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
nokogiri (1.19.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
pg (1.2.3)
ostruct (0.6.3)
pg (1.6.3)
public_suffix (4.0.7)
puma (6.4.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
racc (1.8.1)
rack (2.2.8)
rack-test (2.1.0)
rack (>= 1.3)
Expand Down Expand Up @@ -169,15 +175,15 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (5.0.8)
redis (5.1.0)
redis-client (>= 0.17.0)
redis-client (0.19.1)
connection_pool
regexp_parser (2.8.3)
regexp_parser (2.9.0)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
sassc (2.1.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
Expand All @@ -199,11 +205,13 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.4)
strscan (3.0.7)
sqlite3 (2.0.2)
mini_portile2 (~> 2.8.0)
strscan (3.1.0)
thor (1.2.2)
tilt (2.3.0)
timeout (0.4.0)
tsort (0.2.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
Expand All @@ -221,29 +229,38 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.12)
zeitwerk (2.6.13)

PLATFORMS
ruby

DEPENDENCIES
base64
benchmark
bigdecimal
byebug
capybara
coffee-rails
ffi (>= 1.15.1)
jbuilder
listen
logger
matrix
mutex_m
net-smtp
pg (~> 1.2.0)
ostruct
pg
puma
rails (~> 6)
redis
rubyzip (~> 2.3.0)
sass-rails
sassc (~> 2.1, < 2.2)
selenium-webdriver
spring
spring-watcher-listen
sqlite3
tsort
turbolinks
tzinfo-data
uglifier
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.PHONY: test-openshift-pytest
test-openshift-pytest:
cd tests && PYTHONPATH=$(CURDIR) python3.12 -m pytest -s -rA --showlocals -vv test_*.py
15 changes: 6 additions & 9 deletions openshift/templates/rails-postgresql-persistent.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
],
"postCommit": {
"script": "bundle exec rake test"
}
]
}
},
{
Expand Down Expand Up @@ -180,7 +177,7 @@
"initContainers": [
{
"name": "ruby-init-container",
"image": " ",
"image": "${NAME}:latest",
"command": [
"./migrate-database.sh"
],
Expand Down Expand Up @@ -260,7 +257,7 @@
"containers": [
{
"name": "${NAME}",
"image": " ",
"image": "${NAME}:latest",
"ports": [
{
"containerPort": 8080
Expand Down Expand Up @@ -443,7 +440,7 @@
"containers": [
{
"name": "postgresql",
"image": " ",
"image": "postgresql:${POSTGRESQL_VERSION}",
"ports": [
{
"containerPort": 5432
Expand Down Expand Up @@ -531,9 +528,9 @@
{
"name": "RUBY_VERSION",
"displayName": "Ruby Version",
"description": "Version of Ruby image to be used (3.0-ubi8 by default).",
"description": "Version of Ruby image to be used (3.3-ubi9 by default).",
"required": true,
"value": "3.0-ubi8"
"value": "3.3-ubi9"
},
{
"name": "POSTGRESQL_VERSION",
Expand Down
Loading