siamaksade / openshift-jenkins-demo

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

Openshift 4.2 and Gogs #133

Open jmacioci opened 4 years ago

jmacioci commented 4 years ago

Has anyone tried to deploy this on OCP 4.2? The Gogs pod will not stay running and fails. This works fine in 4.1.

--> Scaling gogs-1 to 1 error: update acceptor rejected gogs-1: pods for rc 'cicd-poc/gogs-1' took longer than 600 seconds to become available

Thanks, John

ddrozdow commented 4 years ago

Hi there,

for me it worked to change the Deplyoment Config of the Gogs PostgreSQL Pod. I changed the name of the ImageStreamTag to: name: 'postgresql:9.6' .

Then I started a new Rollout of the PostgreSQL DC and the GOGS DC. It all came up then.

Maybe this workaround helps.

cheeers,

Daniel

jmacioci commented 4 years ago

Thank you for the recommendation. I made the change and both Gogs pods are up and running. However, when I attempt a build, I get the following error (this ran OK in 4.1):

Cloning the remote Git repository ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git fetch --tags --progress http://gogs:3000/gogs/openshift-tasks.git +refs/heads/:refs/remotes/origin/" returned status code 128: stdout: stderr: fatal: repository 'http://gogs:3000/gogs/openshift-tasks.git/' not found

ddrozdow commented 4 years ago

ok so it worked for me, but I had to add the route to gogs manually. Did you login to gogs? It might be that the user has not been created. I had to do this too. So check if you can login. And also are there any errors in the installer pod? It should be visibly in the logs, if the user was created or not.

jmacioci commented 4 years ago

After some further debugging, I found the parameter DEPLOY_CHE was not being recognized by the oc new-app command in provision.sh. (see below). I created a backup of provision.sh and removed DEPLOY_CHE as a parameter from the oc new-app command. I re-ran provision.sh and it built all the components, fetched the code into gogs, and ran a successful build. Except now I don't have CHE as an IDE to edit the java code.

Fuangwith-Bkk commented 4 years ago

In OCP 4.2, Gogs is work for me but Project is not analyzed in SonarQube and show following message: No analysis has been performed since creation. The only available section is the configuration