Container image creation tool.
CEKit helps to build container images from image definition files with strong focus on modularity and code reuse.
- Building container images from YAML image definitions
- Integration/unit testing of images
License: MIT License
Looks good thanks. Can you add an issue (not sure whether best here or in cekit) to update the hardcoded version to use CEKits for the next release?
Originally posted by @rnc in #57 (comment)
The timeout is hardcoded to 10secs and can't be configured.
Something like "Then path foo should exist", "Then path bar should not exist"; "Then path baz must be a regular file".
We have a static check for container image labels ("@then(u'the image should contain label {label}')"); it would be good to have a similar one for environment variables.
We have testcases that check for a certain number of occurrences of a message.
These seem new! In my terminal output when running a "behave test":
2021-05-24 10:08:25,965 collector.py:41 INFO Fetching common steps from 'https://github.com/cekit/behave-test-steps.git'.
2021-05-24 10:08:26,655 collector.py:73 INFO Collecting finished!
steps/container.py:170: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if retcode is not 0:
steps/container_steps.py:255: SyntaxWarning: "is" with a literal. Did you mean "=="?
if len(output) is 0:
/home/jon/rh/git/images/openjdk/target/test/steps/steps.py:66: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if retcode is not 0:
/home/jon/rh/git/images/openjdk/target/test/steps/container.py:170: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if retcode is not 0:
steps/steps.py:66: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if retcode is not 0:
Describe the bug
I have a simple behave tests that execute fairly fast commands in my container to verify if the configuration is correct:
Feature: Common tests for Kogito images
Scenario: Verify if Kogito user is correctly configured
When container is started with command sh
Then run sh -c 'echo $USER' in container and check its output for kogito
And run sh -c 'echo $HOME' in container and check its output for /home/kogito
And run sh -c 'id' in container and check its output for uid=1001(kogito) gid=0(root) groups=0(root),1001(kogito)
Then when running with cekit behave command
I got the process hanging in:
2024-04-10 13:11:59,990 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:11:59,990 behave_tester.py:55 DEBUG Checking CEKit test runner dependencies...
2024-04-10 13:11:59,991 tools.py:509 DEBUG Checking if 'python-behave' dependency is provided...
2024-04-10 13:11:59,991 tools.py:513 DEBUG Required CEKit library 'python-behave' was found as a 'behave' module!
2024-04-10 13:11:59,991 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:11:59,991 behave_runner.py:34 DEBUG Running behave in '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test'.
2024-04-10 13:11:59,991 behave_runner.py:77 DEBUG Running behave tests with args '['/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test', '--junit', '--junit-directory', 'results', '--no-skipped', '-t', '~ignore', '-D', 'IMAGE=quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT', '-t', '@quay.io,@quay.io/kiegroup/kogito-base-builder', '-t', '~ci ']'.
2024-04-10 13:11:59,992 behave_runner.py:81 DEBUG behave args: ['/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test', '--junit', '--junit-directory', 'results', '--no-skipped', '-t', '~ignore', '-D', 'IMAGE=quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT', '-t', '@quay.io,@quay.io/kiegroup/kogito-base-builder', '-t', '~ci ']
@quay.io/kiegroup/kogito-data-index-ephemeral @quay.io/kiegroup/kogito-data-index-postgresql @quay.io/kiegroup/kogito-jit-runner @quay.io/kiegroup/kogito-jobs-service-ephemeral @quay.io/kiegroup/kogito-jobs-service-postgresql @quay.io/kiegroup/kogito-management-console @quay.io/kiegroup/kogito-task-console @quay.io/kiegroup/kogito-swf-builder @quay.io/kiegroup/kogito-base-builder
Feature: Common tests for Kogito images # features/image/common.feature:10
Scenario: Verify if Kogito user is correctly configured # features/image/common.feature:12
When container is started with command sh # steps/container_steps.py:106
2024-04-10 13:12:00,208 container.py:238 DEBUG Creating container from image 'quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT'...
2024-04-10 13:12:00,208 container.py:254 DEBUG Creating docker container with arguments and image: quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT
2024-04-10 13:12:00,323 container.py:145 DEBUG Starting container 'c084d3f4b4255e3f23f4145e469c3babffe5e4d85f431163803583053b5e2643'...
2024-04-10 13:12:01,321 container_steps.py:317 DEBUG Running command ps -C java in container
2024-04-10 13:12:01,321 container.py:152 DEBUG container.execute(ps -C java,False)
Until it times out.
To reproduce
Just run cekit build with behave in a image based on registry.access.redhat.com/ubi8/openjdk-17:1.19
with the test described above.
Expected behavior
That the test runs without timing out.
Logs
cekit -v -v --descriptor kogito-base-builder-image.yaml build podman
2024-04-10 13:24:47,646 cli.py:482 DEBUG Running version 4.11.0
2024-04-10 13:24:47,647 cli.py:495 DEBUG Configuring CEKit...
2024-04-10 13:24:47,647 cli.py:512 DEBUG Removing dirty directory: 'target/image/modules'
2024-04-10 13:24:47,656 cli.py:512 DEBUG Removing dirty directory: 'target/repo'
2024-04-10 13:24:47,685 tools.py:436 WARNING You are running CEKit on an unknown platform. External dependencies suggestions may not work!
2024-04-10 13:24:47,686 builder.py:27 DEBUG Checking CEKit core dependencies...
2024-04-10 13:24:47,686 tools.py:509 DEBUG Checking if 'git' dependency is provided...
2024-04-10 13:24:47,686 tools.py:571 DEBUG CEKit dependency 'git' provided via the '/usr/bin/git' executable.
2024-04-10 13:24:47,686 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:24:47,694 tools.py:610 WARNING The certifi library (https://certifi.io/) was found, depending on the operating system configuration this may result in certificate validation issues.
2024-04-10 13:24:47,694 tools.py:614 WARNING You can use REQUESTS_CA_BUNDLE environment variable to point to a different certificate bundle if using the certifi provided bundle doesn't work.
2024-04-10 13:24:47,694 tools.py:618 WARNING Certificate Authority (CA) bundle in use: '/Users/ricferna/cekit/lib/python3.9/site-packages/certifi/cacert.pem'
2024-04-10 13:24:48,094 builder.py:95 INFO Generating files for podman engine
2024-04-10 13:24:48,095 base.py:108 INFO Initializing image descriptor...
2024-04-10 13:24:48,095 base.py:135 DEBUG Removing old target directory
2024-04-10 13:24:48,116 tools.py:116 DEBUG Reading descriptor from 'kogito-base-builder-image.yaml' file...
2024-04-10 13:24:48,128 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "path": "modules"}' artifact; using auto-generated value of 'modules'
2024-04-10 13:24:48,134 base.py:271 DEBUG Downloading module repository: 'modules'
2024-04-10 13:24:48,135 resource.py:229 INFO Copying resource 'modules'...
2024-04-10 13:24:48,135 resource.py:395 DEBUG Copying repository from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/modules' to 'target/repo/modules'.
2024-04-10 13:24:48,258 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-data-index-ephemeral/community/module.yaml' file...
2024-04-10 13:24:48,266 base.py:289 DEBUG Adding module 'org.kie.kogito.dataindex.community.ephemeral', path: 'target/repo/modules/kogito-data-index-ephemeral/community'
2024-04-10 13:24:48,268 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-common/module.yaml' file...
2024-04-10 13:24:48,273 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.common', path: 'target/repo/modules/kogito-jobs-service-common'
2024-04-10 13:24:48,275 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-logging/module.yaml' file...
2024-04-10 13:24:48,280 base.py:289 DEBUG Adding module 'org.kie.kogito.logging', path: 'target/repo/modules/kogito-logging'
2024-04-10 13:24:48,281 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-task-console/module.yaml' file...
2024-04-10 13:24:48,287 base.py:289 DEBUG Adding module 'org.kie.kogito.task.console', path: 'target/repo/modules/kogito-task-console'
2024-04-10 13:24:48,288 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-all-in-one/module.yaml' file...
2024-04-10 13:24:48,294 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.allinone', path: 'target/repo/modules/kogito-jobs-service-all-in-one'
2024-04-10 13:24:48,295 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-data-index-common/module.yaml' file...
2024-04-10 13:24:48,302 base.py:289 DEBUG Adding module 'org.kie.kogito.dataindex.common', path: 'target/repo/modules/kogito-data-index-common'
2024-04-10 13:24:48,304 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-project-versions/module.yaml' file...
2024-04-10 13:24:48,308 base.py:289 DEBUG Adding module 'org.kie.kogito.project.versions', path: 'target/repo/modules/kogito-project-versions'
2024-04-10 13:24:48,309 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-maven/common/module.yaml' file...
2024-04-10 13:24:48,328 base.py:289 DEBUG Adding module 'org.kie.kogito.maven.common', path: 'target/repo/modules/kogito-maven/common'
2024-04-10 13:24:48,329 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-ephemeral/module.yaml' file...
2024-04-10 13:24:48,334 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.ephemeral', path: 'target/repo/modules/kogito-jobs-service-ephemeral'
2024-04-10 13:24:48,335 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-launch-scripts/module.yaml' file...
2024-04-10 13:24:48,338 base.py:289 DEBUG Adding module 'org.kie.kogito.launch.scripts', path: 'target/repo/modules/kogito-launch-scripts'
2024-04-10 13:24:48,339 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/devmode/build-config/module.yaml' file...
2024-04-10 13:24:48,345 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.devmode.build-config', path: 'target/repo/modules/kogito-swf/devmode/build-config'
2024-04-10 13:24:48,346 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/devmode/runtime/common/module.yaml' file...
2024-04-10 13:24:48,352 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.devmode.runtime.common', path: 'target/repo/modules/kogito-swf/devmode/runtime/common'
2024-04-10 13:24:48,353 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/devmode/runtime/community/module.yaml' file...
2024-04-10 13:24:48,361 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-quarkus-app.tar"}' artifact; using auto-generated value of 'kogito-swf-quarkus-app.tar'
2024-04-10 13:24:48,361 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-maven-repo.tar"}' artifact; using auto-generated value of 'kogito-swf-maven-repo.tar'
2024-04-10 13:24:48,362 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.devmode.runtime.community', path: 'target/repo/modules/kogito-swf/devmode/runtime/community'
2024-04-10 13:24:48,363 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/common/scripts/module.yaml' file...
2024-04-10 13:24:48,371 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.common.scripts', path: 'target/repo/modules/kogito-swf/common/scripts'
2024-04-10 13:24:48,372 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/common/build/module.yaml' file...
2024-04-10 13:24:48,376 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.common.build', path: 'target/repo/modules/kogito-swf/common/build'
2024-04-10 13:24:48,377 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/builder/build-config/module.yaml' file...
2024-04-10 13:24:48,383 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.builder.build-config', path: 'target/repo/modules/kogito-swf/builder/build-config'
2024-04-10 13:24:48,384 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/builder/runtime/community/module.yaml' file...
2024-04-10 13:24:48,388 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-quarkus-app.tar"}' artifact; using auto-generated value of 'kogito-swf-quarkus-app.tar'
2024-04-10 13:24:48,389 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-maven-repo.tar"}' artifact; using auto-generated value of 'kogito-swf-maven-repo.tar'
2024-04-10 13:24:48,390 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.builder.runtime.community', path: 'target/repo/modules/kogito-swf/builder/runtime/community'
2024-04-10 13:24:48,391 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-postgresql/module.yaml' file...
2024-04-10 13:24:48,399 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.postgresql', path: 'target/repo/modules/kogito-jobs-service-postgresql'
2024-04-10 13:24:48,400 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jit-runner/module.yaml' file...
2024-04-10 13:24:48,407 base.py:289 DEBUG Adding module 'org.kie.kogito.jit-runner', path: 'target/repo/modules/kogito-jit-runner'
2024-04-10 13:24:48,407 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-data-index-postgresql/module.yaml' file...
2024-04-10 13:24:48,412 base.py:289 DEBUG Adding module 'org.kie.kogito.dataindex.postgresql', path: 'target/repo/modules/kogito-data-index-postgresql'
2024-04-10 13:24:48,413 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-management-console/module.yaml' file...
2024-04-10 13:24:48,419 base.py:289 DEBUG Adding module 'org.kie.kogito.management.console', path: 'target/repo/modules/kogito-management-console'
2024-04-10 13:24:48,420 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-system-user/module.yaml' file...
2024-04-10 13:24:48,425 base.py:289 DEBUG Adding module 'org.kie.kogito.system.user', path: 'target/repo/modules/kogito-system-user'
2024-04-10 13:24:48,426 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-custom-truststore/module.yaml' file...
2024-04-10 13:24:48,432 base.py:289 DEBUG Adding module 'org.kie.kogito.security.custom.truststores', path: 'target/repo/modules/kogito-custom-truststore'
2024-04-10 13:24:48,434 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-dynamic-resources/module.yaml' file...
2024-04-10 13:24:48,458 base.py:289 DEBUG Adding module 'org.kie.kogito.dynamic.resources', path: 'target/repo/modules/kogito-dynamic-resources'
2024-04-10 13:24:48,459 image.py:437 DEBUG Preparing module 'org.kie.kogito.system.user' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,460 image.py:437 DEBUG Preparing module 'org.kie.kogito.logging' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,461 image.py:437 DEBUG Preparing module 'org.kie.kogito.launch.scripts' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,462 image.py:437 DEBUG Preparing module 'org.kie.kogito.dynamic.resources' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,463 image.py:437 DEBUG Preparing module 'org.kie.kogito.maven.common' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,464 image.py:437 DEBUG Preparing module 'org.kie.kogito.project.versions' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,465 image.py:437 DEBUG Preparing module 'org.kie.kogito.security.custom.truststores' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,467 builder.py:114 DEBUG Checking CEKit generate dependencies...
2024-04-10 13:24:48,467 tools.py:485 DEBUG No dependencies found, skipping...
2024-04-10 13:24:48,468 base.py:318 DEBUG Copying module 'org.kie.kogito.system.user' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,468 base.py:325 DEBUG Copying module 'org.kie.kogito.system.user' to: 'target/image/modules/org.kie.kogito.system.user'
2024-04-10 13:24:48,472 base.py:318 DEBUG Copying module 'org.kie.kogito.logging' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,473 base.py:325 DEBUG Copying module 'org.kie.kogito.logging' to: 'target/image/modules/org.kie.kogito.logging'
2024-04-10 13:24:48,477 base.py:318 DEBUG Copying module 'org.kie.kogito.launch.scripts' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,477 base.py:325 DEBUG Copying module 'org.kie.kogito.launch.scripts' to: 'target/image/modules/org.kie.kogito.launch.scripts'
2024-04-10 13:24:48,482 base.py:318 DEBUG Copying module 'org.kie.kogito.dynamic.resources' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,482 base.py:325 DEBUG Copying module 'org.kie.kogito.dynamic.resources' to: 'target/image/modules/org.kie.kogito.dynamic.resources'
2024-04-10 13:24:48,512 base.py:318 DEBUG Copying module 'org.kie.kogito.maven.common' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,512 base.py:325 DEBUG Copying module 'org.kie.kogito.maven.common' to: 'target/image/modules/org.kie.kogito.maven.common'
2024-04-10 13:24:48,527 base.py:318 DEBUG Copying module 'org.kie.kogito.project.versions' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,527 base.py:325 DEBUG Copying module 'org.kie.kogito.project.versions' to: 'target/image/modules/org.kie.kogito.project.versions'
2024-04-10 13:24:48,531 base.py:318 DEBUG Copying module 'org.kie.kogito.security.custom.truststores' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:24:48,531 base.py:325 DEBUG Copying module 'org.kie.kogito.security.custom.truststores' to: 'target/image/modules/org.kie.kogito.security.custom.truststores'
2024-04-10 13:24:48,539 docker.py:31 INFO Handling artifacts for docker...
2024-04-10 13:24:48,539 docker.py:38 DEBUG Artifacts handled
2024-04-10 13:24:48,546 base.py:372 INFO Rendering Containerfile...
2024-04-10 13:24:48,646 base.py:391 DEBUG Containerfile rendered
2024-04-10 13:24:48,646 builder.py:122 DEBUG Checking CEKit build dependencies...
2024-04-10 13:24:48,646 tools.py:509 DEBUG Checking if 'podman' dependency is provided...
2024-04-10 13:24:48,647 tools.py:571 DEBUG CEKit dependency 'podman' provided via the '/opt/podman/bin/podman' executable.
2024-04-10 13:24:48,647 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:24:48,647 podman.py:50 DEBUG Building image with tags: 'quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT', 'quay.io/kiegroup/kogito-base-builder:latest'
2024-04-10 13:24:48,647 podman.py:59 INFO Building container image...
2024-04-10 13:24:48,647 tools.py:332 DEBUG Executing '/opt/podman/bin/podman build --squash -t quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT -t quay.io/kiegroup/kogito-base-builder:latest target/image'.
STEP 1/28: FROM registry.access.redhat.com/ubi8/openjdk-17:1.19
STEP 2/28: USER root
STEP 3/28: COPY modules/org.kie.kogito.system.user /tmp/scripts/org.kie.kogito.system.user
STEP 4/28: ENV HOME="/home/kogito" KOGITO_HOME="/home/kogito" USER="kogito"
STEP 5/28: USER root
STEP 6/28: RUN [ "sh", "-x", "/tmp/scripts/org.kie.kogito.system.user/add-user" ]
+ groupadd -r kogito -g 1001
+ useradd -u 1001 -r -g root -G kogito -m -d /home/kogito -s /sbin/nologin -c 'Kogito user' kogito
+ mkdir /home/kogito/bin
+ chmod ug+rwX /home/kogito
STEP 7/28: COPY modules/org.kie.kogito.logging /tmp/scripts/org.kie.kogito.logging
STEP 8/28: USER root
STEP 9/28: RUN [ "sh", "-x", "/tmp/scripts/org.kie.kogito.logging/configure" ]
++ dirname /tmp/scripts/org.kie.kogito.logging/configure
+ SCRIPT_DIR=/tmp/scripts/org.kie.kogito.logging
+ mkdir -p /home/kogito/launch/
+ cp -v /tmp/scripts/org.kie.kogito.logging/added/logging.sh /home/kogito/launch/
'/tmp/scripts/org.kie.kogito.logging/added/logging.sh' -> '/home/kogito/launch/logging.sh'
+ chmod +x-w /home/kogito/launch/logging.sh
STEP 10/28: COPY modules/org.kie.kogito.launch.scripts /tmp/scripts/org.kie.kogito.launch.scripts
STEP 11/28: USER root
STEP 12/28: RUN [ "sh", "-x", "/tmp/scripts/org.kie.kogito.launch.scripts/configure" ]
+ set -e
+ SOURCES_DIR=/tmp/artifacts
++ dirname /tmp/scripts/org.kie.kogito.launch.scripts/configure
+ SCRIPT_DIR=/tmp/scripts/org.kie.kogito.launch.scripts
+ mkdir -p /home/kogito/launch
+ cp -v /tmp/scripts/org.kie.kogito.launch.scripts/added/configure.sh /home/kogito/launch
'/tmp/scripts/org.kie.kogito.launch.scripts/added/configure.sh' -> '/home/kogito/launch/configure.sh'
STEP 13/28: COPY modules/org.kie.kogito.dynamic.resources /tmp/scripts/org.kie.kogito.dynamic.resources
STEP 14/28: USER root
STEP 15/28: RUN [ "sh", "-x", "/tmp/scripts/org.kie.kogito.dynamic.resources/configure" ]
+ set -e
++ dirname /tmp/scripts/org.kie.kogito.dynamic.resources/configure
+ SCRIPT_DIR=/tmp/scripts/org.kie.kogito.dynamic.resources
+ mkdir -p /opt/jboss/container/java/jvm
+ cp -prv /tmp/scripts/org.kie.kogito.dynamic.resources/added/container-limits /tmp/scripts/org.kie.kogito.dynamic.resources/added/debug-options /tmp/scripts/org.kie.kogito.dynamic.resources/added/java-default-options /opt/jboss/container/java/jvm/
'/tmp/scripts/org.kie.kogito.dynamic.resources/added/container-limits' -> '/opt/jboss/container/java/jvm/container-limits'
'/tmp/scripts/org.kie.kogito.dynamic.resources/added/debug-options' -> '/opt/jboss/container/java/jvm/debug-options'
'/tmp/scripts/org.kie.kogito.dynamic.resources/added/java-default-options' -> '/opt/jboss/container/java/jvm/java-default-options'
+ chown -R kogito:root /opt/jboss/container/java/jvm
+ chmod -R ug+x-w /opt/jboss/container/java/jvm/
STEP 16/28: COPY modules/org.kie.kogito.maven.common /tmp/scripts/org.kie.kogito.maven.common
STEP 17/28: ENV DEFAULT_MAVEN_REPO_URL="https://repository.apache.org/content/groups/public/" MAVEN_HOME="/usr/share/maven" MAVEN_SETTINGS_PATH="${KOGITO_HOME}/.m2/settings.xml"
STEP 18/28: USER root
STEP 19/28: RUN [ "sh", "-x", "/tmp/scripts/org.kie.kogito.maven.common/configure" ]
+ set -e
+ SOURCES_DIR=/tmp/artifacts
++ dirname /tmp/scripts/org.kie.kogito.maven.common/configure
---> Maven already present in the current context
+ SCRIPT_DIR=/tmp/scripts/org.kie.kogito.maven.common
+ mvn_install_dir=/usr/share/maven
+ '[' '!' -d /usr/share/maven ']'
+ echo '---> Maven already present in the current context'
+ mkdir /home/kogito/.m2
+ cp -v /tmp/scripts/org.kie.kogito.maven.common/maven/settings.xml /home/kogito/.m2
'/tmp/scripts/org.kie.kogito.maven.common/maven/settings.xml' -> '/home/kogito/.m2/settings.xml'
+ cp -v /tmp/scripts/org.kie.kogito.maven.common/added/configure-maven.sh /home/kogito/launch/
'/tmp/scripts/org.kie.kogito.maven.common/added/configure-maven.sh' -> '/home/kogito/launch/configure-maven.sh'
STEP 20/28: ENV KOGITO_VERSION="999-SNAPSHOT" QUARKUS_PLATFORM_VERSION="3.2.10.Final"
STEP 21/28: COPY modules/org.kie.kogito.security.custom.truststores /tmp/scripts/org.kie.kogito.security.custom.truststores
STEP 22/28: USER root
STEP 23/28: RUN [ "sh", "-x", "/tmp/scripts/org.kie.kogito.security.custom.truststores/configure" ]
++ dirname /tmp/scripts/org.kie.kogito.security.custom.truststores/configure
+ SCRIPT_DIR=/tmp/scripts/org.kie.kogito.security.custom.truststores
+ mkdir -p /home/kogito/launch/
+ cp -v /tmp/scripts/org.kie.kogito.security.custom.truststores/added/configure-custom-truststore.sh /home/kogito/launch/
'/tmp/scripts/org.kie.kogito.security.custom.truststores/added/configure-custom-truststore.sh' -> '/home/kogito/launch/configure-custom-truststore.sh'
+ chmod +x-w /home/kogito/launch/configure-custom-truststore.sh
STEP 24/28: LABEL description="Image with JDK and Maven, used as a base image. It is used by Web Tools !" io.cekit.version="4.11.0" io.k8s.description="Platform for building Kogito based on JDK and Maven" io.k8s.display-name="Kogito based on JDK and Maven" io.openshift.expose-services="8080:http" io.openshift.s2i.destination="/tmp" io.openshift.s2i.scripts-url="image:///usr/local/s2i" io.openshift.tags="base-builder,kogito" io.quarkus.platform.version="3.2.10.Final" maintainer="Apache KIE <[email protected]>" org.kie.kogito.version="999-SNAPSHOT" summary="Image with JDK and Maven, used as a base image. It is used by Web Tools !"
STEP 25/28: USER root
STEP 26/28: RUN rm -rf "/tmp/scripts" "/tmp/artifacts"
STEP 27/28: USER 1001
STEP 28/28: WORKDIR /home/kogito
COMMIT quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT
Getting image source signatures
Copying blob sha256:f61c43e793f68bde6557f1f0662ea7c8c9078c66a1b69840d48b14a6ea79d724
Copying blob sha256:c87479d78ad80b1884b6c7c01f0920557cdc8d84a9bed68d33eb84533e1ef5ca
Copying blob sha256:bd5c6b4dcaa0d86fae2e9678a86380504915e064d79901e32d50c76654ffd717
Copying config sha256:9f7f8a726db5e3a787be56632fd0994112ddeaf1b8fa98d5b6dfece28a790bb3
Writing manifest to image destination
--> 9f7f8a726db5
Successfully tagged quay.io/kiegroup/kogito-base-builder:latest
Successfully tagged quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT
9f7f8a726db5e3a787be56632fd0994112ddeaf1b8fa98d5b6dfece28a790bb3
2024-04-10 13:25:28,749 podman.py:65 INFO Image built and available under following tags: quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT, quay.io/kiegroup/kogito-base-builder:latest
2024-04-10 13:25:28,750 cli.py:529 INFO Finished!
cekit -v -v --descriptor kogito-base-builder-image.yaml test behave
2024-04-10 13:25:29,459 cli.py:482 DEBUG Running version 4.11.0
2024-04-10 13:25:29,459 cli.py:495 DEBUG Configuring CEKit...
2024-04-10 13:25:29,460 cli.py:512 DEBUG Removing dirty directory: 'target/image/modules'
2024-04-10 13:25:29,467 cli.py:512 DEBUG Removing dirty directory: 'target/repo'
2024-04-10 13:25:29,521 tools.py:436 WARNING You are running CEKit on an unknown platform. External dependencies suggestions may not work!
2024-04-10 13:25:29,521 builder.py:27 DEBUG Checking CEKit core dependencies...
2024-04-10 13:25:29,522 tools.py:509 DEBUG Checking if 'git' dependency is provided...
2024-04-10 13:25:29,522 tools.py:571 DEBUG CEKit dependency 'git' provided via the '/usr/bin/git' executable.
2024-04-10 13:25:29,522 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:25:29,522 tools.py:610 WARNING The certifi library (https://certifi.io/) was found, depending on the operating system configuration this may result in certificate validation issues.
2024-04-10 13:25:29,522 tools.py:614 WARNING You can use REQUESTS_CA_BUNDLE environment variable to point to a different certificate bundle if using the certifi provided bundle doesn't work.
2024-04-10 13:25:29,522 tools.py:618 WARNING Certificate Authority (CA) bundle in use: '/Users/ricferna/cekit/lib/python3.9/site-packages/certifi/cacert.pem'
2024-04-10 13:25:29,523 base.py:108 INFO Initializing image descriptor...
2024-04-10 13:25:29,523 behave_tester.py:39 DEBUG Checking CEKit generate dependencies...
2024-04-10 13:25:29,523 tools.py:485 DEBUG No dependencies found, skipping...
2024-04-10 13:25:29,523 base.py:135 DEBUG Removing old target directory
2024-04-10 13:25:29,525 tools.py:116 DEBUG Reading descriptor from 'kogito-base-builder-image.yaml' file...
2024-04-10 13:25:29,536 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "path": "modules"}' artifact; using auto-generated value of 'modules'
2024-04-10 13:25:29,543 base.py:271 DEBUG Downloading module repository: 'modules'
2024-04-10 13:25:29,543 resource.py:229 INFO Copying resource 'modules'...
2024-04-10 13:25:29,543 resource.py:395 DEBUG Copying repository from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/modules' to 'target/repo/modules'.
2024-04-10 13:25:29,658 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-data-index-ephemeral/community/module.yaml' file...
2024-04-10 13:25:29,669 base.py:289 DEBUG Adding module 'org.kie.kogito.dataindex.community.ephemeral', path: 'target/repo/modules/kogito-data-index-ephemeral/community'
2024-04-10 13:25:29,671 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-common/module.yaml' file...
2024-04-10 13:25:29,680 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.common', path: 'target/repo/modules/kogito-jobs-service-common'
2024-04-10 13:25:29,682 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-logging/module.yaml' file...
2024-04-10 13:25:29,690 base.py:289 DEBUG Adding module 'org.kie.kogito.logging', path: 'target/repo/modules/kogito-logging'
2024-04-10 13:25:29,691 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-task-console/module.yaml' file...
2024-04-10 13:25:29,704 base.py:289 DEBUG Adding module 'org.kie.kogito.task.console', path: 'target/repo/modules/kogito-task-console'
2024-04-10 13:25:29,706 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-all-in-one/module.yaml' file...
2024-04-10 13:25:29,718 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.allinone', path: 'target/repo/modules/kogito-jobs-service-all-in-one'
2024-04-10 13:25:29,720 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-data-index-common/module.yaml' file...
2024-04-10 13:25:29,731 base.py:289 DEBUG Adding module 'org.kie.kogito.dataindex.common', path: 'target/repo/modules/kogito-data-index-common'
2024-04-10 13:25:29,732 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-project-versions/module.yaml' file...
2024-04-10 13:25:29,740 base.py:289 DEBUG Adding module 'org.kie.kogito.project.versions', path: 'target/repo/modules/kogito-project-versions'
2024-04-10 13:25:29,741 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-maven/common/module.yaml' file...
2024-04-10 13:25:29,803 base.py:289 DEBUG Adding module 'org.kie.kogito.maven.common', path: 'target/repo/modules/kogito-maven/common'
2024-04-10 13:25:29,804 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-ephemeral/module.yaml' file...
2024-04-10 13:25:29,810 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.ephemeral', path: 'target/repo/modules/kogito-jobs-service-ephemeral'
2024-04-10 13:25:29,811 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-launch-scripts/module.yaml' file...
2024-04-10 13:25:29,815 base.py:289 DEBUG Adding module 'org.kie.kogito.launch.scripts', path: 'target/repo/modules/kogito-launch-scripts'
2024-04-10 13:25:29,816 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/devmode/build-config/module.yaml' file...
2024-04-10 13:25:29,822 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.devmode.build-config', path: 'target/repo/modules/kogito-swf/devmode/build-config'
2024-04-10 13:25:29,823 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/devmode/runtime/common/module.yaml' file...
2024-04-10 13:25:29,827 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.devmode.runtime.common', path: 'target/repo/modules/kogito-swf/devmode/runtime/common'
2024-04-10 13:25:29,828 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/devmode/runtime/community/module.yaml' file...
2024-04-10 13:25:29,837 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-quarkus-app.tar"}' artifact; using auto-generated value of 'kogito-swf-quarkus-app.tar'
2024-04-10 13:25:29,837 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-maven-repo.tar"}' artifact; using auto-generated value of 'kogito-swf-maven-repo.tar'
2024-04-10 13:25:29,839 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.devmode.runtime.community', path: 'target/repo/modules/kogito-swf/devmode/runtime/community'
2024-04-10 13:25:29,839 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/common/scripts/module.yaml' file...
2024-04-10 13:25:29,852 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.common.scripts', path: 'target/repo/modules/kogito-swf/common/scripts'
2024-04-10 13:25:29,853 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/common/build/module.yaml' file...
2024-04-10 13:25:29,858 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.common.build', path: 'target/repo/modules/kogito-swf/common/build'
2024-04-10 13:25:29,859 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/builder/build-config/module.yaml' file...
2024-04-10 13:25:29,865 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.builder.build-config', path: 'target/repo/modules/kogito-swf/builder/build-config'
2024-04-10 13:25:29,865 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-swf/builder/runtime/community/module.yaml' file...
2024-04-10 13:25:29,870 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-quarkus-app.tar"}' artifact; using auto-generated value of 'kogito-swf-quarkus-app.tar'
2024-04-10 13:25:29,870 resource.py:175 WARNING No value found for 'name' in '{"dest": "/tmp/artifacts/", "image": "builder", "path": "/home/kogito/build_output/kogito-swf-maven-repo.tar"}' artifact; using auto-generated value of 'kogito-swf-maven-repo.tar'
2024-04-10 13:25:29,871 base.py:289 DEBUG Adding module 'org.kie.kogito.swf.builder.runtime.community', path: 'target/repo/modules/kogito-swf/builder/runtime/community'
2024-04-10 13:25:29,872 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jobs-service-postgresql/module.yaml' file...
2024-04-10 13:25:29,877 base.py:289 DEBUG Adding module 'org.kie.kogito.jobs.service.postgresql', path: 'target/repo/modules/kogito-jobs-service-postgresql'
2024-04-10 13:25:29,877 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-jit-runner/module.yaml' file...
2024-04-10 13:25:29,882 base.py:289 DEBUG Adding module 'org.kie.kogito.jit-runner', path: 'target/repo/modules/kogito-jit-runner'
2024-04-10 13:25:29,883 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-data-index-postgresql/module.yaml' file...
2024-04-10 13:25:29,888 base.py:289 DEBUG Adding module 'org.kie.kogito.dataindex.postgresql', path: 'target/repo/modules/kogito-data-index-postgresql'
2024-04-10 13:25:29,889 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-management-console/module.yaml' file...
2024-04-10 13:25:29,894 base.py:289 DEBUG Adding module 'org.kie.kogito.management.console', path: 'target/repo/modules/kogito-management-console'
2024-04-10 13:25:29,896 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-system-user/module.yaml' file...
2024-04-10 13:25:29,906 base.py:289 DEBUG Adding module 'org.kie.kogito.system.user', path: 'target/repo/modules/kogito-system-user'
2024-04-10 13:25:29,907 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-custom-truststore/module.yaml' file...
2024-04-10 13:25:29,913 base.py:289 DEBUG Adding module 'org.kie.kogito.security.custom.truststores', path: 'target/repo/modules/kogito-custom-truststore'
2024-04-10 13:25:29,913 tools.py:116 DEBUG Reading descriptor from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/repo/modules/kogito-dynamic-resources/module.yaml' file...
2024-04-10 13:25:29,932 base.py:289 DEBUG Adding module 'org.kie.kogito.dynamic.resources', path: 'target/repo/modules/kogito-dynamic-resources'
2024-04-10 13:25:29,933 image.py:437 DEBUG Preparing module 'org.kie.kogito.system.user' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,934 image.py:437 DEBUG Preparing module 'org.kie.kogito.logging' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,935 image.py:437 DEBUG Preparing module 'org.kie.kogito.launch.scripts' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,936 image.py:437 DEBUG Preparing module 'org.kie.kogito.dynamic.resources' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,937 image.py:437 DEBUG Preparing module 'org.kie.kogito.maven.common' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,938 image.py:437 DEBUG Preparing module 'org.kie.kogito.project.versions' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,939 image.py:437 DEBUG Preparing module 'org.kie.kogito.security.custom.truststores' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,941 base.py:318 DEBUG Copying module 'org.kie.kogito.system.user' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,941 base.py:325 DEBUG Copying module 'org.kie.kogito.system.user' to: 'target/image/modules/org.kie.kogito.system.user'
2024-04-10 13:25:29,948 base.py:318 DEBUG Copying module 'org.kie.kogito.logging' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,948 base.py:325 DEBUG Copying module 'org.kie.kogito.logging' to: 'target/image/modules/org.kie.kogito.logging'
2024-04-10 13:25:29,956 base.py:318 DEBUG Copying module 'org.kie.kogito.launch.scripts' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,956 base.py:325 DEBUG Copying module 'org.kie.kogito.launch.scripts' to: 'target/image/modules/org.kie.kogito.launch.scripts'
2024-04-10 13:25:29,960 base.py:318 DEBUG Copying module 'org.kie.kogito.dynamic.resources' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,961 base.py:325 DEBUG Copying module 'org.kie.kogito.dynamic.resources' to: 'target/image/modules/org.kie.kogito.dynamic.resources'
2024-04-10 13:25:29,976 base.py:318 DEBUG Copying module 'org.kie.kogito.maven.common' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,976 base.py:325 DEBUG Copying module 'org.kie.kogito.maven.common' to: 'target/image/modules/org.kie.kogito.maven.common'
2024-04-10 13:25:29,991 base.py:318 DEBUG Copying module 'org.kie.kogito.project.versions' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,991 base.py:325 DEBUG Copying module 'org.kie.kogito.project.versions' to: 'target/image/modules/org.kie.kogito.project.versions'
2024-04-10 13:25:29,996 base.py:318 DEBUG Copying module 'org.kie.kogito.security.custom.truststores' required by 'quay.io/kiegroup/kogito-base-builder'.
2024-04-10 13:25:29,997 base.py:325 DEBUG Copying module 'org.kie.kogito.security.custom.truststores' to: 'target/image/modules/org.kie.kogito.security.custom.truststores'
2024-04-10 13:25:30,014 base.py:372 INFO Rendering Dockerfile...
2024-04-10 13:25:30,114 base.py:391 DEBUG Dockerfile rendered
2024-04-10 13:25:30,115 collector.py:44 INFO Fetching common steps from 'https://github.com/cekit/behave-test-steps.git', ref 'v1'.
2024-04-10 13:25:30,115 tools.py:332 DEBUG Executing 'git clone --depth 1 https://github.com/cekit/behave-test-steps.git /Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test -b v1'.
Cloning into '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 37 (delta 0), reused 23 (delta 0), pack-reused 0
Receiving objects: 100% (37/37), 23.55 KiB | 7.85 MiB/s, done.
2024-04-10 13:25:32,129 collector.py:65 DEBUG Collected tests from repositories roots
2024-04-10 13:25:32,130 collector.py:72 DEBUG Collected tests from modules
2024-04-10 13:25:32,130 collector.py:87 DEBUG Collecting tests from '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/tests/features' into '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test/features/image'
2024-04-10 13:25:32,154 collector.py:76 DEBUG Collected tests from image
2024-04-10 13:25:32,154 collector.py:77 INFO Collecting finished!
2024-04-10 13:25:32,154 behave_tester.py:53 DEBUG Checking CEKit test collector dependencies...
2024-04-10 13:25:32,158 tools.py:509 DEBUG Checking if 'python-docker' dependency is provided...
2024-04-10 13:25:32,159 tools.py:513 DEBUG Required CEKit library 'python-docker' was found as a 'docker' module!
2024-04-10 13:25:32,159 tools.py:509 DEBUG Checking if 'behave' dependency is provided...
2024-04-10 13:25:32,159 tools.py:513 DEBUG Required CEKit library 'behave' was found as a 'behave' module!
2024-04-10 13:25:32,159 tools.py:509 DEBUG Checking if 'requests' dependency is provided...
2024-04-10 13:25:32,160 tools.py:513 DEBUG Required CEKit library 'requests' was found as a 'requests' module!
2024-04-10 13:25:32,160 tools.py:509 DEBUG Checking if 'lxml' dependency is provided...
2024-04-10 13:25:32,160 tools.py:513 DEBUG Required CEKit library 'lxml' was found as a 'lxml' module!
2024-04-10 13:25:32,160 tools.py:509 DEBUG Checking if 's2i' dependency is provided...
2024-04-10 13:25:32,160 tools.py:571 DEBUG CEKit dependency 's2i' provided via the '/usr/local/bin/s2i' executable.
2024-04-10 13:25:32,161 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:25:32,161 behave_tester.py:55 DEBUG Checking CEKit test runner dependencies...
2024-04-10 13:25:32,161 tools.py:509 DEBUG Checking if 'python-behave' dependency is provided...
2024-04-10 13:25:32,161 tools.py:513 DEBUG Required CEKit library 'python-behave' was found as a 'behave' module!
2024-04-10 13:25:32,161 tools.py:542 DEBUG All dependencies provided!
2024-04-10 13:25:32,161 behave_runner.py:34 DEBUG Running behave in '/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test'.
2024-04-10 13:25:32,161 behave_runner.py:77 DEBUG Running behave tests with args '['/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test', '--junit', '--junit-directory', 'results', '--no-skipped', '-t', '~ignore', '-D', 'IMAGE=quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT', '-t', '@quay.io,@quay.io/kiegroup/kogito-base-builder', '-t', '~ci ']'.
2024-04-10 13:25:32,162 behave_runner.py:81 DEBUG behave args: ['/Users/ricferna/dev/github.com/apache/incubator-kie-kogito-images/target/test', '--junit', '--junit-directory', 'results', '--no-skipped', '-t', '~ignore', '-D', 'IMAGE=quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT', '-t', '@quay.io,@quay.io/kiegroup/kogito-base-builder', '-t', '~ci ']
@quay.io/kiegroup/kogito-data-index-ephemeral @quay.io/kiegroup/kogito-data-index-postgresql @quay.io/kiegroup/kogito-jit-runner @quay.io/kiegroup/kogito-jobs-service-ephemeral @quay.io/kiegroup/kogito-jobs-service-postgresql @quay.io/kiegroup/kogito-management-console @quay.io/kiegroup/kogito-task-console @quay.io/kiegroup/kogito-swf-builder @quay.io/kiegroup/kogito-base-builder
Feature: Common tests for Kogito images # features/image/common.feature:10
Scenario: Verify if Kogito user is correctly configured # features/image/common.feature:12
When container is started with command sh # steps/container_steps.py:106
2024-04-10 13:25:32,373 container.py:238 DEBUG Creating container from image 'quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT'...
2024-04-10 13:25:32,373 container.py:254 DEBUG Creating docker container with arguments and image: quay.io/kiegroup/kogito-base-builder:999-SNAPSHOT
2024-04-10 13:25:32,479 container.py:145 DEBUG Starting container 'a85f22ec53cc9691fc78d04afd4fb471eec492c707c5246468c298c459d954d2'...
2024-04-10 13:25:33,485 container_steps.py:317 DEBUG Running command ps -C java in container
2024-04-10 13:25:33,485 container.py:152 DEBUG container.execute(ps -C java,False)
Environment information:
Additional context
You can see a PR with this image for reference here: apache/incubator-kie-kogito-images#1754
In the absence of an explicit ref in the step "Given s2i build...", i.e., Given s2i build https://...somerepo.../
with no using branchname
suffix, the S2I steps will default to try to check out a branch named master
, which may not exist in the repository.
Instead I think it should use the repository's default branch name.
We hit this (side issue) by introducing a new repository for cekit/behave tests, https://github.com/jboss-container-images/openjdk-test-applications, which has the default branch name main
. This is the new default, I think, for both Git and Github. (At the time of writing this, I'm about to push a master
branch to that repository as a temporary mitigation).
The culprits are
behave-test-steps/steps/s2i_steps.py
Line 14 in e92a239
behave-test-steps/steps/s2i_steps.py
Line 59 in e92a239
I just realized I probably should have opened an issue for this, since you appear to be using issue :)
PR here:
#7
We are in a case where tests scenarii could be shared by multiple images if the s2i build step was configurable (eg: build src repo, tag, context-dir, ...).
A user could write something like:
Given s2i build $BEHAVE_TEST_REPO from $BEHAVE_TEST_APP1 using $BEHAVE_TEST_REPO_TAG
The various env variables would have to be set in the context of the test execution.
We could consider that, if a parameter starts with '$', it is an env variable to be resolved. If no such env variable exists, then the parameter is passed as is to the s2i command.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/ubi9-openjdk-17-runtime.yml
actions/checkout v4
cekit/actions-setup-cekit v1.1.5
Instead we should use MAVEN_MIRROR_URL
, if provided.
cekit test
works by cloning this repository to target/test
, and then copying on top the relevant behave files from the image being tested. It then invokes behave.
behave operates from target/test
and includes any *.feature
file it can find: so, every cekit test
run for any image since merging #61 is picking up those feature files.
They may or may not be run (depending on what tags are defined for the image), but they cause cekit tests to fail, which expect a certain number of scenarios/features/steps to be defined.
The default timeout should be used only when a timeout value was not specified in scenario.
We use the step "When container is started with args" in quite a few tests, e.g. all of these ones which run a variety of binaries: ls
,rpm
,bash
, but notably not java
.
That step is defined here
https://github.com/cekit/behave-test-steps/blob/v1/steps/container_steps.py#L86
Note that function has a parameter pname
defaulting to java
, but nothing alters that value: it's not parameterized in the @given
or @when
variants that select it.
start_container_with_args
calls wait_for_process(context, pname)
(https://github.com/cekit/behave-test-steps/blob/v1/steps/container_steps.py#L167 , always with pname=java
) which does a busy-loop poll of the process table (via invoking ps
) with a hard-coded 10 second timeout.
Thus, any test using the step "When container is started with args" will have an up-to 10 second delay added to its runtime looking for a java
process before completing.
(I've discovered this while trying to figure out why our GHA tests runs all time out and fail. The last thing they log as running is one of the wait_for_process
polling loops, although that might be a coincidence. The tests stick in that state for 5-6h before GHA kills them.)
https://github.com/cekit/behave-test-steps/actions/runs/8402762923/job/23014316922
We're hitting the 60 minute timeout specified here https://github.com/cekit/behave-test-steps/blob/v1/.github/workflows/ubi9-openjdk-17-runtime.yml#L15
However I think 60 minutes should be more than sufficient (testing that theory here)
This is referring to loader.py
. There are two problems here:
# Fedora / EPEL 8 : python3-requests
# EPEL 7 : python36-requests
deps['requests'] = {
'library': 'requests',
'package': 'python-requests',
'fedora': {
'package': 'python3-requests',
}
}
This could be partially resolved within CEKit if the package determination in tools.py
also allowed <platform><release
as well as <platform>
e.g. centos7
so we could then have:
'package': 'python3-requests',
'centos7': {
'package': 'python36-requests',
}
deps['behave'] = {
'library': 'behave',
'package': 'python2-behave',
'fedora': {
'package': 'python3-behave',
}
}
This is https://bugzilla.redhat.com/show_bug.cgi?id=2106695 and https://bugzilla.redhat.com/show_bug.cgi?id=1885570
cc @jmtd
Describe the solution you'd like
As youn may know, host networking driver won't work on Windows or Mac:
The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.
Hence, behave tests requiring checks like check that page is served
won't work since the client won't connect to the container.
A simple workaround we could implement is adding a --port-forwarding
to the command line to make Cekit start the container in a random port by default (to avoid clashing when running in parallel).
Additional context
An implementation idea:
cekit --descriptor image.yaml test behave --port-forwarding :8080
Would forward a local random port to 8080.
cekit --descriptor image.yaml test behave --port-forwarding 9090:8080
Would forward the local 9090 port to 8080.
I can send a PR if you agree to implement this feature.
Cheers!
I am seeing
======================================================== warnings summary =========================================================
tests/test_validate.py::test_simple_image_test
steps/container_steps.py:210: DeprecationWarning: invalid escape sequence \(
tests/test_validate.py::test_image_test_with_override
steps/container_steps.py:210: DeprecationWarning: invalid escape sequence \(
tests/test_validate.py::test_image_test_with_multiple_overrides
steps/container_steps.py:210: DeprecationWarning: invalid escape sequence \(
tests/test_validate.py::test_image_test_with_override_on_cmd
steps/container_steps.py:210: DeprecationWarning: invalid escape sequence \(
When killing the container after the test it may happen that it's already not running. In such case we should print some message to suggest to take a look at the container logs because most probably the application did not start correctly, crashed and the container was already removed.
Describe the bug
Encoding exception at the end of the test although test succeeds
To reproduce
Use image in https://github.com/jfdenise/wildfly-s2i/tree/wf-17/wildfly-builder-image
Add the feature:
Feature: WildFly basic features
@wildfly/wildfly-centos7
Scenario: Check basic build
Given s2i build https://github.com/jfdenise/wildfly-s2i from test/test-app using wf-17
Expected behavior
No error
Logs
Given s2i build https://github.com/jfdenise/wildfly-s2i from
test/test-app using wf-17 # steps/s2i_steps.py:47 21.106s
2019-05-28 16:42:29,367 - dock.middleware.container - INFO - Removing
container
'0cb1c0586261ab3893df637a65bf9876da6ba6679edb4bc1ccc7f61d5d7dccf3', 1 try...
2019-05-28 16:42:29,382 - dock.middleware.container - INFO - Container
'0cb1c0586261ab3893df637a65bf9876da6ba6679edb4bc1ccc7f61d5d7dccf3' removed
Exception UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in
position 2080: ordinal not in range(128)
2019-05-28 16:42:29,386 cekit ERROR An error occurred while
executing tests
2019-05-28 16:42:29,386 - cekit - ERROR - An error occurred while
executing tests
Environment information:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.