I have some scripts, which create part of repository. Now - i run them manually, and them commit it, create merge requests etc.
I would like to put that job into a schedule job - runned every hour, which after changing something create a new branch and create merge request - so after that i (or any other developer) only need to approve them and merge.
How to achieve something like it?
I think about schedule job started on master every hour and put there credentials(ssh key?) to push into repository? How to automaticly create a merge request after creating a new branch? API?
You can create a git token to access the repository. I am using this to push tags git push --tags "https://${CI_GIT_USER}:${CI_GIT_TOKEN}@${CI_REPOSITORY_URL#*@}"
For this to work you need to create user ant token and store them in CI/DI settings.
Yes, it’s something what can work. But - it need to have an “system” user in gitlab($$$). Better idea is using ssh to push code.
But - for MR there is need for an user… I still look for working idea
It’s not so easy. I can use it to commit files, but - not for push nor create MR. For pushing - i can use ssh-key which is added as deploy key with write permission. But for create MR i need real token of user who is able to create MR (what mean - who takes a license).
Another problem(?) is that i don’t want do it by hand, but from regular “cronlike” job.
there is need for token of real user. Is there any way to don’t use real users token for create merge request? Something like system token who can create merge requests?
schedule job - i’ve created cron’like entry */10 * * * * - but it still run every 1 hour. Is there any way to run it more often?
we had previously created configuration which put message on slack after every build (failed, or not). Is there any way to don’t put messages on slack for scheduler jobs? I see only option to show failed jobs - which partialy solve that need - but - i would like to put message after every build except scheduled…