diff --git a/deploy-and-test.yml b/deploy-and-test.yml index 0629291..2b0f0a3 100644 --- a/deploy-and-test.yml +++ b/deploy-and-test.yml @@ -24,6 +24,16 @@ - rhel8-dotnet70-container dotnet: "{{ dotnet_60 + dotnet_70}}" tasks: + - name: Modify OpenShift project to rhscl-ci-testing-s2i if s2i + set_fact: + oc_project_rhscl: "{{ oc_project_rhscl }}-s2i" + when: (ext_test is defined) and (ext_test == "s2i") + + - name: Modify OpenShift project to rhscl-ci-testing-nos2i if nos2i + set_fact: + oc_project_rhscl: "{{ oc_project_rhscl }}-nos2i" + when: (ext_test is defined) and (ext_test == "nos2i") + - name: Check temporary directory and create XML unit file block: - name: Remove directory @@ -54,13 +64,13 @@ - name: Clone and test upstream container repositories include_tasks: ./tasks/verify_in_openshift.yml loop: - - rhel7-nodejs-ex-14 + #- 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-perl-530-container - rhel7-s2i-ruby-30-container - rhel7-s2i-python-38-container - rhel8-nodejs-ex-16 @@ -142,8 +152,8 @@ - name: Check s2i containers include_tasks: ./tasks/verify_in_openshift.yml loop: - - rhel7-nodejs-ex-14 - - rhel7-s2i-perl-530-container + #- rhel7-nodejs-ex-14 + #- rhel7-s2i-perl-530-container - rhel7-s2i-ruby-30-container - rhel7-s2i-python-38-container - rhel8-nodejs-ex-16 diff --git a/tasks/clone_scl_repo.yml b/tasks/clone_scl_repo.yml index 4e19e68..3be7f9b 100644 --- a/tasks/clone_scl_repo.yml +++ b/tasks/clone_scl_repo.yml @@ -1,6 +1,6 @@ - name: Clone {{ stuff.scl_url }} repository git: - repo: "https://github.com/sclorg/{{ stuff.scl_url }}.git" + repo: "https://github.com/sclorg/{{ stuff.scl_url }}" dest: "{{ scl_dir }}" recursive: yes changed_when: false diff --git a/tasks/openshift_deploy.yml b/tasks/openshift_deploy.yml index df903c2..8f881df 100644 --- a/tasks/openshift_deploy.yml +++ b/tasks/openshift_deploy.yml @@ -38,4 +38,6 @@ retries: 10 delay: 20 when: (deploy_cmd.rc == 0) and (cluster_name.rc == 0) + + - debug: var=route_cmd when: file_exists.stat.exists diff --git a/tasks/openshift_test.yml b/tasks/openshift_test.yml index 70f4c29..32ea553 100644 --- a/tasks/openshift_test.yml +++ b/tasks/openshift_test.yml @@ -1,4 +1,6 @@ - block: + - debug: var=stuff + - name: Check curl command is working uri: url: "http://{{ route_cmd.stdout }}" diff --git a/tasks/verify_in_openshift.yml b/tasks/verify_in_openshift.yml index 62cf203..ac587e0 100644 --- a/tasks/verify_in_openshift.yml +++ b/tasks/verify_in_openshift.yml @@ -26,11 +26,11 @@ testsuite_attrs: "{{ testsuite_attributes.matches[0].testsuite }}" - name: Get list of projects for RHSCL - shell: "oc projects | grep rhscl-ci-testing" + shell: "oc projects | grep {{ oc_project_rhscl }}" changed_when: false register: oc_projects ignore_errors: yes - when: (ext_test == "") + 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" @@ -51,7 +51,7 @@ - name: Create project {{ oc_project_rhscl }} shell: "oc new-project {{ oc_project_rhscl }}" when: oc_project_status.rc != 0 - when: (ext_test == "") + when: (ext_test == "") or (ext_test == "s2i") or (ext_test == "nos2i") - block: - name: Check if project {{ oc_project_dotnet }} exists @@ -121,6 +121,7 @@ - name: oc delete all command: oc delete all,cm,secrets,pvc --all --grace-period=0 --force changed_when: false + ignore_errors: yes when: file_exists.stat.exists diff --git a/vars/rhel7-nodejs-ex-14.yml b/vars/rhel7-nodejs-ex-14.yml index 0892d35..dfb92a5 100644 --- a/vars/rhel7-nodejs-ex-14.yml +++ b/vars/rhel7-nodejs-ex-14.yml @@ -2,6 +2,7 @@ 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 -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" scl_url: "nodejs-ex" +curl_output_format: "raw" is_name: "nodejs" \ No newline at end of file diff --git a/vars/rhel8-cakephp-ex-73.yml b/vars/rhel8-cakephp-ex-73.yml index 5b4291f..060dad9 100644 --- a/vars/rhel8-cakephp-ex-73.yml +++ b/vars/rhel8-cakephp-ex-73.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi8/php-73" tag_name: "php:7.3-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=7.3-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=7.3-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "cakephp-example" check_curl_output: "Welcome to your CakePHP application on OpenShift" scl_url: "cakephp-ex" diff --git a/vars/rhel8-cakephp-ex-74.yml b/vars/rhel8-cakephp-ex-74.yml index 3924134..38eb78e 100644 --- a/vars/rhel8-cakephp-ex-74.yml +++ b/vars/rhel8-cakephp-ex-74.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi8/php-74" tag_name: "php:7.4-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=7.4-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=7.4-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "cakephp-example" check_curl_output: "Welcome to your CakePHP application on OpenShift" scl_url: "cakephp-ex" diff --git a/vars/rhel8-cakephp-ex-80.yml b/vars/rhel8-cakephp-ex-80.yml index b298c5f..133d23c 100644 --- a/vars/rhel8-cakephp-ex-80.yml +++ b/vars/rhel8-cakephp-ex-80.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi8/php-80" tag_name: "php:8.0-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.0-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.0-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "cakephp-example" check_curl_output: "Welcome to your CakePHP application on OpenShift" scl_url: "cakephp-ex" diff --git a/vars/rhel8-cakephp-ex-81.yml b/vars/rhel8-cakephp-ex-81.yml index a2a9017..f636f87 100644 --- a/vars/rhel8-cakephp-ex-81.yml +++ b/vars/rhel8-cakephp-ex-81.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi8/php-81" tag_name: "php:8.1-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.1-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.1-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "cakephp-example" check_curl_output: "Welcome to your CakePHP application on OpenShift" scl_url: "cakephp-ex" diff --git a/vars/rhel8-nodejs-ex-16.yml b/vars/rhel8-nodejs-ex-16.yml index 0927d85..4522b6b 100644 --- a/vars/rhel8-nodejs-ex-16.yml +++ b/vars/rhel8-nodejs-ex-16.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi8/nodejs-16" tag_name: "nodejs:16-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=16-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=16-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel8-nodejs-ex-18-minimal.yml b/vars/rhel8-nodejs-ex-18-minimal.yml index c72bf8f..1240f23 100644 --- a/vars/rhel8-nodejs-ex-18-minimal.yml +++ b/vars/rhel8-nodejs-ex-18-minimal.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi8/nodejs-18-minimal" tag_name: "nodejs:18-minimal-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-minimal-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-minimal-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel8-nodejs-ex-18.yml b/vars/rhel8-nodejs-ex-18.yml index f2c734f..6f20559 100644 --- a/vars/rhel8-nodejs-ex-18.yml +++ b/vars/rhel8-nodejs-ex-18.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi8/nodejs-18" tag_name: "nodejs:18-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel8-nodejs-ex-20-minimal.yml b/vars/rhel8-nodejs-ex-20-minimal.yml index 0f3c39f..0acdbfd 100644 --- a/vars/rhel8-nodejs-ex-20-minimal.yml +++ b/vars/rhel8-nodejs-ex-20-minimal.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi8/nodejs-20-minimal" tag_name: "nodejs:20-minimal-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-minimal-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-minimal-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel8-nodejs-ex-20.yml b/vars/rhel8-nodejs-ex-20.yml index 596b21a..2c5bbc0 100644 --- a/vars/rhel8-nodejs-ex-20.yml +++ b/vars/rhel8-nodejs-ex-20.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi8/nodejs-20" tag_name: "nodejs:20-ubi8" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-ubi8 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-ubi8 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel9-cakephp-ex-80.yml b/vars/rhel9-cakephp-ex-80.yml index c645582..e77b891 100644 --- a/vars/rhel9-cakephp-ex-80.yml +++ b/vars/rhel9-cakephp-ex-80.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi9/php-80" tag_name: "php:8.0-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.0-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.0-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "cakephp-example" check_curl_output: "Welcome to your CakePHP application on OpenShift" scl_url: "cakephp-ex" diff --git a/vars/rhel9-cakephp-ex-81.yml b/vars/rhel9-cakephp-ex-81.yml index 93c7b5a..8fdbf71 100644 --- a/vars/rhel9-cakephp-ex-81.yml +++ b/vars/rhel9-cakephp-ex-81.yml @@ -1,6 +1,6 @@ registry_redhat_io: "ubi9/php-81" tag_name: "php:8.1-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.1-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/cakephp-ex/master/openshift/templates/cakephp.json -p PHP_VERSION=8.1-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "cakephp-example" check_curl_output: "Welcome to your CakePHP application on OpenShift" scl_url: "cakephp-ex" diff --git a/vars/rhel9-nodejs-ex-16.yml b/vars/rhel9-nodejs-ex-16.yml index 87f556b..c01fd63 100644 --- a/vars/rhel9-nodejs-ex-16.yml +++ b/vars/rhel9-nodejs-ex-16.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi9/nodejs-16" tag_name: "nodejs:16-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=16-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=16-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel9-nodejs-ex-18-minimal.yml b/vars/rhel9-nodejs-ex-18-minimal.yml index 61796ca..9381069 100644 --- a/vars/rhel9-nodejs-ex-18-minimal.yml +++ b/vars/rhel9-nodejs-ex-18-minimal.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi9/nodejs-18-minimal" tag_name: "nodejs:18-minimal-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-minimal-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-minimal-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel9-nodejs-ex-18.yml b/vars/rhel9-nodejs-ex-18.yml index c27a8cc..8a14f11 100644 --- a/vars/rhel9-nodejs-ex-18.yml +++ b/vars/rhel9-nodejs-ex-18.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi9/nodejs-18" tag_name: "nodejs:18-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=18-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel9-nodejs-ex-20-minimal.yml b/vars/rhel9-nodejs-ex-20-minimal.yml index 8a9e997..683d138 100644 --- a/vars/rhel9-nodejs-ex-20-minimal.yml +++ b/vars/rhel9-nodejs-ex-20-minimal.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi9/nodejs-20-minimal" tag_name: "nodejs:20-minimal-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-minimal-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-minimal-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs" diff --git a/vars/rhel9-nodejs-ex-20.yml b/vars/rhel9-nodejs-ex-20.yml index 25e0610..197f602 100644 --- a/vars/rhel9-nodejs-ex-20.yml +++ b/vars/rhel9-nodejs-ex-20.yml @@ -1,7 +1,8 @@ registry_redhat_io: "ubi9/nodejs-20" tag_name: "nodejs:20-ubi9" -deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-ubi9 -p NAMESPACE=rhscl-ci-testing | oc apply -f -" +deployment: "oc process -f https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json -p NODEJS_VERSION=20-ubi9 -p NAMESPACE={{ oc_project_rhscl }} | oc apply -f -" pod_name: "nodejs-example" -check_curl_output: "Welcome to your Node.js application on OpenShift" +check_curl_output: "Node.js Crud Application" +curl_output_format: "raw" scl_url: "nodejs-ex" is_name: "nodejs"