Changes at TravisCI- affecting open source
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Changes at TravisCI- affecting open source
@Przemo:
I saw you posted some link how to synchronise a gitlab repo with a github earlier this month. I can not fine it. All what I found uses shell script wich runs in background and pulls from github and pushes to gitlab. Have you found something different?
I saw you posted some link how to synchronise a gitlab repo with a github earlier this month. I can not fine it. All what I found uses shell script wich runs in background and pulls from github and pushes to gitlab. Have you found something different?
Re: Changes at TravisCI- affecting open source
https://docs.gitlab.com/ee/user/project ... oring.html this looks better than bash scripts for me ... If it runs on the machine the docker is on we would have a automatic CI again.
Re: Changes at TravisCI- affecting open source
I hopefully get it to work on the fork as well ...
Re: Changes at TravisCI- affecting open source
Yes, that's the link. The option isn't available without FreeCAD core devs applying for a premium licence or going self-hosting. I think that a bash script on cron on a server is good enough for now. You already have the script - can you post it? I'll try to set it up on my server when I'm back.
Re: Changes at TravisCI- affecting open source
by the use of gitpython ... but I do not know how to push without typing username and password ...
Code: Select all
"""
cd /home/hugo/Documents/dev/freecad/freecadprzemo_ci/freecad
git fetch freecad
git status
git checkout bernd
git rebase freecad/master
git push -f
"""
import os
from git import Repo
# get the repo, raise exception if directory not exist or no git repo exists
the_git_repo_dir = "/home/hugo/Documents/dev/freecad/freecadprzemo_ci/freecad"
if not os.path.isdir(the_git_repo_dir):
raise Exception("\nERROR, Given directory does not exist: {}\n".format())
try:
repo = Repo(the_git_repo_dir)
except Exception:
raise Exception("\nERROR, a git repo does not exist in {}.\n".format(the_git_repo_dir))
# fetch remote "freecad"
for remote in repo.remotes:
if remote.name == "freecad":
remote.fetch()
# check if status is clean?!
print(repo.git.status())
if "nothing to commit, working tree clean" not in repo.git.status():
raise Exception("\nERROR, working dir is not clean.\n")
#all_branches = repo.git.branch("--all").split()
#if "bernd" not in all_branches:
# raise Exception("\nERROR, branch 'bernd' not found.\n")
repo.git.checkout("bernd")
repo.git.rebase("freecad/master")
origin = repo.remote("origin")
origin.push(force=True)
# repo.git.log("-1", "--oneline")
Re: Changes at TravisCI- affecting open source
Thanks! Ssh key maybe? I never used gitpython
Re: Changes at TravisCI- affecting open source
it runs on my repo as well ...
Re: Changes at TravisCI- affecting open source
- the basics where merged into main FreeCAD main repo git commit 26dfd72143ed7d
Next Try. mirrowing FreeCAD from github on gitlab:
- on gitlab create a new project
- choose "Run CI/CD for external repository" ("connect your external repository to Gitlab CI/CD")
- use https://github.com/FreeCAD/FreeCAD/ as repository to mirror. Means the repo on github will be sycronised automaticly
- the master branch of the gitlab repo needs to be unprotected
- https://gitlab.com/berndhahnebach/FreeCAD (see last sycronised action right on the top of the page)
set up CI on the mirrow:
- set the path to CI config file in gitlab CI settings
- deactivate the shared runners
- register the runner from my local machine
- start the runner from my local machine
- commit in CI editor on gitlab
- watch what happens on ... https://gitlab.com/berndhahnebach/FreeCAD/-/jobs
.
Next Try. mirrowing FreeCAD from github on gitlab:
- on gitlab create a new project
- choose "Run CI/CD for external repository" ("connect your external repository to Gitlab CI/CD")
- use https://github.com/FreeCAD/FreeCAD/ as repository to mirror. Means the repo on github will be sycronised automaticly
- the master branch of the gitlab repo needs to be unprotected
- https://gitlab.com/berndhahnebach/FreeCAD (see last sycronised action right on the top of the page)
set up CI on the mirrow:
- set the path to CI config file in gitlab CI settings
- deactivate the shared runners
- register the runner from my local machine
- start the runner from my local machine
- commit in CI editor on gitlab
- watch what happens on ... https://gitlab.com/berndhahnebach/FreeCAD/-/jobs
.
Re: Changes at TravisCI- affecting open source
Thanks for merging! If we can convince Yourik to complete the setup we could have the CI running on the main repo