4242 fi
4343 curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
4444 sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
45+ - name : Installing oc binary
46+ shell : bash
47+ run : |
48+ if command -v oc >/dev/null 2>&1; then
49+ echo "oc is already installed...yay"
50+ exit 0
51+ fi
52+ OC_VERSION=$(curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/release.txt | grep 'Name:' | awk '{print $2}')
53+ curl -LO "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VERSION}/openshift-client-linux.tar.gz"
54+ tar -xzf openshift-client-linux.tar.gz oc
55+ sudo mv oc /usr/local/bin/oc
56+ oc version --client
4557
4658 - name : Install opm cli
4759 shell : bash
@@ -83,12 +95,20 @@ jobs:
8395
8496 - name : Set preupgrade konveyor value
8597 run : |
86- konveyor_version=$(kubectl get csv -n konveyor-tackle -o=custom-columns=:spec.version | head -n 1 | tr -d '[:space:]')
98+ konveyor_version=$(kubectl get csv -n konveyor-tackle -o=custom-columns=:spec.version | head -n 2 | tr -d '[:space:]')
8799 echo "mtaVersion=$konveyor_version" >> $GITHUB_ENV
100+ echo "Konveyor version: $konveyor_version"
101+
102+ - name : Display konveyor version for confirmation
103+ run : |
104+ echo "Confirming konveyor version from environment variable: $mtaVersion"
105+ echo "Environment variable mtaVersion value: ${{ env.mtaVersion }}"
88106
89107 - name : Use mtaVersion
90108 run : echo "Konveyor version is $mtaVersion"
91109
110+
111+
92112 - name : Check pod status
93113 run : kubectl get pods -n konveyor-tackle
94114
@@ -118,12 +138,23 @@ jobs:
118138 - name : Install NPM
119139 run : npm install .
120140
141+ - name : Set Keycloak admin password and git credentials
142+ run : |
143+ keycloak_password=$(kubectl get secret tackle-keycloak-sso -n konveyor-tackle -o=jsonpath='{.data.admin-password}' | base64 -d)
144+ echo "cypress_keycloakAdminPassword=$keycloak_password" >> $GITHUB_ENV
145+
121146 - name : Run cypress login test
122147 run : npx cypress run --spec "cypress/e2e/tests/login.test.ts" --env user="admin",pass="password",tackleUrl=${{ env.CYPRESS_tackleUrl }}
123148
124149 - name : Run Preupgrade test cases
125150 run : |
126- CYPRESS_INCLUDE_TAGS=@pre-upgrade npx cypress run --spec cypress/e2e/tests/upgrade/create_upgrade_data.test.ts --env user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }}
151+ CYPRESS_INCLUDE_TAGS=@pre-upgrade npx cypress run --spec cypress/e2e/tests/upgrade/create_upgrade_data.test.ts --env user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }},git_user=${{ secrets.KONVEYOR_GIT_USER }},git_password=${{ secrets.KONVEYOR_GIT_PASSWORD }}
152+
153+ - uses : actions/upload-artifact@v4
154+ if : failure()
155+ with :
156+ name : minikube-tests-screenshots
157+ path : /home/runner/work/tackle-ui-tests/tackle-ui-tests/cypress/screenshots/
127158
128159 - name : Checkout to initial branch
129160 run : git checkout $INIT_BRANCH
@@ -139,9 +170,14 @@ jobs:
139170
140171 - name : Set postupgrade konveyor value
141172 run : |
142- konveyor_version=$(kubectl get csv -n konveyor-tackle -o=custom-columns=:spec.version | head -n 1 | tr -d '[:space:]')
173+ konveyor_version=$(kubectl get csv -n konveyor-tackle -o=custom-columns=:spec.version | head -n 2 | tr -d '[:space:]')
143174 echo "mtaVersion=$konveyor_version" >> $GITHUB_ENV
144175
176+ - name : Set Keycloak admin password and git credentials (post-upgrade)
177+ run : |
178+ keycloak_password=$(kubectl get secret tackle-keycloak-sso -n konveyor-tackle -o=jsonpath='{.data.admin-password}' | base64 -d)
179+ echo "cypress_keycloakAdminPassword=$keycloak_password" >> $GITHUB_ENV
180+
145181 - name : Use mtaVersion
146182 run : echo "Konveyor version is $mtaVersion"
147183
@@ -151,10 +187,10 @@ jobs:
151187
152188 - name : Run Post upgrade test cases
153189 run : |
154- CYPRESS_INCLUDE_TAGS=@post-upgrade npx cypress run --spec **/* .test.ts --env user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }}
190+ CYPRESS_INCLUDE_TAGS=@post-upgrade npx cypress run --spec cypress/e2e/tests/upgrade/after_upgrade .test.ts --env user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }},git_user=${{ secrets.KONVEYOR_GIT_USER }},git_password=${{ secrets.KONVEYOR_GIT_PASSWORD }}
155191
156192 - uses : actions/upload-artifact@v4
157193 if : failure()
158194 with :
159195 name : minikube-tests-screenshots
160- path : tackle-ui-tests/cypress/screenshots
196+ path : /home/runner/work/ tackle-ui-tests/tackle-ui-tests/ cypress/screenshots/
0 commit comments