Skip to content

Commit

Permalink
Distgen generated content
Browse files Browse the repository at this point in the history
  • Loading branch information
hrnciar committed Jun 12, 2024
1 parent bfc0c2d commit a4371c6
Show file tree
Hide file tree
Showing 24 changed files with 144 additions and 8 deletions.
16 changes: 16 additions & 0 deletions 2.7/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 2.7/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 2.7/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${FULL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.11-minimal/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.11-minimal/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.11-minimal/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${MINIMAL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.11/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.11/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.11/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${FULL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.12/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.12/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.12/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${FULL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.6/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.6/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.6/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${FULL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.8/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.8/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.8/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${FULL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.9-minimal/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.9-minimal/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.9-minimal/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${MINIMAL_WEB_APPS[@]})
Expand Down
16 changes: 16 additions & 0 deletions 3.9/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ function maybe_run_in_init_wrapper() {
fi
}

# Look for gunicorn>=20.1.0 to utilize gunicorn.conf.py
if is_gunicorn_installed && [[ -f "gunicorn.conf.py" ]]; then
python -c 'import gunicorn
ver = gunicorn.version_info
if (ver[0] >= 20 and ver[1] >= 1) or ver[0] > 20:
exit(0)'
ret=$?
grep -q "wsgi_app" gunicorn.conf.py
grep_result=$?
if [[ $ret -eq 0 ]] && [[ -f "gunicorn.conf.py" ]] && [[ $grep_result -eq 0 ]]; then
echo "--> Using gunicorn.conf.py"
fi
echo "---> Serving application with gunicorn ..."
exec gunicorn
fi

APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
Expand Down
1 change: 1 addition & 0 deletions 3.9/test/gunicorn-using-configfile-test-app
2 changes: 1 addition & 1 deletion 3.9/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a COMMON_WEB_APPS=({gunicorn-config-different-port,gunicorn-different-port,gunicorn-using-configfile,django-different-port,standalone,setup,setup-requirements,django,numpy,app-home,locale,pipenv,pipenv-and-micropipenv-should-fail,app-module,pyuwsgi-pipenv,micropipenv,standalone-custom-pypi-index}-test-app)
declare -a FULL_WEB_APPS=({setup-cfg,npm-virtualenv-uwsgi,mod-wsgi,pin-pipenv-version,micropipenv-requirements,poetry-src-layout}-test-app)
declare -a MINIMAL_WEB_APPS=()
declare -a WEB_APPS=(${COMMON_WEB_APPS[@]} ${FULL_WEB_APPS[@]})
Expand Down

0 comments on commit a4371c6

Please sign in to comment.