siamaksade / openshift-jenkins-demo

CI/CD Demo on OpenShift
http://www.openshift.com
530 stars 928 forks source link

Error when Deploy to Dev #145

Open bfields3 opened 3 years ago

bfields3 commented 3 years ago

While trying both methods of deployment (using automated provision.h script and deleting all projects and then trying manual method), The same error appears while trying to depoy to dev. It seems as if changing project names outside of cicd, stage, or dev produces the error. Erri is as follows:


sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+ cp target/openshift-tasks.war target/ROOT.war
[Pipeline] script
[Pipeline] {
[Pipeline] echo

[Pipeline] _OcContextInit
[Pipeline] _OcContextInit
[Pipeline] readFile
[Pipeline] _OcAction
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Deploy DEV)
[Pipeline] script
[Pipeline] {
[Pipeline] _OcContextInit
[Pipeline] _OcContextInit
[Pipeline] readFile
[Pipeline] _OcAction
[rollout:latest:deploymentconfig/tasks] Error from server (NotFound): deploymentconfigs.apps.openshift.io "tasks" not found```
rbaumgar commented 3 years ago

same problem here OpenShift 4.6.6

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.029 s
[INFO] Finished at: 2020-12-07T10:55:38Z
[INFO] ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build Image)
[Pipeline] sh
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+ cp target/openshift-tasks.war target/ROOT.war
rbaumgar commented 3 years ago

Found reason! I deployed with

./provision.sh deploy --enable-quay --quay-username rbaumgar@redhat.com --quay-password password

errors in cicd-demo-installer pod

+ oc new-app --name=tasks --docker-image=quay.io/rbaumgar@redhat.com/tasks-app:latest --allow-missing-images --as-deployment-config -n dev-demo
error: can't include "quay.io/rbaumgar@redhat.com/tasks-app:latest": invalid reference format

+ oc new-app --name=tasks --docker-image=quay.io/rbaumgar@redhat.com/tasks-app:stage --allow-missing-images --as-deployment-config -n stage-demo
error: can't include "quay.io/rbaumgar@redhat.com/tasks-app:stage": invalid reference format

so deploy with quay user-name and not email!