openshift / pipelines-tutorial

A step-by-step tutorial showing OpenShift Pipelines
Apache License 2.0
299 stars 631 forks source link

pipelines run failed during the build push with unauthorized: authentication required #4

Closed dwojciec closed 5 years ago

dwojciec commented 5 years ago

Testing this tutorial on a OCP 4.1.2 version and after creating the PipelineRun, I'm checking the logs : tkn pr logs petclinic-deploy-pipelinerun-6d94f -f

[build : build] [INFO] BUILD SUCCESS
[build : build] [INFO] ------------------------------------------------------------------------
[build : build] [INFO] Total time: 53.768 s
[build : build] [INFO] Finished at: 2019-06-21T08:58:28Z
[build : build] [INFO] Final Memory: 93M/197M
[build : build] [INFO] ------------------------------------------------------------------------
[build : build] [WARNING] The requested profile "openshift" could not be activated because it does not exist.
[build : build] INFO Copying deployments from target to /deployments...
[build : build] '/tmp/src/target/spring-petclinic-2.1.0.BUILD-SNAPSHOT.jar' -> '/deployments/spring-petclinic-2.1.0.BUILD-SNAPSHOT.jar'
[build : build] 8544c38aeb6febc5fcff824b9929639e723324458c1bd64d0afca308c8d42ce5
[build : build] STEP 8: CMD /usr/local/s2i/run
[build : build] STEP 9: COMMIT image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/spring-petclinic
[build : build] 8aa00132f8b1ef9c19d1395cfd4836931d69797da7ac87b4a4a3d38970c59350

[build : image-digest-exporter-build-dlqm4] []

[build : push] Getting image source signatures
[build : push] unauthorized: authentication required

any ideas ?

I tried to update the Task s2i-java-8 from

- default: "true"
      description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS
        registry)
      name: TLSVERIFY

to 
- default: "false"
      description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS
        registry)
      name: TLSVERIFY

but same error . the OCP is a standard OCP 4.1.2 running on AWS (no advanced settings)

dwojciec commented 5 years ago

Problem solved. I deployed the Openshift Pipelines operator in a namespace called pipelines as described in the documentation https://github.com/openshift/pipelines-tutorial/blob/master/install-operator.md and I deployed the tutorial not into pipeline-tutorial but inside pipelines namespaces !!!. the namespace pipeline-tutorial is referenced in several yaml file. I succeeded it by updating all yaml files with pipeline-tutorial. After this successful deployment I dropped all and I installed the operator in a separate pipelines namespace and I deployed the tutorial into a compelte separate namespace called pipelines-tutorial and it's working fine as expected.

build : push] Writing manifest to image destination
[build : push] Successfully pushed //image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/spring-petclinic:latest@sha256:bbc7dfc26980c7257d20973cf5b9aea575b3b7f2bc9ad065d52347a262548cae
[build : push] Storing signatures

[build : image-digest-exporter-push-c8sqq] []

[build : nop] Build successful

[deploy : oc] deploymentconfig.apps.openshift.io/spring-petclinic rolled out

[deploy : nop] Build successful