diff --git a/deploy-and-test.yml b/deploy-and-test.yml index 7a69900..efd32ab 100644 --- a/deploy-and-test.yml +++ b/deploy-and-test.yml @@ -9,8 +9,8 @@ xml_file: "{{ testing_dir }}/{{ xml_file_name }}" xml_testsuite_path: "/testsuite" xml_testcase_path: "{{ xml_testsuite_path }}/testcase" - oc_project_rhscl: "rhscl-ci-testing" - oc_project_dotnet: "dotnet-ci-testing" + oc_project_rhscl: "core-services-ocp--rhscl-ci" + oc_project_dotnet: "core-services-ocp--dotnet-ci" java_8: - java-8-container java_11: @@ -24,6 +24,8 @@ - rhel8-dotnet70-container dotnet: "{{ dotnet_60 + dotnet_70}}" tasks: + - debug: var=ext_test + - debug: var=github_repo - name: Modify OpenShift project to rhscl-ci-testing-s2i if s2i set_fact: oc_project_rhscl: "{{ oc_project_rhscl }}-s2i" @@ -64,15 +66,6 @@ - name: Clone and test upstream container repositories include_tasks: ./tasks/verify_in_openshift.yml loop: - #- rhel7-nodejs-ex-14 - - rhel7-nginx-ex-120 - - rhel7-postgresql-10-container - - rhel7-mysql-80-container - - rhel7-mariadb-103-container - - rhel7-mariadb-105-container - #- rhel7-s2i-perl-530-container - - rhel7-s2i-ruby-30-container - - rhel7-s2i-python-38-container - rhel8-nodejs-ex-18 - rhel8-nodejs-ex-18-minimal - rhel8-nodejs-ex-20 @@ -127,11 +120,6 @@ - name: Check None-s2i containers include_tasks: ./tasks/verify_in_openshift.yml loop: - - rhel7-nginx-ex-120 - - rhel7-postgresql-10-container - - rhel7-mysql-80-container - - rhel7-mariadb-103-container - - rhel7-mariadb-105-container - rhel8-httpd-ex - rhel8-mariadb-105-container - rhel8-mariadb-1011-container @@ -156,15 +144,10 @@ - name: Check s2i containers include_tasks: ./tasks/verify_in_openshift.yml loop: - #- rhel7-nodejs-ex-14 - #- rhel7-s2i-perl-530-container - - rhel7-s2i-ruby-30-container - - rhel7-s2i-python-38-container - rhel8-nodejs-ex-18 - rhel8-nodejs-ex-18-minimal - rhel8-nodejs-ex-20 - rhel8-nodejs-ex-20-minimal - - rhel8-cakephp-ex-73 - rhel8-cakephp-ex-74 #- rhel8-cakephp-ex-80 It looks like no prepared for PHP-8.0 #- rhel8-cakephp-ex-81 It looks like no prepared for PHP-8.0 diff --git a/files/check_pod_running.sh b/files/check_pod_running.sh index cf449a7..ad55a2c 100755 --- a/files/check_pod_running.sh +++ b/files/check_pod_running.sh @@ -24,6 +24,6 @@ for i in {1..10}; do exit 1 fi done <<< "${POD_STATUS}" - sleep 60 + sleep 30 done exit 1 diff --git a/tasks/openshift_deploy.yml b/tasks/openshift_deploy.yml index 8f881df..067e146 100644 --- a/tasks/openshift_deploy.yml +++ b/tasks/openshift_deploy.yml @@ -19,7 +19,7 @@ script: "./files/check_pod_running.sh {{ stuff.pod_name }}" register: cluster_name until: cluster_name.rc == 0 - retries: 40 + retries: 30 delay: 30 ignore_errors: yes when: deploy_cmd.rc == 0 @@ -35,9 +35,21 @@ changed_when: false register: route_cmd until: route_cmd.rc == 0 + retries: 30 + delay: 10 + when: (deploy_cmd.rc == 0) and (cluster_name.rc == 0) + + - debug: var=route_cmd + + - name: Check service IP for POD {{ stuff.pod_name }} + shell: "oc get svc/{{ stuff.pod_name }} --no-headers -o custom-columns=HOST:.spec.clusterIP" + changed_when: false + register: service_ip + until: service_ip.rc == 0 retries: 10 delay: 20 when: (deploy_cmd.rc == 0) and (cluster_name.rc == 0) - - debug: var=route_cmd + - debug: var=service_ip + when: file_exists.stat.exists diff --git a/tasks/openshift_test.yml b/tasks/openshift_test.yml index 32ea553..5f0de5f 100644 --- a/tasks/openshift_test.yml +++ b/tasks/openshift_test.yml @@ -1,19 +1,27 @@ - block: - debug: var=stuff + - debug: var=service_ip - - name: Check curl command is working - uri: - url: "http://{{ route_cmd.stdout }}" - return_content: yes - status_code: 200 - body_format: "{{ stuff.curl_output_format | default('json') }}" - retries: 20 + - name: Check if curl command is working + script: "./files/check_oc_exec_output.sh 'curl {{ service_ip.stdout | trim }}:8080' '{{ cluster_name.stdout | trim }}' '{{ stuff.check_curl_output }}'" + retries: 10 delay: 20 register: curl_output ignore_errors: yes - until: ("status" in curl_output) and (curl_output.status == 200) - - - name: Check proper output in json + until: (curl_output.rc == 0) and ("Connection refused" not in curl_output["stderr"]) +# - name: Check curl command is working +# uri: +# url: "http://{{ route_cmd.stdout }}" +# return_content: yes +# status_code: 200 +# body_format: "{{ stuff.curl_output_format | default('json') }}" +# retries: 19 +# delay: 20 +# register: curl_output +# ignore_errors: yes +# until: ("status" in curl_output) and (curl_output.status == 200) + + - name: Check proper output debug: var: curl_output @@ -26,7 +34,7 @@ add_children: - failure: message: "Check curl Test failed" - - system-err: "{{ curl_output.msg | trim }}" + - system-err: "{{ curl_output.stdout | trim }}" - name: Increment testsuite failures attribute xml: @@ -34,7 +42,7 @@ xpath: "{{ xml_testsuite_path }}" attribute: failures value: "{{ testsuite_attrs.failures|int + 1 }}" - when: (curl_output["content"] is not defined) or ("{{ stuff.check_curl_output }}" not in curl_output["content"]) + when: (curl_output["stdout"] is not defined) or ("{{ stuff.check_curl_output }}" not in curl_output["stdout"]) - name: Write test case passed elements xml: @@ -42,8 +50,8 @@ xpath: "{{ xml_testcase_path }}" pretty_print: yes add_children: - - system-out: "{{ curl_output.msg | trim }}" - when: '"{{ stuff.check_curl_output }}" in curl_output["content"]' + - system-out: "FINE" + when: '"{{ stuff.check_curl_output }}" in curl_output["stdout"]' when: (stuff.check_curl_output is defined) @@ -54,7 +62,7 @@ script: "{{ stuff.test_exec_command }} {{ cluster_name.stdout | trim }} '{{ stuff.expected_exec_result }}'" ignore_errors: yes register: command_out - retries: 20 + retries: 5 delay: 20 until: command_out.rc == 0 diff --git a/tasks/verify_in_openshift.yml b/tasks/verify_in_openshift.yml index ac587e0..b207ef8 100644 --- a/tasks/verify_in_openshift.yml +++ b/tasks/verify_in_openshift.yml @@ -33,7 +33,7 @@ when: (ext_test == "") or (ext_test == "s2i") or (ext_test == "nos2i") - name: Get list of projects for DOTNET - shell: "oc projects | grep dotnet-ci-testing" + shell: "oc projects | grep dotnet-ci" changed_when: false register: oc_projects ignore_errors: yes diff --git a/vars/rhel7-nginx-ex-118.yml b/vars/rhel7-nginx-ex-118.yml index a19c78d..74d0ef9 100644 --- a/vars/rhel7-nginx-ex-118.yml +++ b/vars/rhel7-nginx-ex-118.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi7/nginx-118" tag_name: "nginx:1.18-ubi7" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nginx-ex/master/openshift/templates/nginx.json -p NGINX_VERSION=1.18-ubi7 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nginx-ex/master/openshift/templates/nginx.json -p NGINX_VERSION=1.18-ubi7 -p NAMESPACE={{ oc_project_rhscl }} --name=nginx-example | oc apply -f -" pod_name: "nginx-example" check_curl_output: "Welcome to your static nginx application" scl_url: "nginx-container" diff --git a/vars/rhel7-nginx-ex-120.yml b/vars/rhel7-nginx-ex-120.yml index bcd41b4..a0caa92 100644 --- a/vars/rhel7-nginx-ex-120.yml +++ b/vars/rhel7-nginx-ex-120.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi7/nginx-120" tag_name: "nginx:1.20-ubi7" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nginx-ex/master/openshift/templates/nginx.json -p NGINX_VERSION=1.20-ubi7 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nginx-ex/master/openshift/templates/nginx.json --name=nginx-example -p NGINX_VERSION=1.20-ubi7 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nginx-example" check_curl_output: "Welcome to your static nginx application" scl_url: "nginx-container" diff --git a/vars/rhel7-nodejs-ex-14.yml b/vars/rhel7-nodejs-ex-14.yml index dfb92a5..fdea47b 100644 --- a/vars/rhel7-nodejs-ex-14.yml +++ b/vars/rhel7-nodejs-ex-14.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi7/nodejs-14" tag_name: "nodejs:14" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=14 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json --name=nodejs-example -p NODEJS_VERSION=14 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" check_curl_output: "Node.js Crud Application" scl_url: "nodejs-ex" diff --git a/vars/rhel7-s2i-perl-530-container.yml b/vars/rhel7-s2i-perl-530-container.yml index a40f5da..9e8fc01 100644 --- a/vars/rhel7-s2i-perl-530-container.yml +++ b/vars/rhel7-s2i-perl-530-container.yml @@ -1,6 +1,6 @@ registry_redhat_io: "rhscl/perl-530-rhel7" tag_name: "perl:5.30" -deployment: "oc new-app perl:5.30~https://github.com/sclorg/dancer-ex.git" +deployment: "oc new-app perl:5.30~https://github.com/sclorg/dancer-ex.git --name=dancer-ex" pod_name: "dancer-ex" add_route: true check_curl_output: "Welcome to your Dancer application" diff --git a/vars/rhel7-s2i-python-38-container.yml b/vars/rhel7-s2i-python-38-container.yml index c4a247f..493c7c6 100644 --- a/vars/rhel7-s2i-python-38-container.yml +++ b/vars/rhel7-s2i-python-38-container.yml @@ -1,5 +1,7 @@ -deployment: "oc new-app python:3.8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.8/test/setup-test-app/" -pod_name: "s2i-python-container" +registry_redhat_io: "ubi7/python-38" +tag_name: "python:3.8" +deployment: "oc new-app python:3.8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.8/test/setup-test-app/ --name=python-example" +pod_name: "python-example" add_route: true check_curl_output: "Hello from gunicorn WSGI application" scl_url: "s2i-python-container" diff --git a/vars/rhel7-s2i-ruby-30-container.yml b/vars/rhel7-s2i-ruby-30-container.yml index 82c4db0..3def13a 100644 --- a/vars/rhel7-s2i-ruby-30-container.yml +++ b/vars/rhel7-s2i-ruby-30-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "ubi7/ruby-30" tag_name: "ruby:3.0" -deployment: "oc new-app ruby:3.0~https://github.com/sclorg/s2i-ruby-container.git --context-dir=3.0/test/puma-test-app/" -pod_name: "s2i-ruby-container" +deployment: "oc new-app ruby:3.0~https://github.com/sclorg/s2i-ruby-container.git --context-dir=3.0/test/puma-test-app/ --name=ruby-example" +pod_name: "ruby-example" add_route: true check_curl_output: "Hello world" scl_url: "s2i-ruby-container" diff --git a/vars/rhel8-django-ex-python-36.yml b/vars/rhel8-django-ex-python-36.yml index 97a0167..a597072 100644 --- a/vars/rhel8-django-ex-python-36.yml +++ b/vars/rhel8-django-ex-python-36.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi8/python-36" tag_name: "python:3.6-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/django-ex/3.2.x/openshift/templates/django.json -p PYTHON_VERSION=3.6-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/django-ex/2.2.x/openshift/templates/django.json -p PYTHON_VERSION=3.6-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "django-example" check_curl_output: "Welcome to your Django application on OpenShift" scl_url: "django-ex" diff --git a/vars/rhel8-django-ex-python-38.yml b/vars/rhel8-django-ex-python-38.yml index a7db239..8a9042f 100644 --- a/vars/rhel8-django-ex-python-38.yml +++ b/vars/rhel8-django-ex-python-38.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi8/python-38" tag_name: "python:3.8-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/django-ex/3.2.x/openshift/templates/django.json -p PYTHON_VERSION=3.8-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/django-ex/2.2.x/openshift/templates/django.json -p PYTHON_VERSION=3.8-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "django-example" check_curl_output: "Welcome to your Django application on OpenShift" scl_url: "django-ex" diff --git a/vars/rhel8-mariadb-1011-container.yml b/vars/rhel8-mariadb-1011-container.yml index 94cffd2..8e2afd2 100644 --- a/vars/rhel8-mariadb-1011-container.yml +++ b/vars/rhel8-mariadb-1011-container.yml @@ -1,14 +1,11 @@ registry_redhat_io: "rhel8/mariadb-1011" tag_name: "mariadb:10.11-el8" -deployment: "oc new-app mariadb:10.11-el8~https://github.com/sclorg/mariadb-container.git \ - --name rhel8-mariadb-1011 \ - --context-dir=examples/extend-image \ - --env MYSQL_OPERATIONS_USER=opuser \ - --env MYSQL_OPERATIONS_PASSWORD=oppass \ - --env MYSQL_DATABASE=opdb \ - --env MYSQL_USER=user \ - --env MYSQL_PASSWORD=pass" -pod_name: "rhel8-mariadb-1011" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/mariadb-container/master/examples/mariadb-persistent-template.json -p MARIADB_VERSION=10.11-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=mariadb-1011 \ + -p MYSQL_DATABASE=opdb \ + -p MYSQL_USER=user \ + -p MYSQL_PASSWORD=pass | oc apply -f -" +pod_name: "mariadb-1011" add_route: true test_exec_command: "./files/check_mariadb_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-mariadb-105-container.yml b/vars/rhel8-mariadb-105-container.yml index c5835cc..4a9f169 100644 --- a/vars/rhel8-mariadb-105-container.yml +++ b/vars/rhel8-mariadb-105-container.yml @@ -1,14 +1,11 @@ registry_redhat_io: "rhel8/mariadb-105" tag_name: "mariadb:10.5-el8" -deployment: "oc new-app mariadb:10.5-el8~https://github.com/sclorg/mariadb-container.git \ - --name rhel8-mariadb-105 \ - --context-dir=examples/extend-image \ - --env MYSQL_OPERATIONS_USER=opuser \ - --env MYSQL_OPERATIONS_PASSWORD=oppass \ - --env MYSQL_DATABASE=opdb \ - --env MYSQL_USER=user \ - --env MYSQL_PASSWORD=pass" -pod_name: "rhel8-mariadb-105" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/mariadb-container/master/examples/mariadb-persistent-template.json -p MARIADB_VERSION=10.5-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=mariadb-105 \ + -p MYSQL_DATABASE=opdb \ + -p MYSQL_USER=user \ + -p MYSQL_PASSWORD=pass | oc apply -f -" +pod_name: "mariadb-105" add_route: true test_exec_command: "./files/check_mariadb_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-mysql-80-container.yml b/vars/rhel8-mysql-80-container.yml index 3118dbb..4b02bd0 100644 --- a/vars/rhel8-mysql-80-container.yml +++ b/vars/rhel8-mysql-80-container.yml @@ -1,14 +1,11 @@ registry_redhat_io: "rhel8/mysql-80" -tag_name: "mysql:8.0" -deployment: "oc new-app mysql:8.0~https://github.com/sclorg/mysql-container.git \ - --name my-mysql-rhel8 \ - --context-dir=examples/extend-image \ - --env MYSQL_OPERATIONS_USER=opuser \ - --env MYSQL_OPERATIONS_PASSWORD=oppass \ - --env MYSQL_DATABASE=opdb \ - --env MYSQL_USER=user \ - --env MYSQL_PASSWORD=pass" -pod_name: "my-mysql-rhel8" +tag_name: "mysql:8.0-el8" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/mysql-container/master/examples/mysql-persistent-template.json -p MYSQL_VERSION=8.0-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=mysql-80 \ + -p MYSQL_DATABASE=opdb \ + -p MYSQL_USER=user \ + -p MYSQL_PASSWORD=pass | oc apply -f -" +pod_name: "mysql-80" add_route: true test_exec_command: "./files/check_mysql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-postgresql-10-container.yml b/vars/rhel8-postgresql-10-container.yml index 63a1458..fd58692 100644 --- a/vars/rhel8-postgresql-10-container.yml +++ b/vars/rhel8-postgresql-10-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel8/postgresql-10" tag_name: "postgresql:10-el8" -deployment: "oc new-app postgresql:10-el8~https://github.com/sclorg/postgresql-container.git \ - --name rhel8-postgresql-10 \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "rhel8-postgresql-10" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=10-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-10 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-10" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-postgresql-12-container.yml b/vars/rhel8-postgresql-12-container.yml index 01b2f32..0b4d33e 100644 --- a/vars/rhel8-postgresql-12-container.yml +++ b/vars/rhel8-postgresql-12-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel8/postgresql-12" tag_name: "postgresql:12-el8" -deployment: "oc new-app postgresql:12-el8~https://github.com/sclorg/postgresql-container.git \ - --name rhel8-postgresql-12 \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "rhel8-postgresql-12" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=12-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-12 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-12" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-postgresql-13-container.yml b/vars/rhel8-postgresql-13-container.yml index d1cee70..93b470a 100644 --- a/vars/rhel8-postgresql-13-container.yml +++ b/vars/rhel8-postgresql-13-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel8/postgresql-13" tag_name: "postgresql:13-el8" -deployment: "oc new-app postgresql:13-el8~https://github.com/sclorg/postgresql-container.git \ - --name rhel8-postgresql-13 \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "rhel8-postgresql-13" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=13-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-13 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-13" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-postgresql-15-container.yml b/vars/rhel8-postgresql-15-container.yml index 5d8f80a..6d40215 100644 --- a/vars/rhel8-postgresql-15-container.yml +++ b/vars/rhel8-postgresql-15-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel8/postgresql-15" tag_name: "postgresql:15-el8" -deployment: "oc new-app postgresql:15-el8~https://github.com/sclorg/postgresql-container.git \ - --name rhel8-postgresql-15 \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "rhel8-postgresql-15" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=15-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-15 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-15" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-postgresql-16-container.yml b/vars/rhel8-postgresql-16-container.yml index 5a5257c..a7008c3 100644 --- a/vars/rhel8-postgresql-16-container.yml +++ b/vars/rhel8-postgresql-16-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel8/postgresql-16" tag_name: "postgresql:16-el8" -deployment: "oc new-app postgresql:16-el8~https://github.com/sclorg/postgresql-container.git \ - --name rhel8-postgresql-16 \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "rhel8-postgresql-16" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=16-el8 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-16 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-16" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel8-s2i-perl-526-container.yml b/vars/rhel8-s2i-perl-526-container.yml index c2fcc31..f6629ab 100644 --- a/vars/rhel8-s2i-perl-526-container.yml +++ b/vars/rhel8-s2i-perl-526-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "rhel8/perl-526" tag_name: "perl:5.26" -deployment: "oc new-app perl:5.26~https://github.com/sclorg/s2i-perl-container.git --context-dir=5.26-mod_fcgid/test/sample-test-app/" -pod_name: "s2i-perl-container" +deployment: "oc new-app perl:5.26~https://github.com/sclorg/s2i-perl-container.git --name=perl-example --context-dir=5.26-mod_fcgid/test/sample-test-app/" +pod_name: "perl-example" add_route: true check_curl_output: "Everything is fine" curl_output_format: "raw" diff --git a/vars/rhel8-s2i-python-311-container.yml b/vars/rhel8-s2i-python-311-container.yml index 1a1f845..1946e0a 100644 --- a/vars/rhel8-s2i-python-311-container.yml +++ b/vars/rhel8-s2i-python-311-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "rhel8/python-311" tag_name: "python:3.11-el8" -deployment: "oc new-app python:3.11-el8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.11/test/setup-test-app/" -pod_name: "s2i-python-container" +deployment: "oc new-app python:3.11-el8~https://github.com/sclorg/s2i-python-container.git --name=python-example --context-dir=3.11/test/setup-test-app/" +pod_name: "python-example" add_route: true check_curl_output: "Hello from gunicorn WSGI application" scl_url: "s2i-python-container" diff --git a/vars/rhel8-s2i-python-312-container.yml b/vars/rhel8-s2i-python-312-container.yml index aa01a6e..549ec50 100644 --- a/vars/rhel8-s2i-python-312-container.yml +++ b/vars/rhel8-s2i-python-312-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "rhel8/python-312" tag_name: "python:3.12-el8" -deployment: "oc new-app python:3.12-el8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.12/test/setup-test-app/" -pod_name: "s2i-python-container" +deployment: "oc new-app python:3.12-el8~https://github.com/sclorg/s2i-python-container.git --name=python-example --context-dir=3.12/test/setup-test-app/" +pod_name: "python-example" add_route: true check_curl_output: "Hello from gunicorn WSGI application" scl_url: "s2i-python-container" diff --git a/vars/rhel8-s2i-python-36-container.yml b/vars/rhel8-s2i-python-36-container.yml index 3eb603e..748260c 100644 --- a/vars/rhel8-s2i-python-36-container.yml +++ b/vars/rhel8-s2i-python-36-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "ubi8/python-36" tag_name: "python:3.6-ubi8" -deployment: "oc new-app python:3.6-ubi8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.6/test/setup-test-app/" -pod_name: "s2i-python-container" +deployment: "oc new-app python:3.6-ubi8~https://github.com/sclorg/s2i-python-container.git --name=python-example --context-dir=3.6/test/setup-test-app/" +pod_name: "python-example" add_route: true check_curl_output: "Hello from gunicorn WSGI application" scl_url: "s2i-python-container" diff --git a/vars/rhel8-s2i-python-39-container.yml b/vars/rhel8-s2i-python-39-container.yml index 8b950fb..fca73c1 100644 --- a/vars/rhel8-s2i-python-39-container.yml +++ b/vars/rhel8-s2i-python-39-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "rhel8/python-39" tag_name: "python:3.9-el8" -deployment: "oc new-app python:3.9-el8~https://github.com/sclorg/s2i-python-container.git --context-dir=3.9/test/setup-test-app/" -pod_name: "s2i-python-container" +deployment: "oc new-app python:3.9-el8~https://github.com/sclorg/s2i-python-container.git --name=python-example --context-dir=3.9/test/setup-test-app/" +pod_name: "python-example" add_route: true check_curl_output: "Hello from gunicorn WSGI application" scl_url: "s2i-python-container" diff --git a/vars/rhel8-s2i-ruby-25-container.yml b/vars/rhel8-s2i-ruby-25-container.yml index 725bed1..8586715 100644 --- a/vars/rhel8-s2i-ruby-25-container.yml +++ b/vars/rhel8-s2i-ruby-25-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "rhel8/ruby-25" tag_name: "ruby:2.5-el8" -deployment: "oc new-app ruby:2.5-el8~https://github.com/sclorg/s2i-ruby-container.git --context-dir=2.5/test/puma-test-app/" -pod_name: "s2i-ruby-container" +deployment: "oc new-app ruby:2.5-el8~https://github.com/sclorg/s2i-ruby-container.git --name=ruby-example --context-dir=2.5/test/puma-test-app/" +pod_name: "ruby-example" add_route: true check_curl_output: "Hello world" scl_url: "s2i-ruby-container" diff --git a/vars/rhel8-s2i-ruby-31-container.yml b/vars/rhel8-s2i-ruby-31-container.yml index b75cae5..18f77bb 100644 --- a/vars/rhel8-s2i-ruby-31-container.yml +++ b/vars/rhel8-s2i-ruby-31-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "ubi8/ruby-31" tag_name: "ruby:3.1-ubi8" -deployment: "oc new-app ruby:3.1-ubi8~https://github.com/sclorg/s2i-ruby-container.git --context-dir=3.1/test/puma-test-app/" -pod_name: "s2i-ruby-container" +deployment: "oc new-app ruby:3.1-ubi8~https://github.com/sclorg/s2i-ruby-container.git --name=ruby-example --context-dir=3.1/test/puma-test-app/" +pod_name: "ruby-example" add_route: true check_curl_output: "Hello world" scl_url: "s2i-ruby-container" diff --git a/vars/rhel8-s2i-ruby-33-container.yml b/vars/rhel8-s2i-ruby-33-container.yml index 0ecfbd0..ee59048 100644 --- a/vars/rhel8-s2i-ruby-33-container.yml +++ b/vars/rhel8-s2i-ruby-33-container.yml @@ -1,7 +1,7 @@ registry_redhat_io: "ubi8/ruby-33" tag_name: "ruby:3.3-ubi8" -deployment: "oc new-app ruby:3.3-ubi8~https://github.com/sclorg/s2i-ruby-container.git --context-dir=3.3/test/puma-test-app/" -pod_name: "s2i-ruby-container" +deployment: "oc new-app ruby:3.3-ubi8~https://github.com/sclorg/s2i-ruby-container.git --name=ruby-example --context-dir=3.3/test/puma-test-app/" +pod_name: "ruby-example" add_route: true check_curl_output: "Hello world" scl_url: "s2i-ruby-container" diff --git a/vars/rhel9-mariadb-1011-container.yml b/vars/rhel9-mariadb-1011-container.yml index fa0a08e..8b7a597 100644 --- a/vars/rhel9-mariadb-1011-container.yml +++ b/vars/rhel9-mariadb-1011-container.yml @@ -1,14 +1,11 @@ registry_redhat_io: "rhel9/mariadb-1011" tag_name: "mariadb:10.11-el9" -deployment: "oc new-app mariadb:10.11-el9~https://github.com/sclorg/mariadb-container.git \ - --name rhel9-mariadb-1011 \ - --context-dir=examples/extend-image \ - --env MYSQL_OPERATIONS_USER=opuser \ - --env MYSQL_OPERATIONS_PASSWORD=oppass \ - --env MYSQL_DATABASE=opdb \ - --env MYSQL_USER=user \ - --env MYSQL_PASSWORD=pass" -pod_name: "rhel9-mariadb-1011" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/mariadb-container/master/examples/mariadb-persistent-template.json -p MARIADB_VERSION=10.11-el9 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=mariadb-1011 \ + -p MYSQL_DATABASE=opdb \ + -p MYSQL_USER=user \ + -p MYSQL_PASSWORD=pass | oc apply -f -" +pod_name: "mariadb-1011" add_route: true test_exec_command: "./files/check_mariadb_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel9-mariadb-105-container.yml b/vars/rhel9-mariadb-105-container.yml index f6d1c2a..243c15b 100644 --- a/vars/rhel9-mariadb-105-container.yml +++ b/vars/rhel9-mariadb-105-container.yml @@ -1,14 +1,11 @@ registry_redhat_io: "rhel9/mariadb-105" tag_name: "mariadb:10.5-el9" -deployment: "oc new-app mariadb:10.5-el9~https://github.com/sclorg/mariadb-container.git \ - --name rhel9-mariadb-105 \ - --context-dir=examples/extend-image \ - --env MYSQL_OPERATIONS_USER=opuser \ - --env MYSQL_OPERATIONS_PASSWORD=oppass \ - --env MYSQL_DATABASE=opdb \ - --env MYSQL_USER=user \ - --env MYSQL_PASSWORD=pass" -pod_name: "rhel9-mariadb-105" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/mariadb-container/master/examples/mariadb-persistent-template.json -p MARIADB_VERSION=10.5-el9 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=mariadb-105 \ + -p MYSQL_DATABASE=opdb \ + -p MYSQL_USER=user \ + -p MYSQL_PASSWORD=pass | oc apply -f -" +pod_name: "mariadb-105" add_route: true test_exec_command: "./files/check_mariadb_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel9-mysql-80-container.yml b/vars/rhel9-mysql-80-container.yml index eba080b..abb0913 100644 --- a/vars/rhel9-mysql-80-container.yml +++ b/vars/rhel9-mysql-80-container.yml @@ -1,14 +1,11 @@ registry_redhat_io: "rhel9/mysql-80" -tag_name: "mysql:8.0" -deployment: "oc new-app mysql:8.0~https://github.com/sclorg/mysql-container.git \ - --name rhel9-mysql-80 \ - --context-dir=examples/extend-image \ - --env MYSQL_OPERATIONS_USER=opuser \ - --env MYSQL_OPERATIONS_PASSWORD=oppass \ - --env MYSQL_DATABASE=opdb \ - --env MYSQL_USER=user \ - --env MYSQL_PASSWORD=pass" -pod_name: "rhel9-mysql-80" +tag_name: "mysql:8.0-el9" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/mysql-container/master/examples/mysql-persistent-template.json -p MYSQL_VERSION=8.0-el9 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=mysql-80 \ + -p MYSQL_DATABASE=opdb \ + -p MYSQL_USER=user \ + -p MYSQL_PASSWORD=pass | oc apply -f -" +pod_name: "mysql-80" add_route: true test_exec_command: "./files/check_mysql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel9-postgresql-13-container.yml b/vars/rhel9-postgresql-13-container.yml index adaded2..b522e59 100644 --- a/vars/rhel9-postgresql-13-container.yml +++ b/vars/rhel9-postgresql-13-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel9/postgresql-13" tag_name: "postgresql:13-el9" -deployment: "oc new-app postgresql:13-el9~https://github.com/sclorg/postgresql-container.git \ - --name new-postgresql \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "new-postgresql" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=13-el9 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-13 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-13" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel9-postgresql-15-container.yml b/vars/rhel9-postgresql-15-container.yml index df10c02..1504bca 100644 --- a/vars/rhel9-postgresql-15-container.yml +++ b/vars/rhel9-postgresql-15-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel9/postgresql-15" tag_name: "postgresql:15-el9" -deployment: "oc new-app postgresql:15-el9~https://github.com/sclorg/postgresql-container.git \ - --name new-postgresql \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "new-postgresql" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=15-el9 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-15 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-15" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE" diff --git a/vars/rhel9-postgresql-16-container.yml b/vars/rhel9-postgresql-16-container.yml index 8fb6b7b..0da5ac0 100644 --- a/vars/rhel9-postgresql-16-container.yml +++ b/vars/rhel9-postgresql-16-container.yml @@ -1,12 +1,11 @@ registry_redhat_io: "rhel9/postgresql-16" tag_name: "postgresql:16-el9" -deployment: "oc new-app postgresql:16-el9~https://github.com/sclorg/postgresql-container.git \ - --name rhel9-postgresql-16 \ - --context-dir examples/extending-image/ \ - -e POSTGRESQL_USER=user \ - -e POSTGRESQL_DATABASE=db \ - -e POSTGRESQL_PASSWORD=password" -pod_name: "rhel9-postgresql-16" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/postgresql-container/master/examples/postgresql-persistent-template.json -p POSTGRESQL_VERSION=16-el9 -p NAMESPACE={{ oc_project_rhscl }} \ + -p DATABASE_SERVICE_NAME=postgresql-16 \ + -p POSTGRESQL_DATABASE=opdb \ + -p POSTGRESQL_USER=user \ + -p POSTGRESQL_PASSWORD=pass | oc apply -f -" +pod_name: "postgresql-16" add_route: true test_exec_command: "./files/check_postgresql_container.sh" expected_exec_result: "FINE"