forked from ungleich-public/cdist
Merge branch 'master' into install_integration
This commit is contained in:
commit
26fcbbb4ef
9 changed files with 84 additions and 21 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -30,3 +30,4 @@ build
|
||||||
.lock-*
|
.lock-*
|
||||||
.git-current-branch
|
.git-current-branch
|
||||||
.lock*
|
.lock*
|
||||||
|
.pypi-release
|
||||||
|
|
|
@ -205,11 +205,21 @@ eof
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure we are on the master branch
|
# Ensure we are on the master branch
|
||||||
|
masterbranch=yes
|
||||||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
|
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
|
||||||
echo "Releases are happening from the master branch, aborting"
|
echo "Releases are happening from the master branch, aborting"
|
||||||
|
|
||||||
|
echo "Enter the magic word to release anyway"
|
||||||
|
read magicword
|
||||||
|
|
||||||
|
if [ "$magicword" = "iknowwhatido" ]; then
|
||||||
|
masterbranch=no
|
||||||
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$masterbranch" = yes ]; then
|
||||||
# Ensure version branch exists
|
# Ensure version branch exists
|
||||||
if ! git rev-parse --verify refs/heads/$target_branch 2>/dev/null; then
|
if ! git rev-parse --verify refs/heads/$target_branch 2>/dev/null; then
|
||||||
git branch "$target_branch"
|
git branch "$target_branch"
|
||||||
|
@ -218,6 +228,7 @@ eof
|
||||||
# Merge master branch into version branch
|
# Merge master branch into version branch
|
||||||
git checkout "$target_branch"
|
git checkout "$target_branch"
|
||||||
git merge master
|
git merge master
|
||||||
|
fi
|
||||||
|
|
||||||
# Verify that after the merge everything works
|
# Verify that after the merge everything works
|
||||||
"$0" check-date
|
"$0" check-date
|
||||||
|
@ -236,8 +247,10 @@ eof
|
||||||
"$0" release-git-tag
|
"$0" release-git-tag
|
||||||
|
|
||||||
# Also merge back the version branch
|
# Also merge back the version branch
|
||||||
|
if [ "$masterbranch" = yes ]; then
|
||||||
git checkout master
|
git checkout master
|
||||||
git merge "$target_branch"
|
git merge "$target_branch"
|
||||||
|
fi
|
||||||
|
|
||||||
# Publish git changes
|
# Publish git changes
|
||||||
make pub
|
make pub
|
||||||
|
|
|
@ -58,7 +58,7 @@ case "$state_should" in
|
||||||
|
|
||||||
# Only replace ' with '"'"' and keep \ as they are
|
# Only replace ' with '"'"' and keep \ as they are
|
||||||
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g")
|
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g")
|
||||||
echo "printf '%s\n' '$line_sanitised' >> $file"
|
printf '%s' "printf '%s\n' '$line_sanitised' >> $file"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
absent)
|
absent)
|
||||||
|
|
|
@ -188,7 +188,7 @@ class Local(object):
|
||||||
Return the output as a string.
|
Return the output as a string.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
command = ["/bin/sh", "-e"]
|
command = [ os.environ.get('CDIST_LOCAL_SHELL',"/bin/sh") , "-e"]
|
||||||
command.append(script)
|
command.append(script)
|
||||||
|
|
||||||
return self.run(command=command, env=env, return_output=return_output, message_prefix=message_prefix)
|
return self.run(command=command, env=env, return_output=return_output, message_prefix=message_prefix)
|
||||||
|
|
|
@ -113,7 +113,7 @@ class Remote(object):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
command = ["/bin/sh", "-e"]
|
command = [ os.environ.get('CDIST_REMOTE_SHELL',"/bin/sh") , "-e"]
|
||||||
command.append(script)
|
command.append(script)
|
||||||
|
|
||||||
return self.run(command, env, return_output)
|
return self.run(command, env, return_output)
|
||||||
|
|
|
@ -45,10 +45,7 @@ class Shell(object):
|
||||||
"""Select shell to execute, if not specified by user"""
|
"""Select shell to execute, if not specified by user"""
|
||||||
|
|
||||||
if not self.shell:
|
if not self.shell:
|
||||||
if 'SHELL' in os.environ:
|
self.shell = os.environ.get('SHELL',"/bin/sh")
|
||||||
self.shell = os.environ['SHELL']
|
|
||||||
else:
|
|
||||||
self.shell = "/bin/sh"
|
|
||||||
|
|
||||||
def _init_files_dirs(self):
|
def _init_files_dirs(self):
|
||||||
self.local.create_files_dirs()
|
self.local.create_files_dirs()
|
||||||
|
|
|
@ -6,8 +6,10 @@ Changelog
|
||||||
|
|
||||||
3.0.3:
|
3.0.3:
|
||||||
* Core: Enhance error message when requirement is missing object id
|
* Core: Enhance error message when requirement is missing object id
|
||||||
|
* Core: Add environment variable to select shell for executing scripts (Daniel Heule)
|
||||||
* Explorer hostname: Return host name by using uname -n
|
* Explorer hostname: Return host name by using uname -n
|
||||||
* New Type: __hostname (Steven Armstrong)
|
* New Type: __hostname (Steven Armstrong)
|
||||||
|
* Type __line: Use printf instead of echo for printing user input
|
||||||
|
|
||||||
3.0.2: 2014-01-19
|
3.0.2: 2014-01-19
|
||||||
* Documentation: Document all messages sent by types (Daniel Heule)
|
* Documentation: Document all messages sent by types (Daniel Heule)
|
||||||
|
|
44
docs/dev/logs/2014-01-20.environments
Normal file
44
docs/dev/logs/2014-01-20.environments
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
raw quote from irc
|
||||||
|
|
||||||
|
16:00 < sar> telmich: btw, ich denke nicht dass man install schon zu gross bewerben
|
||||||
|
sollte
|
||||||
|
16:00 < telmich> sar: ack
|
||||||
|
16:00 < sar> telmich: imho sollten wir erst die cdist environments implementieren,
|
||||||
|
install waere dann eines davon
|
||||||
|
16:00 < sar> config ein anderes
|
||||||
|
16:01 < sar> foobar noch ein anderes
|
||||||
|
16:01 < sar> es macht einfach keinen sinn auf type ebene install vs nicht-install zu
|
||||||
|
unterscheiden
|
||||||
|
16:02 < telmich> sar: environments sind bei mir noch nicht ganz im gehirn (ganicht?)
|
||||||
|
angelangt - hast du (nochmal?) kurz eine idee, was du damit meinst?
|
||||||
|
16:02 < sar> telmich: wenn man cdist anschaut, dann macht es eigentlich folgendes:
|
||||||
|
16:03 < sar> - definiere objekte mit hilfe von types
|
||||||
|
16:03 < sar> - deps zwischen objekten
|
||||||
|
16:03 < sar> - queue von objekten abarbeiten und auf $etwas anwenden
|
||||||
|
16:03 < sar> das ist alles
|
||||||
|
16:04 < sar> telmich: das ist eigentlich ziemlich generisch
|
||||||
|
16:04 < sar> telmich: fuer mich wuerde es sich hier anbieten das auch so zu
|
||||||
|
abstrahieren
|
||||||
|
16:05 < sar> telmich: ein environment (nenn das mal so weil kein besserer name zzt)
|
||||||
|
koennte das wie $objekt auf $etwas bestimmen
|
||||||
|
16:05 < sar> telmich: und auch was fuer types es in diesem environment gibt
|
||||||
|
16:06 < telmich> sar: klingt gut
|
||||||
|
16:06 < sar> telmich: e.g. es gibt ein environment fuer config -> was wir jetzt haben
|
||||||
|
16:06 < sar> eins fuer install -> += was im install branch ist (nur die types), den
|
||||||
|
python code brauchts nacher nicht mehr
|
||||||
|
16:07 < sar> eins fuer cisco-switch -> hat types um mit cisco zu spielen
|
||||||
|
16:07 < sar> usw
|
||||||
|
16:07 < sar> ein environment hat auch eigene remote-{exec,copy} scripte
|
||||||
|
16:08 < sar> und vielleicht globale explorer, vielleicht auch nicht
|
||||||
|
16:08 < sar> ein enviroment ist ein cconfig style directory
|
||||||
|
16:09 < sar> wo man cdist drueber laufen laesst
|
||||||
|
16:09 < sar> so was in der art
|
||||||
|
16:13 < telmich> sar: hmmja...klingt gut
|
||||||
|
16:15 < telmich> vielleicht etwas für cdist 4 oder cdist 5 :-)
|
||||||
|
16:15 < telmich> aber ich denke auf jeden fall als grundgedanke behaltbar
|
||||||
|
16:16 < telmich> ok für dich, wenn ich den chat ins docs/dev/logs kopiere als
|
||||||
|
erinnerungs
|
||||||
|
16:16 < telmich> s/s$/?/?
|
||||||
|
16:16 < telmich> s/?$//
|
||||||
|
16:20 < sar> klar
|
||||||
|
|
|
@ -132,6 +132,12 @@ TMPDIR, TEMP, TMP::
|
||||||
more information. This is rather useful, if the standard
|
more information. This is rather useful, if the standard
|
||||||
directory used does not allow executables.
|
directory used does not allow executables.
|
||||||
|
|
||||||
|
CDIST_LOCAL_SHELL::
|
||||||
|
Selects shell for local script execution, defaults to /bin/sh
|
||||||
|
|
||||||
|
CDIST_REMOTE_SHELL::
|
||||||
|
Selects shell for remote scirpt execution, defaults to /bin/sh
|
||||||
|
|
||||||
|
|
||||||
EXIT STATUS
|
EXIT STATUS
|
||||||
-----------
|
-----------
|
||||||
|
|
Loading…
Reference in a new issue