Skip to content

Commit

Permalink
removed git config requirements as it's now baked into the CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
zeryx authored Mar 26, 2021
1 parent f8682e1 commit ad61c75
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/algorithm_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,9 @@ def update_algorithm(algo, original_name, algorithm_pairs, remote_client, worksp
git_path = f"https://{algo.username}:{api_key}@git.{api_address.split('https://api.')[-1]}/git/{destination_username}/{destination_algorithm_name}.git"
os.makedirs(artifact_path, exist_ok=True)
os.makedirs(repo_path, exist_ok=True)
# sh.git.config("--global", "user.email", "[email protected]")
# sh.git.config("--global", "user.name", "CI")
clone_bake = sh.git.bake(C=workspace_path)
publish_bake = sh.git.bake(C=repo_path)
clone_bake.clone(git_path)
# clone_bake.config("user.email", "[email protected]")
# clone_bake.config("user.name", "CI")
sh.rm("-r", f"{repo_path}/src")
sh.cp("-R", f"{artifact_path}/src", f"{repo_path}/src")
sh.cp("-R", f"{artifact_path}/requirements.txt", f"{repo_path}/requirements.txt")
Expand All @@ -82,7 +78,7 @@ def update_algorithm(algo, original_name, algorithm_pairs, remote_client, worksp
sh.mv(f"{repo_path}/src/{original_name}_test.py", f"{repo_path}/src/{destination_algorithm_name}_test.py")
try:
publish_bake.add(".")
publish_bake.commit("--author", "CI <[email protected]>", m="automatic initialization commit")
publish_bake.commit(m="automatic initialization commit")
publish_bake.push()
return algo
except Exception as e:
Expand Down

0 comments on commit ad61c75

Please sign in to comment.