Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7222: Allow technique auto-commit disable #763

Conversation

matya
Copy link
Contributor

@matya matya commented Oct 15, 2015

When an update is done, and one has customized some system techniques,
the automatic git commit and technique library reload may not be wanted.

This commit allows to specify an environment variable during an update
to disable this automated commit and warns the user to do that manually.

@peckpeck
Copy link
Member

Sorry, I hadn't seen the previous PR

# Schedule a Technique library reload because of the update
trigger_technique_library_reload
if [ x"$RUDDER_NO_TECHNIQUE_AUTOCOMMIT" != x"1" ]; then
cd ${CONFIGURATION_REPOSITORY}/ && git add -A ${2} && git commit -m "Upgrade system Techniques from ${SRCTECHDIR} - automatically done by rudder-upgrade script" >/dev/null 2>&1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's not some code you wrote, but can you always use the "${VAR}" form ?

When an update is done, and one has customized some system techniques,
the automatic git commit and technique library reload may not be wanted.

This commit allows to specify an environment variable during an update
to disable this automated commit and warns the user to do that manually.
@matya matya force-pushed the patch-7222-disable-autocommit-of-system-policy branch from 7278092 to 9d179fb Compare October 16, 2015 19:26
@matya
Copy link
Contributor Author

matya commented Oct 16, 2015

@peckpeck a few more, and I get used to your coding style... :)

cd ${CONFIGURATION_REPOSITORY}/ && git add -A ${2} && git commit -m "Upgrade system Techniques from ${SRCTECHDIR} - automatically done by rudder-upgrade script" >/dev/null 2>&1
# Schedule a Technique library reload because of the update
trigger_technique_library_reload
if [ x"${RUDDER_NO_TECHNIQUE_AUTOCOMMIT}" != x"1" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the x is unnecessary here

@peckpeck
Copy link
Member

Good, merging

peckpeck added a commit that referenced this pull request Feb 19, 2016
…ystem-policy

Fixes #7222: Allow technique auto-commit disable
@peckpeck peckpeck merged commit 00c0f99 into Normation:branches/rudder/2.11 Feb 19, 2016
@matya matya deleted the patch-7222-disable-autocommit-of-system-policy branch February 19, 2016 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants