feat: enabled s2i for python (#1562)

* feat: enable s2i for python

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update zz_filesystem_generated.go

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: script

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2023-02-20 17:45:26 +01:00 committed by GitHub
parent 902eaecd57
commit 6d4565158b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8524 additions and 8505 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,7 @@ var DefaultBuilderImages = map[string]string{
"nodejs": "registry.access.redhat.com/ubi8/nodejs-16",
"typescript": "registry.access.redhat.com/ubi8/nodejs-16",
"quarkus": "registry.access.redhat.com/ubi8/openjdk-17",
"python": "registry.access.redhat.com/ubi8/python-39",
}
// DockerClient is subset of dockerClient.CommonAPIClient required by this package

View File

@ -64,9 +64,9 @@ func Test_BuildImages(t *testing.T) {
wantErr: true,
},
{
name: "Without builder - unsupported runtime - python",
name: "Without builder - supported runtime - python",
function: fn.Function{Runtime: "python"},
wantErr: true,
wantErr: false,
},
{
name: "Without builder - unsupported runtime - rust",

View File

@ -0,0 +1,3 @@
#!/bin/sh
exec python -m parliament "$(dirname "$0")"

3
templates/python/http/app.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec python -m parliament "$(dirname "$0")"

View File

@ -18,7 +18,7 @@ import (
var runtimeSupportMap = map[string][]string{
"node": {"pack", "s2i"},
"go": {},
"python": {"pack"},
"python": {"pack", "s2i"},
"quarkus": {"pack", "s2i"},
"springboot": {"pack"},
"typescript": {"pack", "s2i"},