Elukey has submitted this change and it was merged.
Change subject: Adding submodules support to the prepare module. Version bump
to 0.1.2
......................................................................
Adding submodules support to the prepare module. Version bump to 0.1.2
This commit is a follow up on the previous attempt to add submodules support.
This time the new code just execute 'git submodule update --init' to update
each submodule's code to their last hash registered in the main repository.
Bug: T130703
Change-Id: I4759306a913067e64fbbba3c6a567e7f0190204b
---
M puppet_compiler/prepare.py
M puppet_compiler/tests/test_prepare.py
M setup.py
3 files changed, 6 insertions(+), 3 deletions(-)
Approvals:
Elukey: Looks good to me, approved
jenkins-bot: Verified
diff --git a/puppet_compiler/prepare.py b/puppet_compiler/prepare.py
index 729ad4b..6a61b21 100644
--- a/puppet_compiler/prepare.py
+++ b/puppet_compiler/prepare.py
@@ -138,7 +138,9 @@
git.fetch('-q', 'https://gerrit.wikimedia.org/r/operations/puppet',
ref)
git.checkout('FETCH_HEAD')
- git.pull('--rebase', 'origin', 'production',
'--recurse-submodules=yes')
+ git.pull('--rebase', 'origin', 'production')
+ # Update submodules according to the last hash of the parent repo.
+ git.submodule('update', '--init')
def _sh(command):
try:
diff --git a/puppet_compiler/tests/test_prepare.py
b/puppet_compiler/tests/test_prepare.py
index f68edd3..add277b 100644
--- a/puppet_compiler/tests/test_prepare.py
+++ b/puppet_compiler/tests/test_prepare.py
@@ -64,7 +64,8 @@
calls = [
mock.call(['git', 'fetch', '-q',
'https://gerrit.wikimedia.org/r/operations/puppet',
'refs/changes/50/227450/1']),
mock.call(['git', 'checkout', 'FETCH_HEAD']),
- mock.call(['git', 'pull', '--rebase', 'origin', 'production',
'--recurse-submodules=yes'])
+ mock.call(['git', 'pull', '--rebase', 'origin', 'production']),
+ mock.call(['git', 'submodule', 'update', '--init'])
]
mocker.assert_has_calls(calls)
diff --git a/setup.py b/setup.py
index e6a8ebb..4196d90 100755
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@
setup(
name='puppet_compiler',
- version='0.1.1',
+ version='0.1.2',
description='Tools to compile puppet catalogs as a service',
author='Joe',
author_email='[email protected]',
--
To view, visit https://gerrit.wikimedia.org/r/279117
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4759306a913067e64fbbba3c6a567e7f0190204b
Gerrit-PatchSet: 4
Gerrit-Project: operations/software/puppet-compiler
Gerrit-Branch: master
Gerrit-Owner: Elukey <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits