Fixing an idempotency problem found in testing.
This commit is contained in:
@@ -64,7 +64,10 @@ def clone_repository():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
repository = 'https://github.com/GoogleCloudPlatform/kubernetes.git'
|
repository = 'https://github.com/GoogleCloudPlatform/kubernetes.git'
|
||||||
kubernetes_directory = '/opt/kubernetes'
|
kubernetes_directory = path('/opt/kubernetes')
|
||||||
|
# Since we can not clone twice, check for the directory and remove it.
|
||||||
|
if kubernetes_directory.isdir():
|
||||||
|
kubernetes_directory.rmtree_p()
|
||||||
|
|
||||||
command = ['git', 'clone', repository, kubernetes_directory]
|
command = ['git', 'clone', repository, kubernetes_directory]
|
||||||
print(command)
|
print(command)
|
||||||
|
Reference in New Issue
Block a user