Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstarter tests: Verifying Jenkins run attachments fails #1124

Open
cschweikert opened this issue Mar 28, 2022 · 0 comments
Open

Quickstarter tests: Verifying Jenkins run attachments fails #1124

cschweikert opened this issue Mar 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@cschweikert
Copy link
Member

Decription

When running the quickstarter tests the verification of the Jenkins run attachments fails. This issue has to do with a failed calculation of the build url (see below for more details).

Steps to reproduce the behavior:

  1. Go to a local checkout of ods-core.
  2. Switch to subfolder ./tests
  3. Run make test-quickstarter QS=fe-angular
  4. QS provisioning and first build was successful, the verification of the build artifiacts of this first build might fail.

Expected behavior:

The verification script detects existance of an artifact file called /artifact/artifacts/SCRR-UNITT-fe-angular-test.docx.

Affected version:

  • OpenShift: 4.8
  • OpenDevStack: 4.x

Log Output (ensure to remove any confidential information like tokens, project names, etc.

...
Pipeline: run-unitt-fe-angular-test-unitt, build name from response: run-unitt-fe-angular-test-unitt-master-9
Verifying Jenkins run attachments of run-unitt-fe-angular-test-unitt-master-9 ...
Getting artifact: SCRR-unitt-fe-angular-test.docx from project: unitt-cd for build run-unitt-fe-angular-test-unitt-master-9
    TestQuickstarter/fe-angular: quickstarter_test.go:324: Could not execute tests/scripts/get-artifact-from-jenkins-run.sh
         - err:exit status 3
        out:
        grabbing artifact from /artifact/artifacts/SCRR-unitt-fe-angular-test.docx - and storing in /tmp
        
        stderr:curl: (3) URL using bad/illegal format or missing URL
        
--- FAIL: TestQuickstarter (0.00s)
    --- FAIL: TestQuickstarter/fe-angular (104.72s)
FAIL
FAIL	github.com/opendevstack/ods-core/tests/quickstarter	105.173s
FAIL
make: *** [test-quickstarter] Error 1

Additional context:

The calculation of the build url works via an oc command from this line:

BUILD_URL=$(oc get -n ${PROJECT} build ${BUILD_NAME} -o jsonpath='{.metadata.annotations.openshift\.io/jenkins-build-uri}')

An example call of this line looks like this:

oc get -n unitt-cd build run-unitt-fe-angular-test-unitt-master-1 -o jsonpath='{.metadata.annotations.openshift\.io/jenkins-build-uri}'

When calling this exmaple command directly the response looks like this:

I0328 13:44:49.206993   63116 request.go:621] Throttling request took 1.142624135s, request: GET:https://api.MYCLUSTER.openshiftapps.com:6443/apis/kafka.strimzi.io/v1beta1?timeout=32s
https://jenkins-unitt-cd.apps.MYCLUSTER.openshiftapps.com/job/unitt-cd/job/unitt-cd-run-unitt-fe-angular-test-unitt-master/1/%

I'd rather expect an output with just the URL and without the % sign at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant