diff --git a/gitea/gitea.yaml b/gitea/gitea.yaml index bf8b033..02d7137 100644 --- a/gitea/gitea.yaml +++ b/gitea/gitea.yaml @@ -193,9 +193,20 @@ data: execline-cd /data/k8s-apps git push http://shodan:$SHODAN_PW@localhost:3000/Undercloud/k8s-apps.git --all echo "delete local copy..." #execline-cd /data rm -Rf k8s-apps + echo "create PushMirror.." - ./ctea --username shodan --password $SHODAN_PW --url http://localhost:3000 AddPushMirror undercloud k8aux-apps "http://aux1.undercloud.cf.:3000/undercloud/k8aux-apps.git" shodan $SHODAN_PW 1h0m0s - ./ctea --username shodan --password $SHODAN_PW --url http://localhost:3000 AddPushMirror undercloud k8aux-apps "http://aux2.undercloud.cf.:3000/undercloud/k8aux-apps.git" shodan $SHODAN_PW 1h0m0s + #./ctea --username shodan --password $SHODAN_PW --url http://localhost:3000 AddPushMirror undercloud k8s-apps "http://git.undercloud.local:3000/Undercloud/k8s-apps.git" shodan $SHODAN_PW 1h0m0s + + # Add push mirror to Undercloud/k8s-apps + curl -sS -u "shodan:${SHODAN_PW}" \ + -H 'Content-Type: application/json' \ + -X POST http://localhost:3000/api/v1/repos/Undercloud/k8s-apps/push_mirrors \ + -d '{"remote_address":"http://git.undercloud.local:3000/Undercloud/k8s-apps.git","remote_username":"shodan","remote_password":"'"$SHODAN_PW"'","interval":"1h0m0s","sync_on_commit":false}' + + # optional: trigger immediate sync of all push mirrors for this repo + curl -sS -u "shodan:${SHODAN_PW}" -X POST http://localhost:3000/api/v1/repos/Undercloud/k8s-apps/push_mirrors-sync + + echo "create startup.ran file..." touch /data/startup.ran else