LF automatic process when a new repo is created

Following information is coming from LF ticket IT-21516

---

The process is actually all automated from the moment a new repo is requested. 

When you request a new repo, an LF Gerrit is created with all the details. After that change is merged, automation basically does this:



  • In SAML/LDAP:

    • A committers group is created with the members described in the INFO.yaml

  • In Gerrit:

  •  

    • The repo is created

    • All the repo permissions for repo owners are linked with the SAML group created previously.

    • A Gerrit native group for this repo is created. The committers for this repo will be added once they re-login after the new repo is created. (In general, after a new repo is created, we ask users to re-login to get their permissions kicked in). This native group is used for adding the members as reviewers when a new change is pushed. 

    • A mirror repo is created in GitHub 

  • In Jenkins:

    • A credential is created with username "repo-name" and random password

    • A settings file "repo-name-settings" is created and it contains all serverIDs for Nexus2 (ecomp serverId's), docker registries (one for each port) for Nexus3 and dockerhub access. 

    • The settings file matches each entry with the credential created earlier.

  • In Nexus3:

    • A new local user "repo-name" is created and its given permissions to push docker images in ports 10003 (snapshots), 10004 (staging), 10002 (release). And it's given read access to port 10001 (public)

    • The password of the user matches the one created in Jenkins

  • In Nexus2:

    • A new local user is created and specific privileges are given to this user to only post artifacts under "org/onap/repo-name". This way, we prevent other users from posting in all repos and only allow them to post into their repo path.

    • The password of the user matches the one created in Jenkins



Let me know if this information helps. We actually used to do this manually which was quite a bit of work. In case you are interested, here are some tutorials:

---